now using better babel config
This commit is contained in:
parent
aa0a35f258
commit
6587b74a23
1
dist/npmts.cli.d.ts
vendored
1
dist/npmts.cli.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
import "typings-global";
|
|
2
dist/npmts.cli.js
vendored
2
dist/npmts.cli.js
vendored
@ -1,2 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
require("typings-global");
|
|
2
dist/npmts.compile.js
vendored
2
dist/npmts.compile.js
vendored
@ -9,7 +9,7 @@ var compileTs = function (tsFileArrayArg, tsOptionsArg) {
|
|||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
var tsOptionsDefault = {
|
var tsOptionsDefault = {
|
||||||
declaration: true,
|
declaration: true,
|
||||||
target: "ES5",
|
target: "ES6",
|
||||||
module: "commonjs"
|
module: "commonjs"
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
3
dist/npmts.plugins.d.ts
vendored
3
dist/npmts.plugins.d.ts
vendored
@ -3,7 +3,7 @@ export import beautylog = require("beautylog");
|
|||||||
export declare let gulp: any;
|
export declare let gulp: any;
|
||||||
export declare let g: {
|
export declare let g: {
|
||||||
babel: any;
|
babel: any;
|
||||||
babelIstanbul: any;
|
istanbul: any;
|
||||||
gFunction: any;
|
gFunction: any;
|
||||||
injectModules: any;
|
injectModules: any;
|
||||||
mocha: any;
|
mocha: any;
|
||||||
@ -11,6 +11,7 @@ export declare let g: {
|
|||||||
sourcemaps: any;
|
sourcemaps: any;
|
||||||
typedoc: any;
|
typedoc: any;
|
||||||
};
|
};
|
||||||
|
import "babel-preset-es2015";
|
||||||
export declare let lodashObject: any;
|
export declare let lodashObject: any;
|
||||||
export declare let merge2: any;
|
export declare let merge2: any;
|
||||||
export import projectinfo = require("projectinfo");
|
export import projectinfo = require("projectinfo");
|
||||||
|
3
dist/npmts.plugins.js
vendored
3
dist/npmts.plugins.js
vendored
@ -4,7 +4,7 @@ exports.beautylog = require("beautylog");
|
|||||||
exports.gulp = require("gulp");
|
exports.gulp = require("gulp");
|
||||||
exports.g = {
|
exports.g = {
|
||||||
babel: require("gulp-babel"),
|
babel: require("gulp-babel"),
|
||||||
babelIstanbul: require("gulp-babel-istanbul"),
|
istanbul: require("gulp-istanbul"),
|
||||||
gFunction: require("gulp-function"),
|
gFunction: require("gulp-function"),
|
||||||
injectModules: require("gulp-inject-modules"),
|
injectModules: require("gulp-inject-modules"),
|
||||||
mocha: require("gulp-mocha"),
|
mocha: require("gulp-mocha"),
|
||||||
@ -12,6 +12,7 @@ exports.g = {
|
|||||||
sourcemaps: require("gulp-sourcemaps"),
|
sourcemaps: require("gulp-sourcemaps"),
|
||||||
typedoc: require("gulp-typedoc")
|
typedoc: require("gulp-typedoc")
|
||||||
};
|
};
|
||||||
|
require("babel-preset-es2015");
|
||||||
exports.lodashObject = require('lodash/fp/object');
|
exports.lodashObject = require('lodash/fp/object');
|
||||||
exports.merge2 = require("merge2");
|
exports.merge2 = require("merge2");
|
||||||
exports.projectinfo = require("projectinfo");
|
exports.projectinfo = require("projectinfo");
|
||||||
|
13
dist/npmts.tests.js
vendored
13
dist/npmts.tests.js
vendored
@ -13,15 +13,20 @@ var mocha = function (configArg) {
|
|||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "dist/*.js")])
|
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "dist/*.js")])
|
||||||
.pipe(plugins.g.sourcemaps.init())
|
.pipe(plugins.g.sourcemaps.init())
|
||||||
.pipe(plugins.g.babelIstanbul())
|
.pipe(plugins.g.babel({
|
||||||
.pipe(plugins.g.babelIstanbul.hookRequire())
|
presets: ['es2015']
|
||||||
|
}))
|
||||||
|
.pipe(plugins.g.istanbul())
|
||||||
.pipe(plugins.g.sourcemaps.write())
|
.pipe(plugins.g.sourcemaps.write())
|
||||||
|
.pipe(plugins.g.injectModules())
|
||||||
.on("finish", function () {
|
.on("finish", function () {
|
||||||
plugins.gulp.src([plugins.path.join(paths.cwd, "test/test.js")])
|
plugins.gulp.src([plugins.path.join(paths.cwd, "test/test.js")])
|
||||||
.pipe(plugins.g.babel())
|
.pipe(plugins.g.babel({
|
||||||
|
presets: ['es2015']
|
||||||
|
}))
|
||||||
.pipe(plugins.g.injectModules())
|
.pipe(plugins.g.injectModules())
|
||||||
.pipe(plugins.g.mocha())
|
.pipe(plugins.g.mocha())
|
||||||
.pipe(plugins.g.babelIstanbul.writeReports())
|
.pipe(plugins.g.istanbul.writeReports())
|
||||||
.pipe(plugins.g.gFunction(function () {
|
.pipe(plugins.g.gFunction(function () {
|
||||||
plugins.beautylog.ok("Tested!");
|
plugins.beautylog.ok("Tested!");
|
||||||
done.resolve(configArg);
|
done.resolve(configArg);
|
||||||
|
@ -34,20 +34,18 @@
|
|||||||
"@types/shelljs": "*",
|
"@types/shelljs": "*",
|
||||||
"beautylog": "5.0.14",
|
"beautylog": "5.0.14",
|
||||||
"early": "^2.0.13",
|
"early": "^2.0.13",
|
||||||
"esdoc": "^0.4.7",
|
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-babel": "^6.1.2",
|
"gulp-babel": "^6.1.2",
|
||||||
"gulp-babel-istanbul": "^1.4.0",
|
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
"gulp-function": "^1.3.6",
|
"gulp-function": "^1.3.6",
|
||||||
"gulp-if": "^2.0.1",
|
"gulp-if": "^2.0.1",
|
||||||
"gulp-inject-modules": "^1.0.0",
|
"gulp-inject-modules": "^1.0.0",
|
||||||
|
"gulp-istanbul": "^1.0.0",
|
||||||
"gulp-mocha": "^2.2.0",
|
"gulp-mocha": "^2.2.0",
|
||||||
"gulp-replace": "^0.5.4",
|
"gulp-replace": "^0.5.4",
|
||||||
"gulp-sourcemaps": "^1.6.0",
|
"gulp-sourcemaps": "^1.6.0",
|
||||||
"gulp-typedoc": "^2.0.0",
|
"gulp-typedoc": "^2.0.0",
|
||||||
"lodash": "^4.13.1",
|
"lodash": "^4.13.1",
|
||||||
"merge2": "1.0.2",
|
|
||||||
"projectinfo": "1.0.3",
|
"projectinfo": "1.0.3",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
"shelljs": "^0.7.0",
|
"shelljs": "^0.7.0",
|
||||||
|
@ -1 +0,0 @@
|
|||||||
import "typings-global";
|
|
@ -10,7 +10,7 @@ let compileTs = (tsFileArrayArg:string[],tsOptionsArg = {}) => {
|
|||||||
|
|
||||||
let tsOptionsDefault = {
|
let tsOptionsDefault = {
|
||||||
declaration: true,
|
declaration: true,
|
||||||
target: "ES5",
|
target: "ES6",
|
||||||
module: "commonjs"
|
module: "commonjs"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ export import beautylog = require("beautylog");
|
|||||||
export let gulp = require("gulp");
|
export let gulp = require("gulp");
|
||||||
export let g = {
|
export let g = {
|
||||||
babel: require("gulp-babel"),
|
babel: require("gulp-babel"),
|
||||||
babelIstanbul: require("gulp-babel-istanbul"),
|
istanbul: require("gulp-istanbul"),
|
||||||
gFunction: require("gulp-function"),
|
gFunction: require("gulp-function"),
|
||||||
injectModules: require("gulp-inject-modules"),
|
injectModules: require("gulp-inject-modules"),
|
||||||
mocha: require("gulp-mocha"),
|
mocha: require("gulp-mocha"),
|
||||||
@ -11,6 +11,7 @@ export let g = {
|
|||||||
sourcemaps: require("gulp-sourcemaps"),
|
sourcemaps: require("gulp-sourcemaps"),
|
||||||
typedoc: require("gulp-typedoc")
|
typedoc: require("gulp-typedoc")
|
||||||
};
|
};
|
||||||
|
import "babel-preset-es2015";
|
||||||
export let lodashObject = require('lodash/fp/object');
|
export let lodashObject = require('lodash/fp/object');
|
||||||
export let merge2 = require("merge2");
|
export let merge2 = require("merge2");
|
||||||
export import projectinfo = require("projectinfo");
|
export import projectinfo = require("projectinfo");
|
||||||
|
@ -13,15 +13,20 @@ let mocha = function (configArg) {
|
|||||||
let done = plugins.Q.defer();
|
let done = plugins.Q.defer();
|
||||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"dist/*.js")])
|
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"dist/*.js")])
|
||||||
.pipe(plugins.g.sourcemaps.init())
|
.pipe(plugins.g.sourcemaps.init())
|
||||||
.pipe(plugins.g.babelIstanbul())
|
.pipe(plugins.g.babel({
|
||||||
.pipe(plugins.g.babelIstanbul.hookRequire())
|
presets: ['es2015']
|
||||||
|
}))
|
||||||
|
.pipe(plugins.g.istanbul())
|
||||||
.pipe(plugins.g.sourcemaps.write())
|
.pipe(plugins.g.sourcemaps.write())
|
||||||
|
.pipe(plugins.g.injectModules())
|
||||||
.on("finish",function(){
|
.on("finish",function(){
|
||||||
plugins.gulp.src([plugins.path.join(paths.cwd,"test/test.js")])
|
plugins.gulp.src([plugins.path.join(paths.cwd,"test/test.js")])
|
||||||
.pipe(plugins.g.babel())
|
.pipe(plugins.g.babel({
|
||||||
|
presets: ['es2015']
|
||||||
|
}))
|
||||||
.pipe(plugins.g.injectModules())
|
.pipe(plugins.g.injectModules())
|
||||||
.pipe(plugins.g.mocha())
|
.pipe(plugins.g.mocha())
|
||||||
.pipe(plugins.g.babelIstanbul.writeReports())
|
.pipe(plugins.g.istanbul.writeReports())
|
||||||
.pipe(plugins.g.gFunction(function(){
|
.pipe(plugins.g.gFunction(function(){
|
||||||
plugins.beautylog.ok("Tested!");
|
plugins.beautylog.ok("Tested!");
|
||||||
done.resolve(configArg);
|
done.resolve(configArg);
|
||||||
|
Loading…
Reference in New Issue
Block a user