1) Remember to install the npm packages first:
$ npm install
2) Build and Start coding!
Build the application for the first time...
$ npm run start
And start coding your Vanilla.js application, update the
src/app.js depending on your needs.
- Type on the command line
$ npm run startand type localhost on the browser.
It depends on the language, but you have
./src/index.html respectively, you can add new
.html as you please, just make sure to import it on the
Note: remember that the JS workflow starts inside
Every time you change any file inside the
./src folder the website's public URL will automatically refresh the changes (it's a process called hot deploy)
Remember also to refresh cleaning the cache (
command+shift+r on Mac,
control+shift+r on PC & Linux)
Add them inside the
./src/assets/img folder and import them from any of your JS files. E.g:
Just add the files into the JS folder and import the files/variables into your
import myVar from "./file2.js"
This boilerplate is 100% compatible with the free Github pages hosting. Publish your website by running:
$ npm run deploy
Very easy and in just one step! Push to your main branch and use the free hosting that comes with GitHub pages, the project is ready to be published. Remember to choose to run the Github Page from your master branch.Edit this page on GitHub