Last active
January 10, 2021 10:40
-
-
Save nilshendriks/a4176aa10c56b6e0f8976e46b1d32414 to your computer and use it in GitHub Desktop.
npm scripts to process php files to html files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "table", | |
"version": "1.0.0", | |
"description": "", | |
"main": "add.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"watch:php": "watch -p 'components/**/*.php' -c 'npm run convert:php'", | |
"convert:php": "echo $FILENAME && my_file=$FILENAME && new_name=${my_file/php/html} && echo ${new_name} && curl -o ${new_name} http://localhost/~nils/tests/table/$FILENAME" | |
}, | |
"author": "nh", | |
"license": "ISC", | |
"devDependencies": { | |
"onchange": "^7.1.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use watch-cli for this.
https://github.com/doowb/watch-cli
Install globally with npm
npm i -g watch-cli
or try dev