Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrambil committed Oct 23, 2016
0 parents commit 1ceb15f
Show file tree
Hide file tree
Showing 11 changed files with 214 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
coverage
dist
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- v6
- v5
- v4
- '0.12'
- '0.10'
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Mohamed Rambil <[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.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# mrambil-user [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
>
## Installation

```sh
$ npm install --save mrambil-user
```

## Usage

```js
var mrambilUser = require('mrambil-user');

mrambilUser('Rainbow');
```
## License

MIT © [Mohamed Rambil]()


[npm-image]: https://badge.fury.io/js/mrambil-user.svg
[npm-url]: https://npmjs.org/package/mrambil-user
[travis-image]: https://travis-ci.org/mrambil/mrambil-user.svg?branch=master
[travis-url]: https://travis-ci.org/mrambil/mrambil-user
[daviddm-image]: https://david-dm.org/mrambil/mrambil-user.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/mrambil/mrambil-user
[coveralls-image]: https://coveralls.io/repos/mrambil/mrambil-user/badge.svg
[coveralls-url]: https://coveralls.io/r/mrambil/mrambil-user
79 changes: 79 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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');
var del = require('del');
var isparta = require('isparta');

// Initialize the babel transpiler so ES2015 files gets compiled
// when they're loaded
require('babel-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: path.resolve('package.json')}, cb);
});

gulp.task('pre-test', function () {
return gulp.src('lib/**/*.js')
.pipe(excludeGitignore())
.pipe(istanbul({
includeUntested: true,
instrumenter: isparta.Instrumenter
}))
.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('watch', function () {
gulp.watch(['lib/**/*.js', 'test/**'], ['test']);
});

gulp.task('coveralls', ['test'], function () {
if (!process.env.CI) {
return;
}

return gulp.src(path.join(__dirname, 'coverage/lcov.info'))
.pipe(coveralls());
});

gulp.task('babel', ['clean'], function () {
return gulp.src('lib/**/*.js')
.pipe(babel())
.pipe(gulp.dest('dist'));
});

gulp.task('clean', function () {
return del('dist');
});

gulp.task('prepublish', ['nsp', 'babel']);
gulp.task('default', ['static', 'test', 'coveralls']);
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {};
51 changes: 51 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "mrambil-user",
"version": "0.0.0",
"description": "",
"homepage": "",
"author": {
"name": "Mohamed Rambil",
"email": "[email protected]",
"url": ""
},
"files": [
"dist"
],
"main": "dist/index.js",
"keywords": [
""
],
"devDependencies": {
"eslint": "^3.1.1",
"eslint-config-xo-space": "^0.15.0",
"babel-eslint": "^6.1.2",
"eslint-plugin-babel": "^3.3.0",
"gulp": "^3.9.0",
"gulp-eslint": "^3.0.1",
"gulp-exclude-gitignore": "^1.0.0",
"gulp-line-ending-corrector": "^1.0.1",
"gulp-istanbul": "^1.0.0",
"gulp-mocha": "^3.0.1",
"gulp-plumber": "^1.0.0",
"gulp-nsp": "^2.1.0",
"gulp-coveralls": "^0.1.0",
"gulp-babel": "^6.1.2",
"del": "^2.0.2",
"babel-core": "^6.11.4",
"babel-register": "^6.9.0",
"babel-preset-es2015": "6.9.0",
"isparta": "^4.0.0"
},
"eslintConfig": {
"extends": "xo-space",
"env": {
"mocha": true
}
},
"repository": "mrambil/mrambil-user",
"scripts": {
"prepublish": "gulp prepublish",
"test": "gulp"
},
"license": "MIT"
}
8 changes: 8 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import assert from 'assert';
import mrambilUser from '../lib';

describe('mrambil-user', function () {
it('should have unit test!', function () {
assert(false, 'we expected this package author to add actual unit tests.');
});
});

0 comments on commit 1ceb15f

Please sign in to comment.