This is a basic template for a web based project. It utilizes Parcel.js for a more simplified path towards automatic bundling of assets and other items.
- Make sure you have a fairly recent version of Node.js. nvm is a great tool for keeping up to date with Node on Unix like platforms.
- if on Windows - for the best ease of use with Node, it's recommended installing a Linux subsystem which can be obtained from the Windows store but it is available as a installer instead as well.
- once Node is installed, you should have access to the
npm
command. Runnpm install
to install all the necessary dependencies.
- Regular css bundling ought to work by default but if you want scss handling, you'll need to make sure you install ruby and sass. See https://sass-lang.com/install
- that page also has a number of alternatives if you don't want to install ruby
The way that parcel works, unfortunately means that customizing the project structure is somewhat limited but this is probably the easiest to understand.
app -- src -- css <any other folders and css/scss files> -- index.html
- Run
npm start
to start things up in development mode. You can access the development server atlocalhost:1234
- When you're ready to deploy, run
npm run build
- the output will get written to thedist
folder by default.
Though it does fill a large number of app types, Parcel is still rather limited in the way things can be customized out of the box; should more features be required, there are a number of alternatives