Skip to content

Commit

Permalink
automate generating closure externs
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Apr 26, 2017
1 parent 37abc4e commit 89b1230
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions externs/closure-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,10 @@ Polymer_PropertyEffects.prototype._setPendingPropertyOrPath = function(path, val
Polymer_PropertyEffects.prototype._setUnmanagedPropertyToNode = function(node, prop, value){};
/**
* @override
* @param {*} property
* @param {string} property
* @param {*} value
* @param {*} shouldNotify
* @param {boolean=} shouldNotify
* @return {boolean}
*/
Polymer_PropertyEffects.prototype._setPendingProperty = function(property, value, shouldNotify){};
/**
Expand Down
9 changes: 8 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ let EXPECTED_WARNING_COUNT = 498;

gulp.task('clean', () => del(DIST_DIR));

gulp.task('closure', ['clean'], () => {
gulp.task('closure', ['clean', 'generate-closure-externs'], () => {

let entry, splitRx, joinRx;

Expand Down Expand Up @@ -242,3 +242,10 @@ gulp.task('lint', function() {
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('generate-closure-externs', ['clean'], () => {
let genClosure = require('@polymer/gen-closure-declarations').generateDeclarations;
return genClosure().then((declarations) => {
fs.writeFileSync('externs/closure-types.js', declarations);
});
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"test": "test"
},
"devDependencies": {
"@polymer/gen-closure-declarations": "0.0.3",
"babel-preset-babili": "0.0.12",
"del": "^2.2.1",
"dom5": "^1.3.1",
Expand Down

0 comments on commit 89b1230

Please sign in to comment.