Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toddmotto/gulp-oss
My Gulp.js boilerplate for creating new JavaScript projects
https://github.com/toddmotto/gulp-oss
Last synced: 11 days ago
JSON representation
My Gulp.js boilerplate for creating new JavaScript projects
- Host: GitHub
- URL: https://github.com/toddmotto/gulp-oss
- Owner: toddmotto
- License: other
- Created: 2014-06-08T16:45:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-08T18:01:28.000Z (over 10 years ago)
- Last Synced: 2024-10-11T08:10:41.011Z (29 days ago)
- Language: JavaScript
- Size: 130 KB
- Stars: 28
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GulpOSS
My Gulp.js boilerplate for creating new JavaScript projects! Use if you will, if so here's a brief intro as to what it does.
This boilerplate does the following:
* Provides a [UMD](https://github.com/umdjs/umd) wrapper for JavaScript modules, `project.js` (rename to suit)
* Lints `src/*.js`
* Adds a copyright banner to outputted files, configurable
* Compiles a `*.js` and `*.min.js` version of the `src/*.js` file
* Cleans the `dist` directory each time files compiled
* Boots a Karma server, runs Jasmine unit tests on `src/*.js` file
* Evalutes Jasmine tests using PhantomJS (headless WebKit)
* Prints tests on the command line
* Ships with `.travis.yml` which runs `gulp` on [TravisCI](https://travis-ci.org)### Dependencies
* [PhantomJS](http://phantomjs.org), best installed using [Brew](http://brew.sh)
* [Node.js](http://nodejs.org)
* [Gulp](http://gulpjs.com) `npm install -g gulp`### How to use
Inside `gulpfile.js` you'll see the following, rename the `scripts: []` file to your desired name:
```js
var paths = {
output : 'dist/',
scripts : [
'src/project.js'
],
test: [
'test/spec/**/*.js'
]
};
```Inside `package.json` you'll be able to change the names of the project.
Inside `project.js` is the UMD setup which returns an Object from the module, an enhanced Module pattern. Rename `root.MYPROJECT` to suit.
Inside `spec-myproject.js` is an example `describe()` to setup the first [Jasmine](http://jasmine.github.io) unit test.
Run `npm install` and `gulp` to get going.