add: babel to build es6 to es5

This commit is contained in:
lancegin 2017-06-28 17:03:25 +08:00
parent d7304219c4
commit fdad02561d
3 changed files with 42 additions and 0 deletions

3
.babelrc Normal file
View File

@ -0,0 +1,3 @@
{
"presets": ["es2015", "stage-0"]
}

3
.gitignore vendored
View File

@ -14,6 +14,9 @@ pids
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Directort for babel-builded es2015 file
lib/
# Coverage directory used by tools like istanbul
coverage

36
package.json Normal file
View File

@ -0,0 +1,36 @@
{
"name": "jsotp",
"version": "1.0.0",
"description": "Javascript One-Time Password module.",
"main": "src/jsotp.js",
"directories": {
"doc": "docs",
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "babel src -d lib"
},
"repository": {
"type": "git",
"url": "git+https://github.com/LanceGin/jsotp.git"
},
"keywords": [
"otp",
"totp",
"hotp",
"rfc6238",
"rfc4226"
],
"author": "lancegin",
"license": "MIT",
"bugs": {
"url": "https://github.com/LanceGin/jsotp/issues"
},
"homepage": "https://github.com/LanceGin/jsotp#readme",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1"
}
}