$ cnpm install gulp-project-cypper
Just cool tools for your cool projects.
npm install gulp-project-cypper --save-dev
const gulpProject = require('gulp-project-cypper');
const resolve = require('path').resolve;
gulpProject(resolve('./package.json'));
// or
const pkg = require('./package.json');
gulpProject(pkg["gulp-project"]);
// or
const opt = {
"sourceFile": "main.js",
"sourceFolder": "./src/",
...
};
gulpProject(opt);
Node tasks |
---|
gulp node (runs file specified in option node) |
gulp nodeW * |
Browser tasks |
---|
gulp browserify (deploys** files in sourceFolder into one file. File name is sourceFile and folder containing it is distFolder) |
gulp browserifyW * |
gulp browser (runs gulp browserify and creates localhost in distFolder on port 1114.) |
gulp browserW * (localhost is not created when watcher runs it again) |
Github tasks*** |
---|
gulp gitIt (do gulp gitAdd -> gulp gitCommit -> gulp gitPush ) |
gulp gitIt * |
gulp gitSetup (do gulp gitInit -> gulp gitAdd -> gulp gitAddremote ) |
gulp gitInit (git init) |
gulp gitAdd (git add git.cwd/**) |
gulp gitAddremote (git remote add origin git.remote) |
gulp gitCheckout (git checkout -b git.branch) |
gulp gitCommit (git commit -m git.commitMessage) |
gulp gitPush (git push origin git.branch) |
gulp gitMerge (git merge git.branch) |
gulp gitFetch (git fetch origin git.branch) |
gulp gitPull (git pull origin git.branch) |
Notes:
str
Type: string
.
Absolyte path to your package.json.
Program extracts gulp-project
option from your json. - pkg["gulp-project"]
. Also if you change your package.json, you don't need to restart watchers, program will update options automatically. If you pass object you don't have that feature.
obj
Type: object
.
Options for your project.
"use-strict";
on the top, put it there)Copyright 2014 - 2017 © taobao.org |