forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulp-jspm-tests.ts
33 lines (27 loc) · 1.04 KB
/
gulp-jspm-tests.ts
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
30
31
32
33
/// <reference path="gulp-jspm.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
import * as gulp from 'gulp';
import * as gulpJspm from 'gulp-jspm';
// Examples taken from https://www.npmjs.com/package/gulp-jspm
gulp.task('default', function(){
return gulp.src('src/main.js')
.pipe(gulpJspm())
.pipe(gulp.dest('build/'));
});
// Options
gulp.src('src/main.js')
.pipe(gulpJspm({arithmetic: '- message'})) // exclude message.js from bundle
.pipe(gulp.dest('build/'));
gulp.src('src/main.js')
.pipe(gulpJspm({selfExecutingBundle: true})) // `jspm bundle-sfx main`
.pipe(gulp.dest('build/'));
gulp.src('src/main.jsx')
.pipe(gulpJspm({plugin: true})) // `jspm bundle main.jsx!`
.pipe(gulp.dest('build/'));
gulp.src('src/main.jsx')
.pipe(gulpJspm({plugin: 'jsx'})) // `jspm bundle main.jsx!jsx`
.pipe(gulp.dest('build/'));
// all other options given to gulp-jspm are passed on to jspm, e.g.
gulp.src('src/main.js')
.pipe(gulpJspm({inject: true})) // `jspm bundle main --inject`
.pipe(gulp.dest('build/'));