Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swashcap/sample-gulpfile
A sample Gulp build file.
https://github.com/swashcap/sample-gulpfile
Last synced: 5 days ago
JSON representation
A sample Gulp build file.
- Host: GitHub
- URL: https://github.com/swashcap/sample-gulpfile
- Owner: swashcap
- Created: 2014-06-21T20:58:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-21T21:03:53.000Z (over 10 years ago)
- Last Synced: 2023-04-01T03:29:02.501Z (over 1 year ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample Gulpfile
This is a sample [Gulp](http://gulpjs.com) asset builder. All the action is in gulpfile.js_; [check it out](https://github.com/swashcap/sample-gulpfile/blob/master/gulpfile.js)!
## Tasks
There are three sample tasks in this project centered around files:
* **Styles:** Process Sass files and add vendor prefixes. Do this by running `gulp styles` from project root.
* **Scripts:** Lint JavaScript files and minify them. Do this by running `gulp scripts` from the project root.
* **Images:** Minify and optimize images. Do this by running `gulp images` from the project root.Development speed can be increased by **watching** files for changes and running the appropriate task. For simplicity, this only works styles and scripts. Do this by running `gulp watch` from the project root.
## Setup
Running these sample tasks requires some setup. Here’s what you’ll need:
* **[Sass](http://sass-lang.com):** a “CSS preprocessor” that extends regular ol’ CSS with some goodies
* **[GulpJS](http://gulpjs.com):** a command line “task runner” that makes building and deployment easy### Installing Sass
1. You need to have [Ruby running on your machine](https://www.ruby-lang.org/en/downloads/) (most systems come with it pre-installed).
2. Open a [shell window](http://en.wikipedia.org/wiki/Shell_(computing)) and run `gem install sass`.Refer to Sass’s official [Installation guide](http://sass-lang.com/install) for additional assistance.
### Getting NodeJS Up and Running
1. GulpJS runs on [Node.js](http://nodejs.org/). [Download and install Node.js](http://nodejs.org/download/).
2. To install GulpJS and its dependencies, navigate to this project’s root folder in a shell window and run `npm install`.