1.4 KiB
This file explains how to compile files for the UI.
What you need to do just the first time
-
Download and install the LTS version of Node.js, you can download it here (also installs npm)
-
Once you have finished to install Node.js, check if everything is ok by running
$ node -v
and then
$ npm -v
If you will see the corresponding versions of node and npm, you are ready to code!
- Go to the root of this project, open your favorite prompt and run
$ npm i
Scripts
Develpoment
By simply running
$ npm run dev
you will have 2 tasks running at the same time:
- the python server
- the rollup watcher pointing to the configured
.js
file and ready to re-bundle
You can now go to http://127.0.0.1:33333 and see the app running.
You can edit .css
and .js
files and simply refresh the page to see your new and surely awesome code directly in the app 😉
If you need to edit the index.html
file you will have to kill the terminal and re-run npm run dev
to see your edits.
Building
If you want to deploy your application, you have to run
$ npm run build
This is necessary to get a bundled .js
file minified, helping ro drop your final application size.
Other
If you notice that another member of the team installed one or more new packages, just run
$ npm i