remove babel and instead use typescript

This commit is contained in:
2017-01-15 20:01:10 +01:00
parent aca85d2ff3
commit 78d77c003c
6 changed files with 50 additions and 35 deletions

32
dist/mod02/index.js vendored
View File

@ -1,4 +1,12 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
/* ------------------------------------------
* This module tests the compiled TypeScript files
* -------------------------------------------- */
@ -15,15 +23,19 @@ let mocha = function (configArg) {
npmts_log_1.npmtsOra.end(); // end npmtsOra for tests.
let done = q.defer();
let coverageSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, './dist/**/*.js')]),
plugins.gulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
plugins.gulpSourcemaps.init(),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
plugins.gulpTypeScript({
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true
}),
plugins.gulpIstanbul({}),
plugins.gulpSourcemaps.write(),
plugins.gulpFunction.forEach((file) => __awaiter(this, void 0, void 0, function* () {
file.path = file.path.replace(paths.tsDir, paths.distDir);
console.log(file.path);
})),
plugins.gulpInjectModules(),
plugins.through2.obj((file, enc, cb) => {
cb();
@ -32,11 +44,11 @@ let mocha = function (configArg) {
})
]);
let localSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
plugins.gulpBabel({
presets: [
require.resolve('babel-preset-es2015')
]
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.ts')]),
plugins.gulpTypeScript({
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true
}),
plugins.gulpInjectModules(),
plugins.gulpMocha(),

View File

@ -1,9 +1,9 @@
export * from '../npmts.plugins';
import * as gulp from 'gulp';
import * as gulpBabel from 'gulp-babel';
import * as gulpIstanbul from 'gulp-istanbul';
import * as gulpFunction from 'gulp-function';
import * as gulpIstanbul from 'gulp-istanbul';
declare let gulpInjectModules: any;
import * as gulpMocha from 'gulp-mocha';
import * as gulpSourcemaps from 'gulp-sourcemaps';
export { gulp, gulpBabel, gulpIstanbul, gulpFunction, gulpInjectModules, gulpMocha, gulpSourcemaps };
import * as gulpTypeScript from 'gulp-typescript';
export { gulp, gulpFunction, gulpIstanbul, gulpInjectModules, gulpMocha, gulpSourcemaps, gulpTypeScript };

View File

@ -5,15 +5,15 @@ function __export(m) {
__export(require("../npmts.plugins"));
const gulp = require("gulp");
exports.gulp = gulp;
const gulpBabel = require("gulp-babel");
exports.gulpBabel = gulpBabel;
const gulpIstanbul = require("gulp-istanbul");
exports.gulpIstanbul = gulpIstanbul;
const gulpFunction = require("gulp-function");
exports.gulpFunction = gulpFunction;
const gulpIstanbul = require("gulp-istanbul");
exports.gulpIstanbul = gulpIstanbul;
let gulpInjectModules = require('gulp-inject-modules');
exports.gulpInjectModules = gulpInjectModules;
const gulpMocha = require("gulp-mocha");
exports.gulpMocha = gulpMocha;
const gulpSourcemaps = require("gulp-sourcemaps");
exports.gulpSourcemaps = gulpSourcemaps;
const gulpTypeScript = require("gulp-typescript");
exports.gulpTypeScript = gulpTypeScript;