From 0536e35b9f4ec42e029f0c53a5aa75224fcfcac2 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Mon, 25 Jan 2016 17:14:53 -0800 Subject: [PATCH] Use a parser based html minification only test builds in travis Massive speed up for browser testing Lint the document processor --- .travis.yml | 6 +- bower.json | 7 +- gulpfile.js | 15 ++--- package.json | 1 + util/.eslintrc.json | 5 ++ gen-changelog.sh => util/gen-changelog.sh | 0 util/minimalDocument.js | 78 +++++++++++++++++++++++ 7 files changed, 100 insertions(+), 12 deletions(-) create mode 100644 util/.eslintrc.json rename gen-changelog.sh => util/gen-changelog.sh (100%) create mode 100644 util/minimalDocument.js diff --git a/.travis.yml b/.travis.yml index 898ee44439..5d9e950917 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,12 +12,14 @@ addons: - google-chrome-stable - g++-4.8 before_script: -- npm install -g bower +- npm install -g bower gulp-cli - bower install - gulp lint +- gulp switch script: - xvfb-run wct -- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" +- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s default; fi" + env: global: - secure: eFrp9xwSYG579rAR9/XyXYKh+UtIQJ1xS5q5PABu4ndYFckdJb8o3m7oXqRSikbiPWbCSd3Fkd6+ZKXlcQFdjJ+nx9gFitGthtH93qkvZCO3XhWEEBPj65igIo3hrRSOB6dIWyiZcnoH9IXLLQtKXY9uL1NCqCcyVHg1omPKr9w= diff --git a/bower.json b/bower.json index ccae83fa5f..6dcd7806e2 100644 --- a/bower.json +++ b/bower.json @@ -10,7 +10,12 @@ "ignore": [ "/.*", "/test/", - "gen-changelog.sh" + "/util/", + "/explainer/", + "gulpfile.js", + "PRIMER.md", + "CONTRIBUTING.md", + "CHANGELOG.md" ], "authors": [ "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)" diff --git a/gulpfile.js b/gulpfile.js index afeed0bd7e..ba1f57d68e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -24,6 +24,8 @@ var eslint = require('gulp-eslint'); var path = require('path'); +var minimalDocument = require('./util/minimalDocument'); + var micro = "polymer-micro.html"; var mini = "polymer-mini.html"; var max = "polymer.html"; @@ -36,17 +38,12 @@ var distMax = path.join(workdir, max); var pkg = require('./package.json'); var cleanupPipe = lazypipe() - // Reduce script tags - .pipe(replace, /<\/script>\s*