inital boilerplate checkin

This commit is contained in:
2016-04-13 17:07:23 -07:00
commit 252f72a948
8 changed files with 55 additions and 0 deletions

4
.babelrc Normal file
View File

@@ -0,0 +1,4 @@
{
"presets": "es2015",
"plugins": "add-module-exports"
}

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
lib
node_modules
npm-debug.log

2
.npmignore Normal file
View File

@@ -0,0 +1,2 @@
src
test

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
save-prefix='~'

22
package.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "project-name",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "npm run build && mocha --compilers js:babel-core/register",
"build": "babel src --out-dir lib",
"prepublish": "npm run test"
},
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"babel-cli": "~6.7.5",
"babel-core": "~6.7.6",
"babel-plugin-add-module-exports": "~0.1.2",
"babel-preset-es2015": "~6.6.0",
"expect.js": "~0.3.1",
"mocha": "~2.4.5",
"sinon": "~1.17.3"
}
}

1
readme.md Normal file
View File

@@ -0,0 +1 @@
insert project description

12
src/index.js Normal file
View File

@@ -0,0 +1,12 @@
class User {
constructor(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
getName() {
return `${this.firstName} ${this.lastName}`
}
}
export default User;

10
test/index.js Normal file
View File

@@ -0,0 +1,10 @@
import User from '../lib/index'
import expect from 'expect.js';
describe('User class', function () {
it('should return the name', function () {
var user = new User('test', 'user');
expect(user.getName()).to.equal('test user');
});
});