==================================== A super clean and easy to use starter kit for using Gulp and Less. This should help you repurpose Gulp and Less for your own projects.
- Read the article: : http://scotch.io/tutorials/getting-started-with-less
- Watch the video: https://www.youtube.com/watch?v=5nqWhwsMQqs
- Watches for Less changes on save
- Checks for Less errors and outputs them without you having to rerun Gulp
- Autoprefixes for legacy browsers
- Combines all CSS into one big and sexy minified file
- Includes Less Bootstrap
- Automatically compiles all jQuery libraries into one big file JS file
- Lints custom scripts for errors
- Combines all custom scripts into one file
$ git clone git@github.com:scotch-io/gulp-and-less-starter-kit.git
$ cd gulp-and-less-starter-kit
$ npm install
After, run
$ gulp
Or
$ gulp server
...if you need a local server. Folder build serving at http://localhost:8888
Should use Livereload extension. Or inject <script src="//localhost:35729/livereload.js"></script>
into your page.
When you change a LESS(or JS) file, the page will reload.
If this isn't working, it's probably because you need to update. Just run npm update --save-dev
If no command gulp found?, you need to install it globally npm install -g gulp
or run npm run gulp
Try this:
sudo npm cache clean
npm install --save-dev
npm update --save-dev
gulp
- Any changes in
assets/less/*
will trigger the Less to compile on save - All files in
assets/js/libs/*
will be compressed tobuild/jquery.plugins.min.js
- All files in
assets/js/*
(except forlibs
) will be compressed tobuild/scripts.min.js
To Kenny Song for his contributions and https://github.com/baivong