Skip to content

Commit

Permalink
feat(build): update compiler and switch to register module format
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jan 6, 2015
1 parent d14d07f commit 63c5d36
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 50 deletions.
14 changes: 7 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"url": "http://github.com/aurelia/framework"
},
"dependencies": {
"aurelia-binding": "0.1.2",
"aurelia-dependency-injection": "0.1.1",
"aurelia-loader": "0.2.0",
"aurelia-logging": "0.1.1",
"aurelia-metadata": "0.1.1",
"aurelia-task-queue": "0.1.1",
"aurelia-templating": "0.4.0"
"aurelia-binding": "0.2.0",
"aurelia-dependency-injection": "0.2.1",
"aurelia-loader": "0.3.0",
"aurelia-logging": "0.2.0",
"aurelia-metadata": "0.2.3",
"aurelia-task-queue": "0.2.0",
"aurelia-templating": "0.5.0"
}
}
62 changes: 35 additions & 27 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,50 @@
System.config({
"paths": {
"*": "*.js",
"github:*": "jspm_packages/github/*.js"
"github:*": "jspm_packages/github/*.js",
"aurelia-framework/*": "dist/*.js",
"npm:*": "jspm_packages/npm/*.js"
}
});

System.config({
"map": {
"aurelia-binding": "github:aurelia/binding@0.1.2",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.1.1",
"aurelia-loader": "github:aurelia/loader@0.2.0",
"aurelia-logging": "github:aurelia/logging@0.1.1",
"aurelia-metadata": "github:aurelia/metadata@0.1.1",
"aurelia-task-queue": "github:aurelia/task-queue@0.1.1",
"aurelia-templating": "github:aurelia/templating@0.4.0",
"github:aurelia/binding@0.1.2": {
"aurelia-metadata": "github:aurelia/metadata@0.1.1",
"aurelia-task-queue": "github:aurelia/task-queue@0.1.1"
"aurelia-binding": "github:aurelia/binding@0.2.0",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.2.1",
"aurelia-loader": "github:aurelia/loader@0.3.0",
"aurelia-logging": "github:aurelia/logging@0.2.0",
"aurelia-metadata": "github:aurelia/metadata@0.2.3",
"aurelia-task-queue": "github:aurelia/task-queue@0.2.0",
"aurelia-templating": "github:aurelia/templating@0.5.0",
"github:aurelia/binding@0.2.0": {
"aurelia-metadata": "github:aurelia/metadata@0.2.3",
"aurelia-task-queue": "github:aurelia/task-queue@0.2.0"
},
"github:aurelia/dependency-injection@0.1.1": {
"aurelia-metadata": "github:aurelia/metadata@0.1.1",
"es6-shim": "github:paulmillr/es6-shim@0.21.1"
"github:aurelia/dependency-injection@0.2.1": {
"aurelia-metadata": "github:aurelia/metadata@0.2.3",
"core-js": "npm:core-js@0.4.1"
},
"github:aurelia/loader@0.2.0": {
"aurelia-html-template-element": "github:aurelia/html-template-element@0.1.1",
"es6-shim": "github:paulmillr/es6-shim@0.21.1",
"github:aurelia/loader@0.3.0": {
"aurelia-html-template-element": "github:aurelia/html-template-element@0.1.2",
"core-js": "npm:core-js@0.4.1",
"webcomponentsjs": "github:webcomponents/webcomponentsjs@0.5.2"
},
"github:aurelia/templating@0.4.0": {
"aurelia-binding": "github:aurelia/binding@0.1.2",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.1.1",
"aurelia-html-template-element": "github:aurelia/html-template-element@0.1.1",
"aurelia-loader": "github:aurelia/loader@0.2.0",
"aurelia-logging": "github:aurelia/logging@0.1.1",
"aurelia-metadata": "github:aurelia/metadata@0.1.1",
"aurelia-path": "github:aurelia/path@0.3.0",
"aurelia-task-queue": "github:aurelia/task-queue@0.1.1",
"es6-shim": "github:paulmillr/es6-shim@0.21.1"
"github:aurelia/templating@0.5.0": {
"aurelia-binding": "github:aurelia/binding@0.2.0",
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.2.1",
"aurelia-html-template-element": "github:aurelia/html-template-element@0.1.2",
"aurelia-loader": "github:aurelia/loader@0.3.0",
"aurelia-logging": "github:aurelia/logging@0.2.0",
"aurelia-metadata": "github:aurelia/metadata@0.2.3",
"aurelia-path": "github:aurelia/path@0.4.0",
"aurelia-task-queue": "github:aurelia/task-queue@0.2.0",
"core-js": "npm:core-js@0.4.1"
},
"github:jspm/nodelibs-process@0.1.0": {
"process": "npm:process@0.10.0"
},
"npm:core-js@0.4.1": {
"process": "github:jspm/nodelibs-process@0.1.0"
}
}
});
Expand Down
23 changes: 19 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,19 @@ var compilerOptions = {
sourceFileName: '',
sourceRoot: '',
moduleRoot: '',
amdModuleIds: false,
moduleIds: false,
runtime: false,
comments: false,
experimental: false
experimental: false,
format: {
comments: false,
compact: false,
indent: {
parentheses: true,
adjustMultilineComment: true,
style: " ",
base: 0
}
}
};

var jshintConfig = {esnext:true};
Expand All @@ -59,6 +68,12 @@ gulp.task('build-amd', function () {
.pipe(gulp.dest(path.output + 'amd'));
});

gulp.task('build-system', function () {
return gulp.src(path.source)
.pipe(to5(assign({}, compilerOptions, {modules:'system'})))
.pipe(gulp.dest(path.output + 'system'));
});

gulp.task('lint', function() {
return gulp.src(path.source)
.pipe(jshint(jshintConfig))
Expand Down Expand Up @@ -96,7 +111,7 @@ gulp.task('changelog', function(callback) {
gulp.task('build', function(callback) {
return runSequence(
'clean',
['build-es6', 'build-commonjs', 'build-amd'],
['build-es6', 'build-commonjs', 'build-amd', 'build-system'],
callback
);
});
Expand Down
8 changes: 7 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ module.exports = function(config) {
'test/**/*.js': ['6to5'],
'src/**/*.js': ['6to5']
},

'6to5Preprocessor': {
options: {
sourceMap: 'inline',
modules: 'system',
moduleIds: false
}
},

// test results reporter to use
// possible values: 'dots', 'progress'
Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,34 @@
"url": "http://github.com/aurelia/framework"
},
"jspm": {
"main": "amd/index",
"main": "system/index",
"format": "register",
"directories": {
"lib": "dist"
},
"dependencies": {
"aurelia-binding": "^0.1.2",
"aurelia-dependency-injection": "^0.1.1",
"aurelia-loader": "^0.2.0",
"aurelia-logging": "^0.1.1",
"aurelia-metadata": "^0.1.1",
"aurelia-task-queue": "^0.1.1",
"aurelia-templating": "^0.4.0"
"aurelia-binding": "^0.2.0",
"aurelia-dependency-injection": "^0.2.1",
"aurelia-loader": "^0.3.0",
"aurelia-logging": "^0.2.0",
"aurelia-metadata": "^0.2.3",
"aurelia-task-queue": "^0.2.0",
"aurelia-templating": "^0.5.0"
}
},
"devDependencies": {
"aurelia-tools": "git://github.com/aurelia/tools.git",
"conventional-changelog": "0.0.11",
"del": "^1.1.0",
"gulp": "^3.8.10",
"gulp-6to5": "^1.0.2",
"gulp-6to5": "^2.0.0",
"gulp-bump": "^0.1.11",
"gulp-jshint": "^1.9.0",
"gulp-yuidoc": "^0.1.2",
"jasmine-core": "^2.1.3",
"jshint-stylish": "^1.0.0",
"karma": "^0.12.28",
"karma-6to5-preprocessor": "^0.1.3",
"karma-6to5-preprocessor": "^1.0.0",
"karma-chrome-launcher": "^0.1.7",
"karma-jasmine": "^0.3.2",
"karma-jspm": "^1.0.1",
Expand All @@ -67,7 +68,7 @@
},
{
"rel": "describedby",
"mediaType": "application/yuidoc+json",
"mediaType": "application/aurelia-doc+json",
"title": "API",
"href": "doc/api.json"
},
Expand Down

0 comments on commit 63c5d36

Please sign in to comment.