Simple examples of compile tools using NPM scripts.
Nodejs
Helps to detect errors and potential problems in your JavaScript. Watches all JavaScript files for changes.
- Install Node modules
npm install
- Lint JavaScript
npm run compile:js
Basic Sass configuration and setup, uses node-sass to compile Sass to CSS. Watches all Sass files for changes.
- Install Node modules
npm install
- Watch for changes and compile SCSS to CSS
npm run compile:sass
Automated SVG spriting.
- Install Node modules
npm install
- compile Sprite
npm run sprite
Browserify lets you require modules in the browser and bundles all your dependencies. Example with ESLint lints JavaScript before bundling and the example with Minifyify compresses JavaScript after bundling and maintains a sourcemap for easier debugging in the browser. Watches all JavaScript files for changes.
- Install Node modules
npm install
- compile JavaScript
npm run compile:js
Critical extracts & inlines critical-path (above-the-fold) CSS from HTML.
-
Install Node modules
npm install
-
compile JavaScript
npm run critical
Browser-sync updates the browser automatically every time you save a change to your project files.
-
Install Node modules
npm install
-
Sync browser
npm run browser-sync
Licensed under MIT Licence