Skip to content

Commit

Permalink
fix cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
soda-x committed Jul 19, 2016
1 parent e33c4ef commit aa34ea4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"lib"
],
"scripts": {
"build": "rm -rf lib && babel src --out-dir lib --ignore __tests__",
"test": "babel-node node_modules/.bin/babel-istanbul cover node_modules/.bin/_mocha --no-timeouts",
"debug": "./node_modules/.bin/mocha --require babel-core/register --require babel-polyfill --no-timeouts",
"build": "rm -rf lib && babel src --out-dir lib",
"test": "babel-node $(npm bin)/babel-istanbul cover $(npm bin)/_mocha -- --no-timeouts",
"debug": "$(npm bin)/mocha --require babel-core/register --no-timeouts",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"lint": "eslint --ext .js src",
"pub": "npm run build && npm publish && rm -rf lib && git push origin"
Expand Down Expand Up @@ -55,10 +55,10 @@
"webpack": "~1.12.2"
},
"devDependencies": {
"babel-cli": "6.6.x",
"babel-eslint": "^6.0.4",
"babel-cli": "^6.7.5",
"babel-core": "^6.7.6",
"babel-eslint": "^6.1.2",
"babel-istanbul": "^0.7.0",
"babel-polyfill": "^6.7.4",
"coveralls": "~2.11.4",
"eslint": "^2.7.0",
"eslint-config-airbnb": "^6.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/getWebpackCommonConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import rucksack from 'rucksack-css';
import autoprefixer from 'autoprefixer';

export default function getWebpackCommonConfig(args) {
const pkgPath = join(process.cwd(), 'package.json');
const pkgPath = join(args.cwd, 'package.json');
const pkg = existsSync(pkgPath) ? require(pkgPath) : {};

const jsFileName = args.hash ? '[name]-[chunkhash].js' : '[name].js';
Expand All @@ -24,7 +24,7 @@ export default function getWebpackCommonConfig(args) {
let cfgPath = pkg.theme;
// relative path
if (cfgPath.charAt(0) === '.') {
cfgPath = resolve(process.cwd(), cfgPath);
cfgPath = resolve(args.cwd, cfgPath);
}
const getThemeConfig = require(cfgPath);
theme = getThemeConfig();
Expand Down

0 comments on commit aa34ea4

Please sign in to comment.