Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolab committed Feb 6, 2016
0 parents commit 60c6191
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.log

node_modules/
local/
public/
.Trash-1000/
.DS_Store
Thumbs.db
.idea/
.tmp/
27 changes: 27 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": false,
"curly": true,
"freeze": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"notypeof": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"proto": true,
"laxbreak": true,
"predef": [

]
}
16 changes: 16 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.log
gulpfile.js
gulpfile.babel.js
.jshintrc
test/
node_modules/
local/
public/
doc/
examples/
tasks/
.Trash-1000/
.DS_Store
Thumbs.db
.tmp/
.idea/
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
gulp-flow-js - https://github.com/gulp-flow/gulp-flow-js

The MIT License (MIT)

Copyright (c) 2016 Nicolas Tallefourtane <[email protected]>

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.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# gulp-flow-js

JS bundle for [gulp-flow](https://github.com/gulp-flow/gulp-flow).

See also [gulp-flow-webpack](https://github.com/gulp-flow/gulp-flow-webpack).


## Requirements

* [gulp-flow](https://github.com/gulp-flow/gulp-flow) must be installed.


## Install

```sh
npm install --save-dev gulp-flow-js
```


## Usage

A simple example:

_gulpfile.js_
```js
let gulp = require('gulp');
let flow = require('gulp-flow');
let {cfg, pipes} = flow;

// load (custom) webpack bundle
require('gulp-flow-js');


gulp.task('build.js', function() {
return gulp.src('src/**/*.js')
.pipe(pipes.jsMin())
.pipe(gulp.dest(cfg.publicJsDir))
;
});
```

And run your task: `gulp build.js`


## LICENSE

[MIT](https://github.com/gulp-flow/gulp-flow-js/blob/master/LICENSE) (c) 2016, Nicolas Tallefourtane.


## Author

| [![Nicolas Tallefourtane - Nicolab.net](http://www.gravatar.com/avatar/d7dd0f4769f3aa48a3ecb308f0b457fc?s=64)](http://nicolab.net) |
|---|
| [Nicolas Talle](http://nicolab.net) |
| [![Make a donation via Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PGRH4ZXP36GUC) |
37 changes: 37 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "gulp-flow-js",
"version": "1.0.0",
"description": "JS bundle for gulp-flow.",
"main": "./src/index.js",
"keywords": [
"gulp",
"gulpfriendly",
"gulp-flow-bundle",
"workflow",
"task",
"plugin",
"bundle",
"uglify",
"js"
],
"homepage": "https://github.com/gulp-flow/gulp-flow-js",
"author": {
"name": "Nicolas Tallefourtane",
"url": "http://nicolab.net"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "[email protected]:gulp-flow/gulp-flow-js.git"
},
"bugs": "https://github.com/gulp-flow/gulp-flow-js/issues",
"dependencies": {
"gulp-uglify": "^1.5.1"
},
"peerDependencies": {
"gulp-flow": "1"
},
"engines": {
"node": ">= 4"
}
}
23 changes: 23 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* This file is part of gulp-flow-js.
*
* (c) Nicolas Tallefourtane <[email protected]>
*
* For the full copyright and license information, please view the LICENSE file
* distributed with this source code
* or visit https://github.com/gulp-flow/gulp-flow.
*/

'use strict';

let flow = require('gulp-flow');
let {cfg, gp, pipes, utils} = flow;

// Gulp plugins
gp.uglify = require('gulp-uglify');

// pipes
pipes.jsMin = utils.lazypipe()
.pipe(gp.uglify, {mangle : false, preserveComments: true})
.pipe(gp.header, cfg.banner)
;

0 comments on commit 60c6191

Please sign in to comment.