From de146001a76d22f36973ab21cfdb83fe23dd36d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bazyli=20Brzo=CC=81ska?= Date: Thu, 16 Jun 2016 01:59:43 +0200 Subject: [PATCH] fix(index): do not normalize when undefined fixes #32 --- package.json | 12 ++++++------ src/index.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 9e28f1c..522451c 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "url": "http://github.com/aurelia/webpack-plugin" }, "dependencies": { - "babel-runtime": "^6.9.0", + "babel-runtime": "^6.9.2", "bluebird": "^3.4.0", "cheerio": "^0.20.0", "object.assign": "^4.0.3", @@ -41,8 +41,8 @@ "webpack": ">=1.12.0 || >=2.0.0-beta || >=2.1.0-beta" }, "devDependencies": { - "aurelia-tools": "^0.2.0", - "babel-dts-generator": "^0.5.0", + "aurelia-tools": "^0.2.1", + "babel-dts-generator": "^0.5.1", "babel-eslint": "^6.0.4", "babel-plugin-syntax-async-functions": "^6.8.0", "babel-plugin-syntax-flow": "^6.8.0", @@ -65,12 +65,12 @@ "gulp-rename": "^1.2.2", "gulp-typedoc": "^2.0.0", "gulp-typedoc-extractor": "0.0.8", - "mocha": "^2.4.5", + "mocha": "^2.5.3", "require-dir": "^0.3.0", "rimraf": "^2.5.2", - "run-sequence": "^1.2.0", + "run-sequence": "^1.2.1", "through2": "^2.0.1", - "typedoc": "^0.3.12", + "typedoc": "^0.4.3", "vinyl": "^1.1.1", "vinyl-paths": "^2.1.0", "yargs": "^4.7.1" diff --git a/src/index.js b/src/index.js index 4426c69..171f56f 100644 --- a/src/index.js +++ b/src/index.js @@ -4,8 +4,8 @@ var resolveTemplates = require('./resolve-template'); class AureliaWebpackPlugin { constructor(options = {}) { - options.root = path.normalizeSafe(options.root) || path.dirname(module.parent.filename); - options.src = path.normalizeSafe(options.src) || path.resolve(options.root, 'src'); + options.root = options.root ? path.normalizeSafe(options.root) : path.dirname(module.parent.filename); + options.src = options.src ? path.normalizeSafe(options.src) : path.resolve(options.root, 'src'); options.resourceRegExp = options.resourceRegExp || /aurelia-loader-context/; this.options = options;