Skip to content

Commit d8c0db3

Browse files
committed
first commit
0 parents  commit d8c0db3

11 files changed

+424
-0
lines changed

Diff for: .editorconfig

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
end_of_line = lf
7+
charset = utf-8
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
insert_final_newline = false
15+
16+
[test/**]
17+
trim_trailing_whitespace = false
18+
insert_final_newline = false
19+
20+
[templates/**]
21+
trim_trailing_whitespace = false
22+
insert_final_newline = false

Diff for: .eslintrc

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"ecmaFeatures": {
3+
"modules": true,
4+
"experimentalObjectRestSpread": true
5+
},
6+
7+
"env": {
8+
"browser": false,
9+
"es6": true,
10+
"node": true,
11+
"mocha": true
12+
},
13+
14+
"globals": {
15+
"document": false,
16+
"navigator": false,
17+
"window": false
18+
},
19+
20+
"rules": {
21+
"accessor-pairs": 2,
22+
"arrow-spacing": [2, { "before": true, "after": true }],
23+
"block-spacing": [2, "always"],
24+
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
25+
"comma-dangle": [2, "never"],
26+
"comma-spacing": [2, { "before": false, "after": true }],
27+
"comma-style": [2, "last"],
28+
"constructor-super": 2,
29+
"curly": [2, "multi-line"],
30+
"dot-location": [2, "property"],
31+
"eol-last": 2,
32+
"eqeqeq": [2, "allow-null"],
33+
"generator-star-spacing": [2, { "before": true, "after": true }],
34+
"handle-callback-err": [2, "^(err|error)$" ],
35+
"indent": [2, 2, { "SwitchCase": 1 }],
36+
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
37+
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
38+
"new-parens": 2,
39+
"no-array-constructor": 2,
40+
"no-caller": 2,
41+
"no-class-assign": 2,
42+
"no-cond-assign": 2,
43+
"no-const-assign": 2,
44+
"no-control-regex": 2,
45+
"no-debugger": 2,
46+
"no-delete-var": 2,
47+
"no-dupe-args": 2,
48+
"no-dupe-class-members": 2,
49+
"no-dupe-keys": 2,
50+
"no-duplicate-case": 2,
51+
"no-empty-character-class": 2,
52+
"no-empty-label": 2,
53+
"no-eval": 2,
54+
"no-ex-assign": 2,
55+
"no-extend-native": 2,
56+
"no-extra-bind": 2,
57+
"no-extra-boolean-cast": 2,
58+
"no-extra-parens": [2, "functions"],
59+
"no-fallthrough": 2,
60+
"no-floating-decimal": 2,
61+
"no-func-assign": 2,
62+
"no-implied-eval": 2,
63+
"no-inner-declarations": [2, "functions"],
64+
"no-invalid-regexp": 2,
65+
"no-irregular-whitespace": 2,
66+
"no-iterator": 2,
67+
"no-label-var": 2,
68+
"no-labels": 2,
69+
"no-lone-blocks": 2,
70+
"no-mixed-spaces-and-tabs": 2,
71+
"no-multi-spaces": 2,
72+
"no-multi-str": 2,
73+
"no-multiple-empty-lines": [2, { "max": 1 }],
74+
"no-native-reassign": 2,
75+
"no-negated-in-lhs": 2,
76+
"no-new": 2,
77+
"no-new-func": 2,
78+
"no-new-object": 2,
79+
"no-new-require": 2,
80+
"no-new-wrappers": 2,
81+
"no-obj-calls": 2,
82+
"no-octal": 2,
83+
"no-octal-escape": 2,
84+
"no-proto": 0,
85+
"no-redeclare": 2,
86+
"no-regex-spaces": 2,
87+
"no-return-assign": 2,
88+
"no-self-compare": 2,
89+
"no-sequences": 2,
90+
"no-shadow-restricted-names": 2,
91+
"no-spaced-func": 2,
92+
"no-sparse-arrays": 2,
93+
"no-this-before-super": 2,
94+
"no-throw-literal": 2,
95+
"no-trailing-spaces": 0,
96+
"no-undef": 2,
97+
"no-undef-init": 2,
98+
"no-unexpected-multiline": 2,
99+
"no-unneeded-ternary": [2, { "defaultAssignment": false }],
100+
"no-unreachable": 2,
101+
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
102+
"no-useless-call": 0,
103+
"no-with": 2,
104+
"one-var": [0, { "initialized": "never" }],
105+
"operator-linebreak": [0, "after", { "overrides": { "?": "before", ":": "before" } }],
106+
"padded-blocks": [0, "never"],
107+
"quotes": [2, "single", "avoid-escape"],
108+
"radix": 2,
109+
"semi": [2, "always"],
110+
"semi-spacing": [2, { "before": false, "after": true }],
111+
"space-after-keywords": [2, "always"],
112+
"space-before-blocks": [2, "always"],
113+
"space-before-function-paren": [2, "never"],
114+
"space-before-keywords": [2, "always"],
115+
"space-in-parens": [2, "never"],
116+
"space-infix-ops": 2,
117+
"space-return-throw-case": 2,
118+
"space-unary-ops": [2, { "words": true, "nonwords": false }],
119+
"spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
120+
"use-isnan": 2,
121+
"valid-typeof": 2,
122+
"wrap-iife": [2, "any"],
123+
"yoda": [2, "never"]
124+
}
125+
}

Diff for: .gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Enforce Unix newlines
2+
* text eol=lf
3+
4+
# binaries
5+
*.ai binary
6+
*.psd binary
7+
*.jpg binary
8+
*.gif binary
9+
*.png binary
10+
*.jpeg binary

Diff for: .gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.DS_Store
2+
*.sublime-*
3+
_gh_pages
4+
bower_components
5+
node_modules
6+
npm-debug.log
7+
actual
8+
test/actual
9+
temp
10+
tmp
11+
TODO.md
12+
vendor
13+
.idea
14+
benchmark
15+
coverage

Diff for: .travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sudo: false
2+
language: node_js
3+
node_js:
4+
- "stable"
5+
- "0.12"
6+
- "0.10"
7+
matrix:
8+
fast_finish: true
9+
allow_failures:
10+
- node_js: "0.10"

Diff for: .verb.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# {%= name %} {%= badge("fury") %} {%= badge("travis") %}
2+
3+
> {%= description %}
4+
5+
## Install
6+
{%= include("install-npm", {save: true}) %}
7+
8+
## Usage
9+
10+
```js
11+
var Base = require('base-methods');
12+
var tasks = require('{%= name %}');
13+
Base.use(tasks());
14+
15+
var base = new Base();
16+
base.task('foo', function(cb) {
17+
console.log('this is foo!');
18+
cb();
19+
});
20+
base.task('bar', function(cb) {
21+
console.log('this is bar!');
22+
cb();
23+
});
24+
25+
base.build(['foo', 'bar'], function(err) {
26+
// this is foo!
27+
// this is bar!
28+
console.log('done!');
29+
});
30+
```
31+
32+
## Related projects
33+
{%= related(verb.related.list) %}
34+
35+
## Running tests
36+
{%= include("tests") %}
37+
38+
## Contributing
39+
{%= include("contributing") %}
40+
41+
## Author
42+
{%= include("author") %}
43+
44+
## License
45+
{%= copyright() %}
46+
{%= license() %}
47+
48+
***
49+
50+
{%= include("footer") %}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015, Jon Schlinkert.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Diff for: README.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# base-tasks [![NPM version](https://badge.fury.io/js/base-tasks.svg)](http://badge.fury.io/js/base-tasks) [![Build Status](https://travis-ci.org/jonschlinkert/base-tasks.svg)](https://travis-ci.org/jonschlinkert/base-tasks)
2+
3+
> base-methods plugin that provides a very thin wrapper around [https://github.com/jonschlinkert/composer](https://github.com/jonschlinkert/composer) for adding task methods to your application.
4+
5+
## Install
6+
7+
Install with [npm](https://www.npmjs.com/)
8+
9+
```sh
10+
$ npm i base-tasks --save
11+
```
12+
13+
## Usage
14+
15+
```js
16+
var Base = require('base-methods');
17+
var tasks = require('base-tasks');
18+
Base.use(tasks());
19+
20+
var base = new Base();
21+
base.task('foo', function(cb) {
22+
console.log('this is foo!');
23+
cb();
24+
});
25+
base.task('bar', function(cb) {
26+
console.log('this is bar!');
27+
cb();
28+
});
29+
30+
base.build(['foo', 'bar'], function(err) {
31+
// this is foo!
32+
// this is bar!
33+
console.log('done!');
34+
});
35+
```
36+
37+
## Related projects
38+
39+
* [base-cli](https://www.npmjs.com/package/base-cli): Plugin for base-methods that maps built-in methods to CLI args (also supports methods from a… [more](https://www.npmjs.com/package/base-cli) | [homepage](https://github.com/jonschlinkert/base-cli)
40+
* [base-methods](https://www.npmjs.com/package/base-methods): Starter for creating a node.js application with a handful of common methods, like `set`, `get`,… [more](https://www.npmjs.com/package/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods)
41+
* [base-options](https://www.npmjs.com/package/base-options): Adds a few options methods to base-methods, like `option`, `enable` and `disable`. See the readme… [more](https://www.npmjs.com/package/base-options) | [homepage](https://github.com/jonschlinkert/base-options)
42+
* [base-plugins](https://www.npmjs.com/package/base-plugins): Upgrade's plugin support in base-methods to allow plugins to be called any time after init. | [homepage](https://github.com/jonschlinkert/base-plugins)
43+
* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://www.npmjs.com/package/base-store) | [homepage](https://github.com/jonschlinkert/base-store)
44+
45+
## Running tests
46+
47+
Install dev dependencies:
48+
49+
```sh
50+
$ npm i -d && npm test
51+
```
52+
53+
## Contributing
54+
55+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/base-tasks/issues/new).
56+
57+
## Author
58+
59+
**Jon Schlinkert**
60+
61+
+ [github/jonschlinkert](https://github.com/jonschlinkert)
62+
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
63+
64+
## License
65+
66+
Copyright © 2015 Jon Schlinkert
67+
Released under the MIT license.
68+
69+
***
70+
71+
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 19, 2015._

Diff for: index.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*!
2+
* base-tasks <https://github.com/jonschlinkert/base-tasks>
3+
*
4+
* Copyright (c) 2015, Jon Schlinkert.
5+
* Licensed under the MIT License.
6+
*/
7+
8+
'use strict';
9+
10+
var Composer = require('composer');
11+
12+
module.exports = function(name) {
13+
return function(app) {
14+
Composer.call(app, name);
15+
app.constructor.inherit(app.constructor, Composer);
16+
};
17+
};

Diff for: package.json

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "base-tasks",
3+
"description": "base-methods plugin that provides a very thin wrapper around <https://github.com/jonschlinkert/composer> for adding task methods to your application.",
4+
"version": "0.1.0",
5+
"homepage": "https://github.com/jonschlinkert/base-tasks",
6+
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7+
"repository": "jonschlinkert/base-tasks",
8+
"bugs": {
9+
"url": "https://github.com/jonschlinkert/base-tasks/issues"
10+
},
11+
"license": "MIT",
12+
"files": [
13+
"index.js"
14+
],
15+
"main": "index.js",
16+
"engines": {
17+
"node": ">=0.10.0"
18+
},
19+
"scripts": {
20+
"test": "mocha"
21+
},
22+
"dependencies": {
23+
"composer": "^0.8.0"
24+
},
25+
"devDependencies": {
26+
"base-methods": "^0.5.0",
27+
"mocha": "*"
28+
},
29+
"keywords": [
30+
"base",
31+
"tasks"
32+
],
33+
"verb": {
34+
"related": {
35+
"list": [
36+
"base-methods",
37+
"base-plugins",
38+
"base-options",
39+
"base-cli",
40+
"base-store"
41+
]
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)