-
-
Save Solomko2/768c38757139668dc3ff75b1694d9201 to your computer and use it in GitHub Desktop.
Angular2 compilation
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
'use strict'; | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var ts = require('gulp-typescript'); | |
var tsProject = ts.createProject('tsconfig.json', {typescript: require('typescript')}); | |
var paths = { | |
sass: ['./resources/sass/**/*.scss'], | |
ts: ['./resources/app/**/*.ts'], | |
css: './css', | |
} | |
gulp.task('sass', function () { | |
return gulp.src(paths.sass) | |
.pipe(sass().on('error', sass.logError)) | |
.pipe(gulp.dest(paths.css)); | |
}); | |
gulp.task('ts', function() { | |
var tsResult = tsProject.src() | |
.pipe(ts(tsProject)); | |
return tsResult.js.pipe(gulp.dest('./app')); | |
}); | |
gulp.task('default', ['sass', 'ts']); | |
gulp.task('watch', function () { | |
gulp.watch(paths.sass, ['sass']); | |
gulp.watch(paths.ts, ['ts']); | |
}); |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "system", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"removeComments": false, | |
"noImplicitAny": false, | |
"rootDir": "resources/app/", | |
"outDir": "app/" | |
}, | |
"exclude": [ | |
"node_modules" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment