Initial commit w/ yo node

This commit is contained in:
Aaron Jensen 2015-07-31 08:53:25 -07:00
parent 95da0d0618
commit 454dd69b53
12 changed files with 197 additions and 6 deletions

1
.babelrc Normal file
View File

@ -0,0 +1 @@
{}

11
.editorconfig Normal file
View File

@ -0,0 +1,11 @@
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

21
.eslintrc Normal file
View File

@ -0,0 +1,21 @@
{
"ecmaFeatures": {
"modules": true
},
"env": {
"es6": true
},
"rules": {
"strict": [2, "global"],
"quotes": [2, "single"],
"indent": [2, 2],
"one-var": [2, "never"],
"consistent-return": 0,
"no-use-before-define": [2, "nofunc"],
"space-before-function-paren": [2, {anonymous: "always", named: "never"}]
},
"env": {
"node": true,
"mocha": true
}
}

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
node_modules
coverage
dist

6
.travis.yml Normal file
View File

@ -0,0 +1,6 @@
sudo: false
language: node_js
node_js:
- '0.10'
- '0.12'
- 'iojs'

22
LICENSE.txt Normal file
View File

@ -0,0 +1,22 @@
Copyright (c) 2015 Aaron Jensen
MIT License
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.

32
README.md Normal file
View File

@ -0,0 +1,32 @@
# updeep [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> [WIP: do not use] Easily update immutable objects (frozen or not) in a declarative way.
## Install
```sh
$ npm install --save updeep
```
## Usage
```js
var updeep = require('updeep');
updeep('Rainbow');
```
## License
MIT © [Aaron Jensen]()
[npm-image]: https://badge.fury.io/js/updeep.svg
[npm-url]: https://npmjs.org/package/updeep
[travis-image]: https://travis-ci.org//updeep.svg?branch=master
[travis-url]: https://travis-ci.org//updeep
[daviddm-image]: https://david-dm.org//updeep.svg?theme=shields.io
[daviddm-url]: https://david-dm.org//updeep
[coveralls-image]: https://coveralls.io/repos//updeep/badge.svg
[coveralls-url]: https://coveralls.io/r//updeep

67
gulpfile.js Normal file
View File

@ -0,0 +1,67 @@
'use strict';
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');
var coveralls = require('gulp-coveralls');
var babel = require('gulp-babel');
// Initialize the babel transpiler so ES2015 files gets compiled
// when they're loaded
require('babel-core/register');
gulp.task('static', function () {
return gulp.src('**/*.js')
.pipe(excludeGitignore())
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError())
});
gulp.task('nsp', function (cb) {
nsp('package.json', cb);
});
gulp.task('pre-test', function () {
return gulp.src('lib/**/*.js')
.pipe(babel())
.pipe(istanbul({includeUntested: true}))
.pipe(istanbul.hookRequire());
});
gulp.task('test', ['pre-test'], function (cb) {
var mochaErr;
gulp.src('test/**/*.js')
.pipe(plumber())
.pipe(mocha({reporter: 'spec'}))
.on('error', function (err) {
mochaErr = err;
})
.pipe(istanbul.writeReports())
.on('end', function () {
cb(mochaErr);
});
});
gulp.task('coveralls', ['test'], function () {
if (!process.env.CI) {
return;
}
return gulp.src(path.join(__dirname, 'coverage/lcov.info'))
.pipe(coveralls());
});
gulp.task('babel', function () {
return gulp.src('lib/**/*.js')
.pipe(babel())
.pipe(gulp.dest('dist'));
});
gulp.task('prepublish', ['nsp', 'babel']);
gulp.task('default', ['static', 'test', 'coveralls']);

2
lib/index.js Normal file
View File

@ -0,0 +1,2 @@
'use strict';
export default {};

View File

@ -2,24 +2,40 @@
"name": "updeep",
"version": "0.0.0",
"description": "[WIP: do not use] Easily update immutable objects (frozen or not) in a declarative way.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"homepage": "https://github.com/aaronjensen/updeep",
"repository": {
"type": "git",
"url": "https://github.com/aaronjensen/updeep"
},
"author": "Aaron Jensen",
"files": [
"dist"
],
"main": "index.js",
"keywords": [
"immutable",
"frozen",
"functional",
"declarative"
],
"author": "Aaron Jensen",
"scripts": {
"test": "gulp",
"prepublish": "gulp prepublish"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/aaronjensen/updeep/issues"
},
"homepage": "https://github.com/aaronjensen/updeep"
"devDependencies": {
"gulp": "^3.6.0",
"gulp-exclude-gitignore": "^1.0.0",
"gulp-istanbul": "^0.9.0",
"gulp-eslint": "^0.15.0",
"gulp-mocha": "^2.0.0",
"gulp-plumber": "^1.0.0",
"gulp-nsp": "^0.4.5",
"gulp-coveralls": "^0.1.0",
"gulp-babel": "^5.1.0",
"babel-core": "^5.5.0"
}
}

9
test/index.js Normal file
View File

@ -0,0 +1,9 @@
'use strict';
import assert from 'assert';
import updeep from '../lib';
describe('updeep', function () {
it('should have unit test!', function () {
assert(false, 'we expected this package author to add actual unit tests.');
});
});