Taskrunner Ade
npm i sass
npx sass source/stylesheets/index.scss build/stylesheets/index.css
"script": {
"build:css:development": "npx sass --embed-source-map source/stylesheets/index.scss build/stylesheets/index.css",
"build:css:production": "npx sass --no-source-map source/stylesheets/index.scss build/stylesheets/index.css",
}
npm i esbuild
esbuild source/js/index.js --bundle --minify --sourcemap --plattform=browser --outdir=build/js
"script": {
"build:js:development": "npx esbuild source/js/index.js --bundle --minify --sourcemap --plattform=browser --outdir=build/js",
"build:js:production": "npx esbuild js/index.js --bundle --minify --plattform=plattform --outdir=build/js",
}
npm i node-watch
import Watch from 'node-watch'
import * as child from 'child_process'
const execSync = child.execSync
const watch = Watch.default
watch('./sass', {recursive: true}, (evt, name) => {
console.log('sass triggered0'0)
execSync('npm run build:css:development')
})
watch('./js', {recursive: true}, (evt, name) => {
console.log('sass triggered0'0)
execSync('npm run build:js:development')
})
node watch.js
Comments
No Comments