Skip to content

Commit 5250037

Browse files
committed
Merge pull request #1626 from Polymer/0.9-add-version
Add back Polymer.version string
2 parents 77517e4 + cc2663d commit 5250037

File tree

2 files changed

+63
-55
lines changed

2 files changed

+63
-55
lines changed

gulpfile.js

+4
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ var distMicro = path.join(workdir, micro);
3333
var distMini = path.join(workdir, mini);
3434
var distMax = path.join(workdir, max);
3535

36+
var pkg = require('./package.json');
37+
3638
var cleanupPipe = lazypipe()
3739
// Reduce script tags
3840
.pipe(replace, /<\/script>\s*<script>/g, '\n\n')
41+
// Add real version number
42+
.pipe(replace, /(Polymer.version = )'master'/, '$1"' + pkg.version + '"')
3943
// remove leading whitespace and comments
4044
.pipe(polyclean.leftAlignJs)
4145
// remove html wrapper

polymer-micro.html

+59-55
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,59 @@
1-
<!--
2-
@license
3-
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7-
Code distributed by Google as part of the polymer project is also
8-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9-
-->
10-
<link rel="import" href="src/polymer-lib.html">
11-
<link rel="import" href="src/micro/tag.html">
12-
<link rel="import" href="src/micro/behaviors.html">
13-
<link rel="import" href="src/micro/extends.html">
14-
<link rel="import" href="src/micro/constructor.html">
15-
<link rel="import" href="src/micro/properties.html">
16-
<link rel="import" href="src/micro/attributes.html">
17-
<link rel="import" href="src/micro/debouncer.html">
18-
19-
<script>
20-
21-
Polymer.Base._addFeature({
22-
23-
_registerFeatures: function() {
24-
// identity
25-
this._prepIs();
26-
// attributes
27-
this._prepAttributes();
28-
// shared behaviors
29-
this._prepBehaviors();
30-
// inheritance
31-
this._prepExtends();
32-
// factory
33-
this._prepConstructor();
34-
},
35-
36-
_prepBehavior: function(b) {
37-
this._addHostAttributes(b.hostAttributes);
38-
},
39-
40-
_marshalBehavior: function(b) {
41-
},
42-
43-
_initFeatures: function() {
44-
// install host attributes
45-
this._marshalHostAttributes();
46-
// setup debouncers
47-
this._setupDebouncers();
48-
// acquire behaviors
49-
this._marshalBehaviors();
50-
}
51-
52-
});
53-
54-
</script>
55-
1+
<!--
2+
@license
3+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7+
Code distributed by Google as part of the polymer project is also
8+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9+
-->
10+
<link rel="import" href="src/polymer-lib.html">
11+
<link rel="import" href="src/micro/tag.html">
12+
<link rel="import" href="src/micro/behaviors.html">
13+
<link rel="import" href="src/micro/extends.html">
14+
<link rel="import" href="src/micro/constructor.html">
15+
<link rel="import" href="src/micro/properties.html">
16+
<link rel="import" href="src/micro/attributes.html">
17+
<link rel="import" href="src/micro/debouncer.html">
18+
19+
<script>
20+
Polymer.version = 'master';
21+
</script>
22+
23+
<script>
24+
25+
Polymer.Base._addFeature({
26+
27+
_registerFeatures: function() {
28+
// identity
29+
this._prepIs();
30+
// attributes
31+
this._prepAttributes();
32+
// shared behaviors
33+
this._prepBehaviors();
34+
// inheritance
35+
this._prepExtends();
36+
// factory
37+
this._prepConstructor();
38+
},
39+
40+
_prepBehavior: function(b) {
41+
this._addHostAttributes(b.hostAttributes);
42+
},
43+
44+
_marshalBehavior: function(b) {
45+
},
46+
47+
_initFeatures: function() {
48+
// install host attributes
49+
this._marshalHostAttributes();
50+
// setup debouncers
51+
this._setupDebouncers();
52+
// acquire behaviors
53+
this._marshalBehaviors();
54+
}
55+
56+
});
57+
58+
</script>
59+

0 commit comments

Comments
 (0)