Based on Preact and Parcel Bundler.
demo cycle-track
preact
parcel-bundler
DON'T FORGET about safe write in ide https://en.parceljs.org/hmr.html#safe-write DOH!
npm i
Use following command and open http://localhost:1337
. When you edit index.js
and save your changes. Parcel will automatically rebuild all files
npm start
Use following command when you want to compile your JS and copy your index.html
to the dist
folder you can then deploy.
npm run build
Use following command when you want to compile your JS and copy your index.html
to the dist
folder you can then deploy.
npm run test
If you want to move index.html
, make sure to update the start
and build
npm scripts in package.json
with the new relative path to the file.
Parcel uses PostCSS plugins to manage CSS assets. You can find and modify PostCSS configuration by editing .postcssrc
file.
Keep in mind that Parcel builds the app into a dist
directory.
If you want to change the destination for build, add --out-dir build
to both start
and build
npm tasks in package.json
.
MIT idudiq 2018