Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Merge pull request #275 from Robert-Frampton/metal-soy-bundle" #280

Merged
merged 1 commit into from
Oct 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions karma-coverage.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ module.exports = function(config) {
included: true,
served: true
},
{
pattern: 'packages/metal-soy-bundle/build/bundle.js',
watched: false,
included: false,
served: true
},
{
pattern: 'packages/metal-web-component/node_modules/babel-polyfill/dist/polyfill.min.js',
watched: false,
Expand Down Expand Up @@ -71,7 +65,6 @@ module.exports = function(config) {
'packages/metal-incremental-dom/src/incremental-dom.js': ['browserify'],
'packages/metal-incremental-dom/lib/incremental-dom.js': ['browserify'],
'packages/metal-soy-bundle/lib/bundle.js': ['browserify'],
'packages/metal-soy-bundle/build/bundle.js': ['browserify'],
'packages/metal*/test/**/*.js': ['browserify']
},

Expand Down
7 changes: 0 additions & 7 deletions karma-sauce.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ module.exports = function(config) {
included: true,
served: true
},
{
pattern: 'packages/metal-soy-bundle/build/bundle.js',
watched: false,
included: false,
served: true
},
{
pattern: 'packages/metal-web-component/node_modules/babel-polyfill/dist/polyfill.min.js',
watched: false,
Expand Down Expand Up @@ -71,7 +65,6 @@ module.exports = function(config) {
'packages/metal-incremental-dom/src/incremental-dom.js': ['browserify'],
'packages/metal-incremental-dom/lib/incremental-dom.js': ['browserify'],
'packages/metal-soy/node_modules/metal-soy-bundle/lib/bundle.js': ['browserify'],
'packages/metal-soy-bundle/build/bundle.js': ['browserify'],
'packages/metal*/test/**/*.js': ['browserify']
},

Expand Down
12 changes: 0 additions & 12 deletions packages/metal-soy-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,3 @@ metal-soy-bundle
A bundle containing all the closure dependencies required by soy files compiled to incremental-dom.

Note that this bundle was built by hand, and some features were deliberately removed to make the resulting bundle smaller, like escaping (which shouldn't be necessary for incremental dom anyway) and bidi directives (which will be added back soon).

## Build Process

There are two steps to generating the consumable `lib/bundle.js` file. The entire process is triggered by the `npm prepublish` script.

### Concatentation

The `gulp build` task first concatenates the files found in the `src/closure-library` and `src/closure-templates` directories into the `build/bundle.js` file.

### Transpilation

Once the source files have been concatenated, the generated `build/bundle.js` file is transpiled by the `npm compile` script and placed in the `lib` directory at `lib/bundle.js`. This file is the entry point for the `metal-soy-bundle` package.
8 changes: 1 addition & 7 deletions packages/metal-soy-bundle/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ gulp.task('build', function() {
return gulp.src(dependencies)
.pipe(concat('bundle.js'))
.pipe(replace('var goog = goog || {};', 'var goog = this.goog || {};'))
.pipe(header('import \'metal-incremental-dom\';\n\n(function() {\nthis.CLOSURE_NO_DEPS = true;\nthis.goog = this.goog || {};\n\n' +
'if (this.__METAL_SOY_BUNDLE_LOADED__) {\n' +
' console.warn(\'Warning: metal-soy-bundle has already been loaded. Dedupe bundle to remove this warning.\');\n' +
' return;\n' +
'}\n' +
'this.__METAL_SOY_BUNDLE_LOADED__ = true;\n\n'
))
.pipe(header('import \'metal-incremental-dom\';\n\n(function() {\nthis.CLOSURE_NO_DEPS = true;\nthis.goog = this.goog || {};\n\n'))
.pipe(footer('\n\ngoog.loadModule(function() {\n' +
' goog.module(\'incrementaldom\');\n' +
' return IncrementalDOM;\n' +
Expand Down
32 changes: 0 additions & 32 deletions packages/metal-soy-bundle/test/bundle.js

This file was deleted.