@@ -9,7 +9,7 @@ var mkdirp = require('mkdirp');
99
1010var indexHtmlTranslator = require ( './indexHtmlTranslator' ) ;
1111var regionExtractor = require ( '../doc-shredder/regionExtractor' ) ;
12- var COPYRIGHT , COPYRIGHT_JS , COPYRIGHT_HTML ;
12+ var COPYRIGHT , COPYRIGHT_JS_CSS , COPYRIGHT_HTML ;
1313var SYSTEMJS_CONFIG ; // content of systemjs.config.js for plunkers that use systemjs
1414var TSCONFIG ; // content of tsconfig.json for plunkers that use systemjs
1515
@@ -32,11 +32,8 @@ function buildCopyrightStrings() {
3232function buildPlunkers ( basePath , destPath , options ) {
3333 getSystemJsConfigPlunker ( basePath ) ;
3434 var errFn = options . errFn || function ( e ) { console . log ( e ) ; } ;
35- var configExtns = [ 'plnkr.json' , '*plnkr.json' ] ;
36- var gpaths = configExtns . map ( function ( extn ) {
37- return path . join ( basePath , '**/' + extn ) ;
38- } ) ;
39- var fileNames = globby . sync ( gpaths , { ignore : "**/node_modules/**" } ) ;
35+ var plunkerPaths = path . join ( basePath , '**/*plnkr.json' ) ;
36+ var fileNames = globby . sync ( plunkerPaths , { ignore : "**/node_modules/**" } ) ;
4037 fileNames . forEach ( function ( configFileName ) {
4138 try {
4239 buildPlunkerFrom ( configFileName , basePath , destPath ) ;
@@ -51,7 +48,7 @@ function buildPlunkers(basePath, destPath, options) {
5148// description: optional string - description of this plunker - defaults to the title in the index.html page.
5249// tags: [] - optional array of strings
5350// main: string - filename of what will become index.html in the plunker - defaults to index.html
54- function buildPlunkerFrom ( configFileName , basePath , destPath ) {
51+ function buildPlunkerFrom ( configFileName , basePath , destPath ) {
5552 // replace ending 'plnkr.json' with 'plnkr.no-link.html' to create output file name;
5653 var outputFileName = configFileName . substr ( 0 , configFileName . length - 'plnkr.json' . length ) + 'plnkr.no-link.html' ;
5754 var altFileName ;
@@ -90,8 +87,7 @@ function buildPlunkerFrom(configFileName, basePath, destPath ) {
9087function addSystemJsConfig ( config , postData ) {
9188 if ( config . basePath . indexOf ( '/ts' ) > - 1 ) {
9289 // uses systemjs.config.js so add plunker version
93- var relativeFileName = 'systemjs.config.js' ;
94- postData [ 'files[' + relativeFileName + ']' ] = SYSTEMJS_CONFIG ;
90+ postData [ 'files[systemjs.config.js]' ] = SYSTEMJS_CONFIG ;
9591 postData [ 'files[tsconfig.json]' ] = TSCONFIG ;
9692 }
9793}
0 commit comments