-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): Use gulp for building the lib
- Loading branch information
1 parent
5904442
commit d68cf97
Showing
3 changed files
with
1,266 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const ts = require('gulp-typescript'); | ||
const gulp = require('gulp'); | ||
const clean = require('gulp-clean'); | ||
|
||
const { join } = require('path'); | ||
|
||
const DIST = join(__dirname, 'dist'); | ||
const LIB = join(__dirname, 'lib'); | ||
|
||
const terminus = ts.createProject(join(__dirname, 'tsconfig.json')); | ||
|
||
gulp.task('clean', () => { | ||
return gulp.src(DIST).pipe(clean()) | ||
}); | ||
|
||
gulp.task('move', () => { | ||
return gulp | ||
.src(join(LIB, './**/*.proto'), { base: LIB }) | ||
.pipe(gulp.dest(join(DIST))); | ||
}); | ||
|
||
gulp.task('build', () => { | ||
return terminus | ||
.src() | ||
.pipe(terminus()) | ||
.pipe(gulp.dest(DIST)); | ||
}); | ||
|
||
gulp.task('default', gulp.series(['clean', 'build', 'move'])); |
Oops, something went wrong.