Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex, tidy up npm scripts #5

Merged
merged 2 commits into from
Jul 13, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"example": "cd example && ./../node_modules/.bin/babel-node app.js",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"prepublish": "npm run lint && npm run build",
"lint": "./node_modules/.bin/eslint ./src",
"test": "./node_modules/.bin/babel-node -- ./node_modules/.bin/babel-istanbul cover --report lcov _mocha "
"lint": "eslint ./src",
"test": "babel-node -- ./node_modules/.bin/babel-istanbul cover --report lcov _mocha "
Copy link
Member

@Ehesp Ehesp Jul 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine to remove ./node_modules/.bin for babel-istanbul too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that and it breaks the script. I think this is due to it not been called from an npm run command. My understanding is that here the output from babel-node (replaced with node in the other PR #7) pipes it's output to Istanbul?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, so it does. Once everything is sorted es6 wise we can review the tests/coverage etc.

},
"devDependencies": {
"babel-cli": "^6.14.0",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/loader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { loadPackageJSON, mergeDeep } from './../utils';

const hookPrefix = 'redibox-hook';
const hookRegexReplace = new RegExp(`@?[a-zA-Z-_0-9.]*?\/?${hookPrefix}-`);
const hookRegexReplace = new RegExp(`@?[a-zA-Z-_0-9.]*?${hookPrefix}-`);

/**
*
Expand Down