Add back Polymer.version string

Replace version string when releasing
Fixes #1625
This commit is contained in:
Daniel Freedman
2015-05-26 14:54:38 -07:00
parent 686327247a
commit cc2663d1f7
2 changed files with 63 additions and 55 deletions

View File

@@ -33,9 +33,13 @@ var distMicro = path.join(workdir, micro);
var distMini = path.join(workdir, mini);
var distMax = path.join(workdir, max);
var pkg = require('./package.json');
var cleanupPipe = lazypipe()
// Reduce script tags
.pipe(replace, /<\/script>\s*<script>/g, '\n\n')
// Add real version number
.pipe(replace, /(Polymer.version = )'master'/, '$1"' + pkg.version + '"')
// remove leading whitespace and comments
.pipe(polyclean.leftAlignJs)
// remove html wrapper