Skip to content

Commit

Permalink
chore(Build): rename .es6 files to .js
Browse files Browse the repository at this point in the history
Change es6 source files in npm distribution to use .js extensions.

Closes angular#2447
  • Loading branch information
robwormald committed Jun 10, 2015
1 parent ddd5a23 commit 62267f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ gulp.task('!build.js.cjs', function() {

var bundleConfig = {
paths: {
"*": "dist/js/prod/es6/*.es6",
"*": "dist/js/prod/es6/*.js",
"rx": "node_modules/rx/dist/rx.js"
},
meta: {
Expand Down Expand Up @@ -735,7 +735,7 @@ gulp.task('bundle.js.dev', ['build.js.dev'], function() {
var devBundleConfig = merge(true, bundleConfig);
devBundleConfig.paths =
merge(true, devBundleConfig.paths, {
"*": "dist/js/dev/es6/*.es6"
"*": "dist/js/dev/es6/*.js"
});
return bundler.bundle(
devBundleConfig,
Expand All @@ -748,7 +748,7 @@ gulp.task('router.bundle.js.dev', ['build.js.dev'], function() {
var devBundleConfig = merge(true, bundleConfig);
devBundleConfig.paths =
merge(true, devBundleConfig.paths, {
"*": "dist/js/dev/es6/*.es6"
"*": "dist/js/dev/es6/*.js"
});
return bundler.bundle(
devBundleConfig,
Expand All @@ -766,7 +766,7 @@ gulp.task('bundle.js.sfx.dev', ['build.js.dev'], function() {
var devBundleConfig = merge(true, bundleConfig);
devBundleConfig.paths =
merge(true, devBundleConfig.paths, {
'*': 'dist/js/dev/es6/*.es6'
'*': 'dist/js/dev/es6/*.js'
});
return bundler.bundle(
devBundleConfig,
Expand Down
2 changes: 1 addition & 1 deletion modules/examples/e2e_test/sourcemap/sourcemap_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('sourcemaps', function() {

var originalPosition = decoder.originalPositionFor({line: errorLine, column: errorColumn});

var finalMapData = fs.readFileSync('dist/js/prod/es6/examples/src/sourcemap/index.es6.map');
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);
Expand Down
3 changes: 1 addition & 2 deletions tools/broccoli/trees/browser_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = function makeBrowserTree(options, destinationPath) {

// Use Traceur to transpile *.js sources to ES6
var traceurTree = transpileWithTraceur(modulesTree, {
destExtension: '.es6',
destExtension: '.js',
destSourceMapExtension: '.map',
traceurOptions: {
sourceMaps: true,
Expand Down Expand Up @@ -93,7 +93,6 @@ module.exports = function makeBrowserTree(options, destinationPath) {
sourceRoot: '.',
target: 'ES6'
});
typescriptTree = stew.rename(typescriptTree, '.js', '.es6');

var es6Tree = mergeTrees([traceurTree, typescriptTree]);

Expand Down

0 comments on commit 62267f8

Please sign in to comment.