developer-gulp
v0.1.0
Published
this is metadata for gulp ...
Downloads
1
Readme
developer-gulp
- npm install deveolper-gulp
- npm install ts-node
github for php developer to my pakaglist ...
- import { ITaskOption } from './src/model/gulpinstance';
- import { Gulp, ITask } from './lib/main';
- // let ts = require('gulp-typescript');
- import * as ts from 'gulp-typescript';
- // let sourcemaps = require('gulp-sourcemaps');
- import * as sourcemaps from 'gulp-sourcemaps';
- let tsProject = ts.createProject('tsconfig.json');
- // let del = require('del');
- import * as del from 'del';
- import * as merge from 'merge2';
- @Gulp()
- export class GulpBuilder {
@ITask()
public clean(gulp, info, cb) {
return del(['./dist', './dist/**']);
}
@ITask()
public compile(gulp) {
let tsResult = gulp.src("./src/**/*.ts")
.pipe(sourcemaps.init())
.pipe(tsProject());
return merge([
tsResult.dts.pipe(gulp.dest('./dist')),
tsResult.js.pipe(sourcemaps.write("./sourcemaps"))
.pipe(gulp.dest('./dist'))
]);
}
@ITask(<ITaskOption>{
before: ['clean', 'compile']
})
public build() {
console.log('building ...')
}
- }