Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eliot-akira/gulp-start
Gulp setup with common tasks
https://github.com/eliot-akira/gulp-start
Last synced: about 1 month ago
JSON representation
Gulp setup with common tasks
- Host: GitHub
- URL: https://github.com/eliot-akira/gulp-start
- Owner: eliot-akira
- Created: 2015-09-15T22:00:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-16T03:35:15.000Z (about 9 years ago)
- Last Synced: 2023-02-26T05:09:07.239Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 195 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gulp Start
Gulp setup with common tasks for building assets
- [x] Sass, Autoprefixer
- [x] Browserify, Babel, React/JSX, CoffeeScript, JSHint
- [x] Minify JS and CSS
- [x] Watch files and build
- [x] Multiple bundles
- [x] BrowserSync with Nodemon or static file server
- [x] Zip
---
To do:
- Prepare for Gulp 4 with task series and parallel
- Optional CoffeeScript version
- Optimize images
- Stylus, Jade
- [Strip debug/console statements](https://github.com/sindresorhus/gulp-strip-debug)?
- PostCSS, Webpack?
---
## Build
##### Requires [Node.js](https://nodejs.org/) and its included package manager, *npm*
The following commands are run from the root of the project folder.
**Install dependencies**
```sh
npm install
```This installs the Gulp task manager and supporting modules.
**Build and minify assets**
```sh
npm run build
```**Build with source maps**
```sh
npm run dev
```**Watch for file changes and automatically build with source maps**
```sh
npm run watch
```**Start static file server with watch and browser sync**
```sh
npm run serve
```**Lint JS files**
```sh
npm run lint
```**Remove compiled assets**
```sh
npm run clean
```---
## Configure
Edit configuration in *gulpfile.js*. See below some optional settings.
```javascript
var config = {// Assets are defined as object or array of objects for multiple bundles
assets: {name: 'app',
src: 'src',
dest: 'public',js: {
src: 'src/js',
dest: 'public/js',
lint: false,
babel : false,
extension: '.js', // .coffee, .es6, .jsx..
coffee : false
},css: {
sass : true
autoprefixer: {
...
}
}
},// Static file server
browserSync: {
server: './public'
},// ..or Nodemon
nodemon: {}
};require('./gulp/launch')( config );
```