Skip to content

Commit

Permalink
Merge branch 'master' into strict-template-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jul 24, 2018
2 parents 376f44c + 4f0337a commit f318661
Show file tree
Hide file tree
Showing 6 changed files with 5,386 additions and 8,254 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ cache:
before_script:
- npm install -g gulp-cli@1
- gulp lint-eslint
# TODO(dfreedm): re-enable after making update-types work
#- >-
# npm run update-types && git diff --exit-code || (echo -e
# '\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
# update-types".' && false)
script:
- node ./node_modules/.bin/polymer test --npm --module-resolution=node -l chrome
- node ./node_modules/.bin/polymer test --npm --module-resolution=node -l firefox
Expand Down
4 changes: 4 additions & 0 deletions externs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TODO(timvdlippe): Ignore all files here once we can generate them.
# *
!.gitignore
!.npmignore
Empty file added externs/.npmignore
Empty file.
36 changes: 16 additions & 20 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

const gulp = require('gulp');
const gulpif = require('gulp-if');
const runseq = require('run-sequence');
const del = require('del');
const eslint = require('gulp-eslint');
const fs = require('fs-extra');
Expand All @@ -31,8 +30,7 @@ const replace = require('gulp-replace');
const DIST_DIR = 'dist';
const BUNDLED_DIR = path.join(DIST_DIR, 'bundled');
const COMPILED_DIR = path.join(DIST_DIR, 'compiled');
const POLYMER_LEGACY = 'polymer.html';
const POLYMER_ELEMENT = 'polymer-element.html';
const POLYMER_LEGACY = 'polymer-legacy.js';

const {PolymerProject, HtmlSplitter} = require('polymer-build');

Expand Down Expand Up @@ -64,8 +62,6 @@ class BackfillStream extends Transform {
}
}

let CLOSURE_LINT_ONLY = false;

let firstImportFinder = dom5.predicates.AND(
dom5.predicates.hasTagName('link'), dom5.predicates.hasAttrValue('rel', 'import')
);
Expand Down Expand Up @@ -129,8 +125,7 @@ gulp.task('generate-typescript', async () => {
}
});

gulp.task('closure', gulp.series('generate-externs', () => {

const runClosureOnly = ({lintOnly}) => () => {
let entry, splitRx, joinRx, addClosureTypes;

function config(path) {
Expand Down Expand Up @@ -164,7 +159,7 @@ gulp.task('closure', gulp.series('generate-externs', () => {

let closurePluginOptions;

if (CLOSURE_LINT_ONLY) {
if (lintOnly) {
closurePluginOptions = {
logger: closureLintLogger
};
Expand All @@ -179,7 +174,7 @@ gulp.task('closure', gulp.series('generate-externs', () => {
assume_function_wrapper: true,
rewrite_polyfills: false,
new_type_inf: true,
checks_only: CLOSURE_LINT_ONLY,
checks_only: lintOnly,
polymer_version: 2,
externs: [
'bower_components/shadycss/externs/shadycss-externs.js',
Expand Down Expand Up @@ -219,12 +214,15 @@ gulp.task('closure', gulp.series('generate-externs', () => {
.pipe(gulpif(joinRx, minimalDocument()))
.pipe(gulpif(joinRx, size({title: 'closure size', gzip: true, showTotal: false, showFiles: true})))
.pipe(gulp.dest(COMPILED_DIR));
}));
};

gulp.task('lint-closure', (done) => {
CLOSURE_LINT_ONLY = true;
runseq('closure', done);
});
gulp.task('closure', gulp.series('generate-externs', runClosureOnly({
lintOnly: false
})));

gulp.task('lint-closure', runClosureOnly({
lintOnly: true
}));

gulp.task('estimate-size', gulp.series('clean', () => {

Expand Down Expand Up @@ -272,13 +270,11 @@ gulp.task('lint-eslint', function() {
.pipe(eslint.failAfterError());
});

gulp.task('lint', (done) => {
runseq('lint-eslint', 'lint-closure', done);
});
// TODO(timvdlippe): Add back `, 'lint-closure'` once closure lint works again
gulp.task('lint', gulp.series('lint-eslint'));

gulp.task('update-types', (done) => {
runseq('generate-externs', 'generate-typescript', done);
});
// TODO(timvdlippe): Add back `'generate-externs',` once we can generate externs again
gulp.task('generate-types', gulp.series('generate-typescript'));

gulp.task('update-version', () => {
return gulp.src('lib/utils/boot.js')
Expand Down
Loading

0 comments on commit f318661

Please sign in to comment.