From 425bc6150aca68df1297c6e8f1b2d219c007714f Mon Sep 17 00:00:00 2001 From: philkunz Date: Sat, 13 Aug 2016 22:23:11 +0200 Subject: [PATCH] now using require.resolve for getting babel plugins. fixes local dependency issue. --- dist/npmts.tests.js | 2 +- package.json | 2 +- ts/npmts.tests.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/npmts.tests.js b/dist/npmts.tests.js index 8dcd538..d252fe5 100644 --- a/dist/npmts.tests.js +++ b/dist/npmts.tests.js @@ -25,7 +25,7 @@ var mocha = function (configArg) { plugins.gulp.src([plugins.path.join(paths.cwd, "test/test.js")]) .pipe(plugins.g.babel({ presets: [ - plugins.path.join(paths.npmtsPackageRoot, "node_modules/babel-preset-es2015/index.js") + require.resolve("babel-preset-es2015") ] })) .pipe(plugins.g.injectModules()) diff --git a/package.json b/package.json index 01e2014..8451bd5 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "test": "(npm run compile && npm run setupCheck && npm run check && npm run checkVersion && npm run checkNoTest)", "compile": "(rm -rf test/ && rm -r dist/ && mkdir dist/ && tsc && cp assets/cli.js dist/ )", "setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)", - "check": "(cd test && node ../dist/index.js)", + "check": "(cd test && npm install && node ../dist/index.js)", "checkVersion": "(cd test/ && node ../dist/index.js -v)", "checkNoTest": "(cd test && node ../dist/index.js --notest)" }, diff --git a/ts/npmts.tests.ts b/ts/npmts.tests.ts index 81f8d37..4557d28 100644 --- a/ts/npmts.tests.ts +++ b/ts/npmts.tests.ts @@ -26,7 +26,7 @@ let mocha = function (configArg) { plugins.gulp.src([plugins.path.join(paths.cwd,"test/test.js")]) .pipe(plugins.g.babel({ presets: [ - plugins.path.join(paths.npmtsPackageRoot,"node_modules/babel-preset-es2015/index.js") + require.resolve("babel-preset-es2015") ] })) .pipe(plugins.g.injectModules())