mirror of
https://gitlab.silvrtree.co.uk/martind2000/aodb.git
synced 2025-02-11 12:09:16 +00:00
33 lines
859 B
JavaScript
33 lines
859 B
JavaScript
|
|
var gulp = require('gulp'),
|
|
config = require('../gulp.config')(),
|
|
tsc = require('gulp-typescript'),
|
|
tsProject = tsc.createProject('./tsconfig.json'),
|
|
tslint = require('gulp-tslint');
|
|
|
|
var tsSource = ['./tooling/typings/tsd.d.ts',
|
|
'!./app/**/*.spec.ts',
|
|
'./app/**/!(*.spec.ts)*.ts'];
|
|
|
|
module.exports = gulp.task('ts-lint', function () {
|
|
|
|
return gulp.src(tsSource)
|
|
.pipe(tslint({formatter:"verbose"}))
|
|
.pipe(tslint.report());
|
|
});
|
|
|
|
module.exports = gulp.task('compile-js', ['ts-lint'], function () {
|
|
|
|
if (environment !== 'development') {
|
|
tsProject.options.sourceMap = false;
|
|
}
|
|
|
|
gulp.src(config.configurationFile)
|
|
.pipe(gulp.dest('./www/scripts/'));
|
|
|
|
var result = gulp.src(tsSource)
|
|
.pipe(tsProject());
|
|
|
|
return result.js.pipe(gulp.dest('./www/js'));
|
|
});
|