https://github.com/viclafouch/gulp-example
An example of Gulpfile that allows you to create your own stand-alone project to facilitate several tasks.
https://github.com/viclafouch/gulp-example
gulp gulpfile-js javascript nodejs structuremap
Last synced: 7 months ago
JSON representation
An example of Gulpfile that allows you to create your own stand-alone project to facilitate several tasks.
- Host: GitHub
- URL: https://github.com/viclafouch/gulp-example
- Owner: viclafouch
- Created: 2017-10-11T07:58:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-01T17:35:39.000Z (almost 8 years ago)
- Last Synced: 2025-03-24T19:18:57.521Z (11 months ago)
- Topics: gulp, gulpfile-js, javascript, nodejs, structuremap
- Language: JavaScript
- Homepage:
- Size: 300 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Gulp-example]
Example of a gulpfile which build your own project (good for beginners).
## Informations
Description
A complete gulpfile for your project
Node Version
>= 0.10
Ruby Version
>= 2.0
Compass
>= 1.0.1
## Description
This example of Gulpfile will allow you to create your own autonomous project to facilitate several tasks: concatenation of files, compression and minification, auto-refresh and auto-prefix for your css.
A simple configuration file : **gulpfile.js**

Here is the list of the gulp plugins used :
* [babel-core](https://github.com/babel/babel/tree/master/packages/babel-core)
* [babel-preset-es2015](https://github.com/babel/babel/tree/master/packages/babel-preset-es2015)
* [browserslist](https://github.com/ai/browserslist)
* [gulp-about](https://github.com/michaelbazos/gulp-about)
* [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer)
* [gulp-babel](https://github.com/babel/gulp-babel)
* [gulp-clean-css](https://github.com/scniro/gulp-clean-css)
* [gulp-concat](https://github.com/contra/gulp-concat)
* [gulp-if](https://github.com/robrich/gulp-if)
* [gulp-inject](https://github.com/klei/gulp-inject)
* [gulp-json-editor](https://github.com/morou/gulp-json-editor)
* [gulp-livereload](https://github.com/vohof/gulp-livereload)
* [gulp-print](https://github.com/alexgorbatchev/gulp-print)
* [gulp-rename](https://github.com/hparra/gulp-rename)
* [gulp-sourcemaps](https://github.com/gulp-sourcemaps/gulp-sourcemaps)
* [gulp-uglify](https://github.com/terinjokes/gulp-uglify)
* [gulp-webserver](https://github.com/schickling/gulp-webserver)
* [gulp-util](https://github.com/gulpjs/gulp-util)
* [run-sequence](https://www.npmjs.com/package/run-sequence)
## Usage
4 requirements are necessary to use Gulp-example : **Gulp**, **NodeJS**, **Ruby** and **Compass** are required.
* Gulp : https://gulpjs.com/
* NodeJs : https://nodejs.org/en/download/
* Ruby : https://www.ruby-lang.org/en/downloads/
* Compass : http://compass-style.org/install/
If you want to have an autorefresh on your browser, you need livereload
* http://livereload.com/extensions/ and choose your browser.
After cloning the project, run these commands bellow :
```
npm install
```
```
gulp
```
## Configuration
### inDev
- Type: `Boolean`
- Default: `true`
Define your environment.
### libName
- Type: `String`
- Default: `lib`
Define your library folder name.
### libJS
- Type: `Array`
- Default: `[]`
Include all your js library.
**Note:** Be careful, It has to be the name of the folder which contains the differents js files.
**Example of a path** : `lib/MyLib/script.js` **=>** `['MyLib']`
### assetsPath
- Type: `String`
- Default: `assets`
Define your assets folder name.
### jsFileName
- Type: `String`
- Default: `app`
Define the name of the script file. All of the libraries that you included will be there (with your script).
### jsFolder
- Type: `String`
- Default: `js`
Define your js folder name.
### cssFolder
- Type: `String`
- Default: `css`
Define your css folder name.
### scssFolder
- Type: `String`
- Default: `scss`
Define your scss folder name.
### imgFolder
- Type: `String`
- Default: `img`
Define your img folder name.
### jsonData
- Type: `Object`
- Options:
- `'description'`: `` => `String`
- `'version'`: `` => `String`
- `'author'`: `` => `String`
Define some information about your project.
### autoRefresh
- Type: `Boolean`
- Default: `true`
You can listen for changes and allow auto-refresh based on [livereload for browser](http://livereload.com/extensions/).
## Contribute
Any contributions and/or pull requests would be welcome.
Bug fixes are greatly appreciated.
## License
Gulp-example is licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) license:
Copyright (C) 2017 Victor de la Fouchardiere
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## Author
[Victor de la Fouchardière](http://www.victor-de-la-fouchardiere.fr/)