fix(docs): make them run again and integrate into ci

This commit is contained in:
Tobias Bosch 2015-02-26 15:38:12 -08:00
parent 5cbb174a6d
commit e490861ba2
7 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,5 @@
require('../../tools/transpiler/index.js').init();
var Package = require('dgeni').Package;
var jsdocPackage = require('dgeni-packages/jsdoc');
var nunjucksPackage = require('dgeni-packages/nunjucks');

View File

@ -1,5 +1,3 @@
var traceur = require('traceur/src/node/traceur.js');
module.exports = function TraceurParser() {
return System.get(System.map.traceur + '/src/syntax/Parser.js').Parser;
return System.get('transpiler/src/parser').Parser;
};

View File

@ -19,8 +19,8 @@ describe('atParser service', function() {
'export class Inject {\n' +
'token;\n' +
'@CONST()\n' +
'constructor(token) {\n' +
'this.token = token;\n' +
'constructor({a,b}:{a:string, b:string}) {\n' +
'this.token = a;\n' +
'}\n' +
'}';
@ -54,7 +54,7 @@ describe('atParser service', function() {
relativePath: 'di/src/annotations.js'
});
expect(result.moduleTree.moduleName).toEqual('di/annotations');
expect(result.moduleTree.moduleName).toEqual('di/src/annotations');
expect(result.moduleTree.scriptItemList[0].type).toEqual('IMPORT_DECLARATION');
expect(result.moduleTree.scriptItemList[1].type).toEqual('EXPORT_DECLARATION');

View File

@ -1,5 +1,3 @@
var traceur = require('traceur/src/node/traceur.js');
module.exports = function traceurOptions() {
return traceur.options;
return System.get(System.map.traceur + '/src/Options.js').options;
};

View File

@ -8,4 +8,4 @@ SCRIPT_DIR=$(dirname $0)
source $SCRIPT_DIR/env_dart.sh
cd $SCRIPT_DIR/../..
./node_modules/.bin/gulp build.js
./node_modules/.bin/gulp build.js docs

View File

@ -8,4 +8,5 @@ source $SCRIPT_DIR/env_dart.sh
cd $SCRIPT_DIR/../..
./node_modules/.bin/gulp test.transpiler.unittest
./node_modules/.bin/gulp docs/test
./node_modules/.bin/gulp test.unit.js/ci --browsers=$KARMA_BROWSERS

View File

@ -64,6 +64,13 @@ exports.compile = function compile(options, paths, source) {
return result;
};
exports.init = function() {
if (needsReload) {
reloadCompiler();
needsReload = false;
}
}
// Transpile and evaluate the code in `src`.
// Use existing traceur to compile our sources.
function reloadCompiler() {