mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
vulcanize strips comments now
This commit is contained in:
4
dist/polymer-micro.html
vendored
4
dist/polymer-micro.html
vendored
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<html><head><meta charset="UTF-8"><!--
|
||||
@license
|
||||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
@@ -6,7 +6,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><html><head><meta charset="UTF-8"><script>Polymer = {
|
||||
--><script>Polymer = {
|
||||
Settings: function () {
|
||||
var user = window.Polymer || {};
|
||||
location.search.slice(1).split('&').forEach(function (o) {
|
||||
|
||||
4
dist/polymer-mini.html
vendored
4
dist/polymer-mini.html
vendored
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<html><head><meta charset="UTF-8"><!--
|
||||
@license
|
||||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
@@ -6,7 +6,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><html><head><meta charset="UTF-8"><link rel="import" href="polymer-micro.html">
|
||||
--><link rel="import" href="polymer-micro.html">
|
||||
<script>Polymer.Base._addFeature({
|
||||
_prepTemplate: function () {
|
||||
this._template = this._template || Polymer.DomModule.import(this.is, 'template');
|
||||
|
||||
25
dist/polymer.html
vendored
25
dist/polymer.html
vendored
@@ -1,4 +1,12 @@
|
||||
<!--
|
||||
<html><head><meta charset="UTF-8"><!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><!--
|
||||
@license
|
||||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
@@ -6,7 +14,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><html><head><meta charset="UTF-8"><link rel="import" href="polymer-mini.html">
|
||||
--><link rel="import" href="polymer-mini.html">
|
||||
<script>(function (scope) {
|
||||
function withDependencies(task, depends) {
|
||||
depends = depends || [];
|
||||
@@ -1144,7 +1152,7 @@ this._config = config;
|
||||
this._distributeConfig(this._config);
|
||||
},
|
||||
_configureProperties: function (properties, config) {
|
||||
for (i in properties) {
|
||||
for (var i in properties) {
|
||||
var c = properties[i];
|
||||
if (c.value !== undefined) {
|
||||
var value = c.value;
|
||||
@@ -2591,6 +2599,13 @@ observers: ['_itemsChanged(items.*)'],
|
||||
created: function () {
|
||||
this.boundCollectionObserver = this.render.bind(this);
|
||||
},
|
||||
detached: function () {
|
||||
if (this.rows) {
|
||||
for (var i = 0; i < this.rows.length; i++) {
|
||||
this._detachRow(i);
|
||||
}
|
||||
}
|
||||
},
|
||||
ready: function () {
|
||||
if (!this.ctor) {
|
||||
this.templatize(this);
|
||||
@@ -2598,14 +2613,14 @@ this.templatize(this);
|
||||
},
|
||||
_sortChanged: function () {
|
||||
var dataHost = this._getRootDataHost();
|
||||
this._sortFn = this.sort && (typeof this.sort == 'function' ? this.sort : dataHost[this.sort].bind(this.host));
|
||||
this._sortFn = this.sort && (typeof this.sort == 'function' ? this.sort : dataHost[this.sort].bind(dataHost));
|
||||
if (this.items) {
|
||||
this.debounce('render', this.render);
|
||||
}
|
||||
},
|
||||
_filterChanged: function () {
|
||||
var dataHost = this._getRootDataHost();
|
||||
this._filterFn = this.filter && (typeof this.filter == 'function' ? this.filter : dataHost[this.filter].bind(this.host));
|
||||
this._filterFn = this.filter && (typeof this.filter == 'function' ? this.filter : dataHost[this.filter].bind(dataHost));
|
||||
if (this.items) {
|
||||
this.debounce('render', this.render);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ function vulcanize(filename, dstdir, excludes) {
|
||||
});
|
||||
cmd = cmd + ' --implicit-strip';
|
||||
}
|
||||
cmd = cmd + ' --strip-comments';
|
||||
cmd = cmd + ' ' + filename + ' > ' + dstdir + '/' + filename;
|
||||
return cmd
|
||||
}
|
||||
@@ -27,8 +28,6 @@ gulp.task('max', shell.task(vulcanize(max, 'dist', [mini, micro])));
|
||||
gulp.task('strip', ['micro', 'mini', 'max'], function() {
|
||||
return gulp.src('dist/*.html')
|
||||
.pipe(polyclean.cleanJsComments())
|
||||
// Get rid of erroneous html comments
|
||||
.pipe(replace(/<!--((?!@license)[^])*?-->/g, ''))
|
||||
// Reduce script tags
|
||||
.pipe(replace(/<\/script>\s*<script>/g, '\n'))
|
||||
// Collapse newlines
|
||||
|
||||
Reference in New Issue
Block a user