fix(build): switch to cjs output for es5.
System output does not work at the current versions of TS and system.js. Will revisit after upgrading TS. Removes unused traceur tooling. Closes #3974
This commit is contained in:
@ -16,7 +16,12 @@ export function evalModule(moduleSource: string, moduleImports: string[][], args
|
||||
var modName = sourceImport[0];
|
||||
var modAlias = sourceImport[1];
|
||||
importModuleNames.push(modName);
|
||||
moduleSourceWithImports.push(`var ${modAlias} = require('${modName}');`);
|
||||
// Note: After transpilation to commonJS and loading this file in a browser
|
||||
// using SystemJS, the loader might get confused by the presence of require,
|
||||
// and attempt to load "+ modName +.js" !?!
|
||||
// A simple string concat manages to prevent that, but that is one compiler
|
||||
// optimaztion away from breaking again. Proceed with caution!
|
||||
moduleSourceWithImports.push(`var ${modAlias} = require` + `('${modName}');`);
|
||||
});
|
||||
moduleSourceWithImports.push(moduleSource);
|
||||
|
||||
|
@ -93,26 +93,3 @@ export class MdInput {
|
||||
ObservableWrapper.callNext(this.mdFocusChange, hasFocus);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Directive({
|
||||
selector: 'md-input-container textarea',
|
||||
events: ['mdChange', 'mdFocusChange'],
|
||||
hostProperties: {
|
||||
'yes': 'class.md-input'
|
||||
},
|
||||
hostListeners: {
|
||||
'input': 'updateValue($event)',
|
||||
'focus': 'setHasFocus(true)',
|
||||
'blur': 'setHasFocus(false)'
|
||||
}
|
||||
})
|
||||
export class MdTextarea extends MdInput {
|
||||
constructor(
|
||||
@Attribute('value') value: string,
|
||||
@SkipSelf() @Host() container: MdInputContainer,
|
||||
@Attribute('id') id: string) {
|
||||
super(value, container, id);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
// tree benchmark in React
|
||||
import {getIntParameter, bindAction} from 'angular2/src/test_lib/benchmark_util';
|
||||
import React from './react.min';
|
||||
import * as React from './react.min';
|
||||
|
||||
var TreeComponent = React.createClass({
|
||||
displayName: 'TreeComponent',
|
||||
|
@ -1,2 +1,2 @@
|
||||
declare var React: any;
|
||||
export default React;
|
||||
export var createElement: Function;
|
||||
export var render: Function;
|
||||
|
@ -34,15 +34,10 @@ describe('sourcemaps', function() {
|
||||
|
||||
var originalPosition = decoder.originalPositionFor({line: errorLine, column: errorColumn});
|
||||
|
||||
var finalMapData = fs.readFileSync('dist/js/prod/es6/examples/src/sourcemap/index.js.map');
|
||||
var finalDecoder = new sourceMap.SourceMapConsumer(JSON.parse(finalMapData));
|
||||
|
||||
var finalPosition = finalDecoder.originalPositionFor(originalPosition);
|
||||
|
||||
var sourceCodeLines =
|
||||
fs.readFileSync('modules/examples/src/sourcemap/index.ts', {encoding: 'UTF-8'})
|
||||
.split('\n');
|
||||
expect(sourceCodeLines[finalPosition.line - 1])
|
||||
expect(sourceCodeLines[originalPosition.line - 1])
|
||||
.toMatch(/throw new BaseException\(\'Sourcemap test\'\)/);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user