Needs to install some dependencies to run the options you select. For this job, run this command in your shell
$ npm run start
$ npm run code
$ npm run build // build the project without serving
$ npm run code --tunnel // create a tunnel to share your project everywhere
You have a config file located at gulp/config.js
that enables you to add thrid-party libraries easily.
We are using sass-module-importer
so we can import sass libraries just using the npm package name like:
import "bootstrap-sass";
That is the external library fits under one of these categories:
- Set a SCSS/Sass/CSS file on the "main" field of their package.json/bower.json
- Set a SCSS/Sass/CSS file on the "style" field of their package.json/bower.json
- Have a index.css file on the root of their module
However fear not, if your module doesn't fit into those categories you can also navigate to your desired scss or css file like this:
@import "module-name/folder/to/_file.scss";
We are using WebpackJS to bundle our script files. There's also ES6 on-demand transpilation and pollyfills.
Learn more about Javascript Modules here Wesbos Article About Modules
Also learn more about ES6 here: Babel Overview of ES2015
import $ from "jquery";
import "bootstrap-sass";
We also included the amazing webpack-bundle-analyzer
you can fine tweak you JS bundle size if you wish to. Fire it up running this command:
$ npm run debug
You can add file paths to fontFiles
key, who will move this fonts to the correct folder ./dist/assets/fonts
.
You can point to specific files or complete directories using wildcards (**/*
)
fontFiles: [
'./path/to/bootstrap/fonts/**/*',
'./node_modules/library/font/font.ttf'
]
$ gulp clean
Clean /dist directory
$ gulp images
Move images
$ gulp fonts
Move project fonts
$ gulp scripts
Process script files with webpack
$ gulp styles
Compile, concat, autoprefix, minify and move [SCSS, Less, Stylus] project files
$ gulp watch
Watch your files and autoexecute gulp directives$ gulp serve
Watch your files and serve with an HTTP server and Sync with your prefered browser awesome!
$ gulp build
Execute all the gulp directives and makes a.zip
file with the latest code.