automate generating closure externs

This commit is contained in:
Daniel Freedman
2017-04-26 14:59:34 -07:00
parent 37abc4e3f2
commit 89b1230177
3 changed files with 12 additions and 3 deletions

View File

@@ -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){};
/**

View File

@@ -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;
@@ -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);
});
});

View File

@@ -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",