Skip to content

Commit

Permalink
Change output from 'lib' to 'dist', and add 'pretest' script
Browse files Browse the repository at this point in the history
Signed-off-by: Tao Wang <twang2218@gmail.com>
  • Loading branch information
twang2218 committed Jun 30, 2017
1 parent b1376aa commit 10372fe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -52,6 +52,6 @@ cscope.po.out

test/auth.json*
.coveralls.yml*
lib/
dist/
log/
.yarnclean
13 changes: 7 additions & 6 deletions package.json
Expand Up @@ -6,10 +6,10 @@
"license": "Apache-2.0",
"homepage": "https://github.com/twang2218/node-cba-netbank",
"bugs": "https://github.com/twang2218/node-cba-netbank/issues",
"main": "lib/api.js",
"main": "dist/api.js",
"bin": "bin/node-cba-netbank.js",
"directories": {
"lib": "./lib"
"lib": "./dist"
},
"dependencies": {
"bluebird": "^3.5.0",
Expand Down Expand Up @@ -37,13 +37,14 @@
"nock": "^9.0.13"
},
"scripts": {
"build": "babel src -d lib",
"build": "babel src -d dist",
"prepublish": "yarn build",
"pretest": "yarn build && yarn eslint",
"eslint": "eslint src test",
"test": "jest --coverage --verbose",
"test-debug": "DEBUG=node-cba-netbank jest --runInBand --coverage --verbose",
"test-coveralls": "DEBUG=node-cba-netbank jest --coverage && cat ./coverage/lcov.info | coveralls",
"clean": "rm -rf ./log/* ./coverage ./lib"
"test-debug": "DEBUG=node-cba-netbank yarn test -- --runInBand",
"test-coveralls": "yarn test-debug && cat ./coverage/lcov.info | coveralls",
"clean": "rm -rf ./log/* ./coverage ./dist"
},
"repository": "twang2218/node-cba-netbank",
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion test/api.test.js
Expand Up @@ -4,7 +4,8 @@
const nock = require('nock');
const fs = require('fs');
const path = require('path');
const api = require('../src/api');
// use `dist` version of api, so the babel output is also tested.
const api = require('..');
const debug = require('debug')('node-cba-netbank');

// jasmine.DEFAULT_TIMEOUT_INTERVAL = 600000;
Expand Down

0 comments on commit 10372fe

Please sign in to comment.