Last active
May 14, 2018 18:24
-
-
Save alexandervalencia/01e66c58cecbaad64f0aa15137840777 to your computer and use it in GitHub Desktop.
liferay-theme-typescript-hook/index.js
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 path = require('path'); | |
var ts = require('gulp-typescript'); | |
var tsProject = ts.createProject('tsconfig.json'); | |
module.exports = function(gulp, options) { | |
var runSquence = require('run-sequence').use(gulp); | |
var pathBuild = options.pathBuild; | |
gulp.task('typescript:compile', function() { | |
return tsProject.src() | |
.pipe(tsProject()) | |
.js.pipe(gulp.dest(path.join(pathBuild, 'js'))); | |
}); | |
gulp.hook('after:build:src', function(done) { | |
runSquence( | |
'typescript:compile', | |
done | |
); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment