From 3a80ad8f9355b80e14bc12d0521838a0a79382e9 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Wed, 24 May 2017 16:54:24 -0700 Subject: [PATCH] [ci skip] paramaterize entries for closure task --- gulpfile.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 308a58ae5c..0d1e9b4875 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -100,20 +100,13 @@ gulp.task('closure', ['clean'], () => { let entry, splitRx, joinRx; - function full() { - entry = 'polymer.html'; - splitRx = /polymer\.html_script_\d+\.js$/; - joinRx = /polymer\.html/; + function config(path) { + entry = path; + joinRx = new RegExp(path.split('/').join('\\/')); + splitRx = new RegExp(joinRx.source + '_script_\\d+\\.js$'); } - function element() { - entry = 'polymer-element.html'; - splitRx = /polymer-element\.html_script_\d+\.js$/; - joinRx = /polymer-element\.html/; - } - - // element(); - full(); + config('polymer.html'); const project = new PolymerProject({ shell: `./${entry}`,