forked from formio/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
29 lines (29 loc) · 948 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
'use strict';
const gulp = require('gulp');
const gulpsync = require('gulp-sync')(gulp);
const replace = require('gulp-replace');
const inject = require('gulp-js-text-inject');
const sass = require('gulp-sass');
const cleanCSS = require('gulp-clean-css');
var exec = require('child_process').exec;
gulp.task('styles', () => {
return gulp.src(['./src/formio.component.scss'])
.pipe(sass().on('error', sass.logError))
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(gulp.dest('src'));
});
gulp.task('inline-style', () => {
return gulp.src(['./src/formio.component.js'])
.pipe(inject({
basepath: 'src/'
}))
.pipe(gulp.dest('src'));
});
gulp.task('scripts', (done) => {
exec('ngc -p "tsconfig.json"', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
done();
});
});
gulp.task('build', gulpsync.sync([['styles'], ['scripts'], 'inline-style']));