Skip to content

Commit a370b71

Browse files
getting close on build
no System.register still microsoft/TypeScript#2616 (comment)
1 parent 8dca84a commit a370b71

File tree

385 files changed

+37873
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+37873
-6
lines changed

aurelia-ts/gulpfile.js

+131-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,56 @@ var runSequence = require('run-sequence');
44
var ts = require('gulp-typescript');
55
var merge = require('merge2');
66

7+
gulp.task('build-ts', [
8+
'build-ts-system',
9+
'build-ts-amd',
10+
'build-ts-commonjs',
11+
'build-ts-es6'
12+
], function() {});
713

8-
gulp.task('build-ts', function () {
14+
gulp.task('build-ts-amd', function() {
15+
var tsResult = gulp.src([
16+
'./aurelia-dts/**/*.d.ts'
17+
,'./animator-css/*.ts'
18+
,'./app-contacts/*.ts'
19+
,'./binding/*.ts'
20+
,'./bootstrapper/*.ts'
21+
,'./dependency-injection/*.ts'
22+
,'./event-aggregator/*.ts'
23+
,'./framework/*.ts'
24+
,'./history/*.ts'
25+
,'./history-browser/*.ts'
26+
,'./html-template-element/*.ts'
27+
,'./http-client/*.ts'
28+
,'./loader/*.ts'
29+
,'./loader-default/*.ts'
30+
,'./logging/*.ts'
31+
,'./metadata/*.ts'
32+
,'./path/*.ts'
33+
,'./router/*.ts'
34+
,'./route-recognizer/*.ts'
35+
,'./skeleton-navigation/*.ts'
36+
,'./skeleton-plugin/*.ts'
37+
,'./task-queue/*.ts'
38+
,'./templating/*.ts'
39+
,'./templating-binding/*.ts'
40+
,'./templating-resources/*.ts'
41+
,'./templating-router/*.ts'
42+
],
43+
{base: "."})// tsProject.src() // instead of gulp.src(...)
44+
.pipe(ts({
45+
typescript: require('typescript'),
46+
declarationFiles: false,
47+
noExternalResolve: true,
48+
target: "es5",
49+
module: "amd",
50+
emitDecoratorMetadata: true
51+
}));
952

10-
var tsProject = ts.createProject('tsconfig.json');
53+
return tsResult.js.pipe(gulp.dest('../dist/amd'));
54+
});
1155

56+
gulp.task('build-ts-es6', function() {
1257
var tsResult = gulp.src([
1358
'./aurelia-dts/**/*.d.ts'
1459
,'./animator-css/*.ts'
@@ -43,15 +88,95 @@ gulp.task('build-ts', function () {
4388
declarationFiles: false,
4489
noExternalResolve: true,
4590
target: "es6",
46-
module: "system",
91+
module: "es6",
4792
emitDecoratorMetadata: true
4893
}));
4994

50-
console.log("hello");
95+
return tsResult.js.pipe(gulp.dest('../dist/es6'));
96+
});
5197

52-
return tsResult.js.pipe(gulp.dest('../dist/system'));
98+
gulp.task('build-ts-commonjs', function() {
99+
var tsResult = gulp.src([
100+
'./aurelia-dts/**/*.d.ts'
101+
,'./animator-css/*.ts'
102+
,'./app-contacts/*.ts'
103+
,'./binding/*.ts'
104+
,'./bootstrapper/*.ts'
105+
,'./dependency-injection/*.ts'
106+
,'./event-aggregator/*.ts'
107+
,'./framework/*.ts'
108+
,'./history/*.ts'
109+
,'./history-browser/*.ts'
110+
,'./html-template-element/*.ts'
111+
,'./http-client/*.ts'
112+
,'./loader/*.ts'
113+
,'./loader-default/*.ts'
114+
,'./logging/*.ts'
115+
,'./metadata/*.ts'
116+
,'./path/*.ts'
117+
,'./router/*.ts'
118+
,'./route-recognizer/*.ts'
119+
,'./skeleton-navigation/*.ts'
120+
,'./skeleton-plugin/*.ts'
121+
,'./task-queue/*.ts'
122+
,'./templating/*.ts'
123+
,'./templating-binding/*.ts'
124+
,'./templating-resources/*.ts'
125+
,'./templating-router/*.ts'
126+
],
127+
{base: "."})// tsProject.src() // instead of gulp.src(...)
128+
.pipe(ts({
129+
typescript: require('typescript'),
130+
declarationFiles: false,
131+
noExternalResolve: true,
132+
target: "es5",
133+
module: "commonjs",
134+
emitDecoratorMetadata: true
135+
}));
136+
137+
return tsResult.js.pipe(gulp.dest('../dist/commonjs'));
138+
});
139+
140+
gulp.task('build-ts-system', function () {
141+
var tsResult = gulp.src([
142+
'./aurelia-dts/**/*.d.ts'
143+
,'./animator-css/*.ts'
144+
,'./app-contacts/*.ts'
145+
,'./binding/*.ts'
146+
,'./bootstrapper/*.ts'
147+
,'./dependency-injection/*.ts'
148+
,'./event-aggregator/*.ts'
149+
,'./framework/*.ts'
150+
,'./history/*.ts'
151+
,'./history-browser/*.ts'
152+
,'./html-template-element/*.ts'
153+
,'./http-client/*.ts'
154+
,'./loader/*.ts'
155+
,'./loader-default/*.ts'
156+
,'./logging/*.ts'
157+
,'./metadata/*.ts'
158+
,'./path/*.ts'
159+
,'./router/*.ts'
160+
,'./route-recognizer/*.ts'
161+
,'./skeleton-navigation/*.ts'
162+
,'./skeleton-plugin/*.ts'
163+
,'./task-queue/*.ts'
164+
,'./templating/*.ts'
165+
,'./templating-binding/*.ts'
166+
,'./templating-resources/*.ts'
167+
,'./templating-router/*.ts'
168+
],
169+
{base: "."})// tsProject.src() // instead of gulp.src(...)
170+
.pipe(ts({
171+
typescript: require('typescript'),
172+
declarationFiles: false,
173+
noExternalResolve: true,
174+
target: "es6",
175+
module: "systemjs",
176+
emitDecoratorMetadata: true
177+
}));
53178

54-
// return tsResult.js.pipe('release');
179+
return tsResult.js.pipe(gulp.dest('../dist/system'));
55180
});
56181

57182
var path = {

0 commit comments

Comments
 (0)