@@ -9,7 +9,7 @@ var mkdirp = require('mkdirp');
9
9
10
10
var indexHtmlTranslator = require ( './indexHtmlTranslator' ) ;
11
11
var regionExtractor = require ( '../doc-shredder/regionExtractor' ) ;
12
- var COPYRIGHT , COPYRIGHT_JS , COPYRIGHT_HTML ;
12
+ var COPYRIGHT , COPYRIGHT_JS_CSS , COPYRIGHT_HTML ;
13
13
var SYSTEMJS_CONFIG ; // content of systemjs.config.js for plunkers that use systemjs
14
14
var TSCONFIG ; // content of tsconfig.json for plunkers that use systemjs
15
15
@@ -32,11 +32,8 @@ function buildCopyrightStrings() {
32
32
function buildPlunkers ( basePath , destPath , options ) {
33
33
getSystemJsConfigPlunker ( basePath ) ;
34
34
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/**" } ) ;
40
37
fileNames . forEach ( function ( configFileName ) {
41
38
try {
42
39
buildPlunkerFrom ( configFileName , basePath , destPath ) ;
@@ -51,7 +48,7 @@ function buildPlunkers(basePath, destPath, options) {
51
48
// description: optional string - description of this plunker - defaults to the title in the index.html page.
52
49
// tags: [] - optional array of strings
53
50
// 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 ) {
55
52
// replace ending 'plnkr.json' with 'plnkr.no-link.html' to create output file name;
56
53
var outputFileName = configFileName . substr ( 0 , configFileName . length - 'plnkr.json' . length ) + 'plnkr.no-link.html' ;
57
54
var altFileName ;
@@ -90,8 +87,7 @@ function buildPlunkerFrom(configFileName, basePath, destPath ) {
90
87
function addSystemJsConfig ( config , postData ) {
91
88
if ( config . basePath . indexOf ( '/ts' ) > - 1 ) {
92
89
// 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 ;
95
91
postData [ 'files[tsconfig.json]' ] = TSCONFIG ;
96
92
}
97
93
}
0 commit comments