now using require.resolve for getting babel plugins. fixes local dependency issue.

This commit is contained in:
Philipp Kunz 2016-08-13 22:23:11 +02:00
parent b2aaa51882
commit 425bc6150a
3 changed files with 3 additions and 3 deletions

2
dist/npmts.tests.js vendored
View File

@ -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())

View File

@ -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)"
},

View File

@ -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())