dyno-bot/Dyno-music-master/gulpfile.js

22 lines
574 B
JavaScript
Raw Permalink Normal View History

2020-09-12 20:08:48 +02:00
const gulp = require('gulp');
const ts = require('gulp-typescript');
const pegjs = require('gulp-pegjs');
const sourcemaps = require('gulp-sourcemaps');
const tsProject = ts.createProject('./tsconfig.json');
gulp.task('ts', function () {
return tsProject.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js
.pipe(sourcemaps.write())
.pipe(gulp.dest('build'));
});
gulp.task('peg', function() {
return gulp.src('src/Parser.pegjs')
.pipe(pegjs({ format: 'commonjs' }))
.pipe(gulp.dest('build'));
});
gulp.task('build', ['ts', 'peg']);