Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
fix build system with newest aurelia
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamsi committed Dec 29, 2016
1 parent 53c435f commit 6c0c129
Show file tree
Hide file tree
Showing 76 changed files with 1,154 additions and 15,825 deletions.
17 changes: 15 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ jspm_packages
bower_components
.idea
.DS_STORE
*.swp
build/reports
temp
typings/
dev/
temp/

sample/node_modules
sample/jspm_packages
sample/bower_components
sample/.idea
sample/.DS_STORE
sample/dist
sample/build/reports
sample/coverage
sample/test/e2e/dist
sample/typings
sample/export
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"eg2.tslint",
"HookyQR.beautify",
"joelday.docthis"
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Place your settings in this file to overwrite default and user settings.
{
"typescript.tsdk": "node_modules/typescript/lib"
}
11 changes: 6 additions & 5 deletions build/args.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
var yargs = require('yargs');

var argv = yargs.argv,
validBumpTypes = "major|minor|patch|prerelease".split("|"),
bump = (argv.bump || 'patch').toLowerCase();
var argv = yargs.argv;
var validBumpTypes = 'major|minor|patch|prerelease'.split('|');
var bump = (argv.bump || 'patch').toLowerCase();

if(validBumpTypes.indexOf(bump) === -1) {
if (validBumpTypes.indexOf(bump) === -1) {
throw new Error('Unrecognized bump "' + bump + '".');
}

module.exports = {
bump: bump
bump: bump,
depth: parseInt(argv.depth || '0')
};
55 changes: 45 additions & 10 deletions build/babel-options.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
module.exports = {
modules: 'system',
moduleIds: false,
comments: false,
compact: false,
stage:2,
optional: [
"es7.decorators",
"es7.classProperties"
]
var path = require('path');
var paths = require('./paths');

exports.base = function() {
return {
filename: '',
filenameRelative: '',
sourceMap: true,
sourceRoot: '',
moduleRoot: path.resolve('src').replace(/\\/g, '/'),
moduleIds: false,
comments: false,
compact: false,
code:true,
presets: [ 'es2015-loose', 'stage-1'],
plugins: [
'syntax-flow',
'transform-decorators-legacy',
'transform-flow-strip-types'
]
};
}

exports.commonjs = function() {
var options = exports.base();
options.plugins.push('transform-es2015-modules-commonjs');
return options;
};

exports.amd = function() {
var options = exports.base();
options.plugins.push('transform-es2015-modules-amd');
return options;
};

exports.system = function() {
var options = exports.base();
options.plugins.push('transform-es2015-modules-systemjs');
return options;
};

exports.es2015 = function() {
var options = exports.base();
options.presets = ['stage-1']
return options;
};
22 changes: 5 additions & 17 deletions build/paths.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
var path = require('path');
var outputRoot = 'dist/';
var appRoot = 'src/';

var fs = require('fs');
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var outputRoot = 'dist/';

module.exports = {
root: appRoot,
source: appRoot + '**/*.ts',
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
css: appRoot + '**/*.css',
js: appRoot + '**/*.js',
less: appRoot + '**/*.less',
style: 'styles/**/*.css',
output: outputRoot,
sample: 'sample',
doc:'./doc',
doc: './doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
styleFolder: './styles',
dtsSrc: [
'typings/**/*.ts',
'!./jspm_packages/**/*.d.ts'
],
e2eSpecsDist: 'test/e2e/dist/'
};
20 changes: 20 additions & 0 deletions build/pathsBuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var appRoot = 'src/';
var outputRoot = 'dist/';
var outputDev = './dev';

module.exports = {
root: appRoot,
source: appRoot + '**/*.ts',
html: appRoot + '**/*.html',
css: appRoot + '**/*.css',
json: appRoot + '**/*.json',
js: appRoot + '**/*.js',
woff2: appRoot + '**/*.woff2',
output: outputRoot,
outputDev: outputDev,
doc:'./doc',
dtsSrc: [
'./typings/**/*.d.ts',
'./custom_typings/**/*.d.ts'
]
};
23 changes: 23 additions & 0 deletions build/pathsSample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var appRoot = './sample/src/';
var outputRoot = './sample/dist/';
var plugin = "./dev/"
var fs = require('fs');
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));


module.exports = {
root: appRoot,
source: appRoot + '**/*.ts',
html: appRoot + '**/*.html',
css: appRoot + '**/*.css',
json: appRoot + '**/*.json',
woff2: appRoot + '**/*.woff2',
plugin:plugin,
output: outputRoot,
doc:'./doc',
dtsSrc: [
'./sample/typings/**/*.d.ts',
'./sample/custom_typings/**/*.d.ts'
],
packageName: pkg.name
};
Loading

0 comments on commit 6c0c129

Please sign in to comment.