gulp-begin
gulp-begin
Using Here's an example
var begin = require('gulp-begin');
var gulp = require('gulp');
gulp.task('default', ['test']);
begin(gulp, {
test: {
main: 'test/myTestRunner.js'
},
exclude: ['server'],
warnExclusions: true
});
begin(gulp, options)
Augment gulp using gulp-begin
(via begin
) and passing an option
object.
options.exclude
An array of task names to exclude from gulp
.
options.only
An array of task names that will only be used. All other (default) tasks
will be excluded. This field will be disregared if options.exclude
is
truthy.
options.warnExclusions
If this field is set to a truthy value, gulp-begin
will warn if a gulp
command is run with an excluded task.
Default Server
TODO
Default Tasks
html
This task will minify HTML in files/src/html
and place the minified
version in the client destination directory.
jshint
This task runs the jshint
linter on source files and reports the
results in a stylish manner.
scripts
TODO
styles
TODO
images
Minifies images (PNGs and JPGs).
svgs
Minifies and Angular-templates SVGs.
build
A general task that performs the following tasks
html
styles
scripts
images
svgs
server
TODO
demon
TODO
dev
TODO
test
TODO
autotest
TODO
docs
TODO
changelog
TODO
Build
Requirements
Setup
$ npm run setup
$ npm install
This installs the following globally:
Add a file called .env
to the root of the project with the following contents:
{
"node": {
"env": "dev"
}
}
You can now run the development server by running the following commands:
$ npm start
- You can now visit http://localhost:8081/ to view changes live.
Directories
src/client
- clientside html, scripts, and stylessrc/server
- serverside scripts and sql queries
Serverside runtime
- Uses dependency injection from Nodep
Running the test suite
Single Run:
$ gulp test
Continuous testing when files are changed:
$ gulp autotest
Generating README.md
$ gulp docs
Generating CHANGELOG.md
$ gulp changelog
Notes
- jshint is part of the test suite and should be kept clean
- Commits should have high test coverage
- Docs should be kept up to date
- Additions should come with documentation
- commit messages should follow Angular conventional format
License
Copyright (c) 2016 Beg.in
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.