Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. gulp.task('compileTypescript', function () {
  2.   return tsProject.src()
  3.       .pipe(gulpSourcemaps.init())
  4.       .pipe(tsProject())
  5.       .on('error', (error) => {
  6.         notifier.notify({title: "Gulp", message: "Error when compiling TypeScript"});
  7.         console.log(error)
  8.       })
  9.       .js
  10.       .pipe(gulpSourcemaps.write('.'), {
  11.         sourceRoot: function(file) { return file.cwd + '/src'; }
  12.       })
  13.       .pipe(gulp.dest('./build/lib'));
  14. });
  15.  
  16. // сборка в браузерный скрипт
  17. gulp.task('bundle:toolbarButtonScript', function() {
  18.   return browserify('./build/lib/action_button/toolbar_button.js')
  19.         .bundle()
  20.         .pipe(source('toolbar_button_bundle.js'))
  21.         .pipe(gulp.dest('./build/lib/bundles/'));
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement