A recipe for bundling ES Modules with rollup.js and a basic Sass (ITCSS) setup.
- Clone this repo, download the zip file or use
degit
:npx degit vicompany/front-end-recipes
. - In the root of the project run
npm ci
ornpm install
. - The main entry points are:
src/scripts/main-module.mjs
: For modern browsers.src/scripts/main-nomodule.mjs
: For older browsers that don't support ES Modules.src/styles/main.scss
: Includes our ITCSS setup.
To start the watchers and a Browsersync server on http://localhost:3000.
npm run dev
This will lint the source code and create the production builds.
npm run build
These scripts are configured in the package.json
.