parent
abe9dbe092
commit
4ff714c99f
|
@ -9,7 +9,7 @@ var mkdirp = require('mkdirp');
|
||||||
|
|
||||||
var indexHtmlTranslator = require('./indexHtmlTranslator');
|
var indexHtmlTranslator = require('./indexHtmlTranslator');
|
||||||
var regionExtractor = require('../doc-shredder/regionExtractor');
|
var regionExtractor = require('../doc-shredder/regionExtractor');
|
||||||
var COPYRIGHT, COPYRIGHT_JS, COPYRIGHT_HTML;
|
var COPYRIGHT, COPYRIGHT_JS_CSS, COPYRIGHT_HTML;
|
||||||
var SYSTEMJS_CONFIG; // content of systemjs.config.js for plunkers that use systemjs
|
var SYSTEMJS_CONFIG; // content of systemjs.config.js for plunkers that use systemjs
|
||||||
var TSCONFIG; // content of tsconfig.json for plunkers that use systemjs
|
var TSCONFIG; // content of tsconfig.json for plunkers that use systemjs
|
||||||
|
|
||||||
|
@ -32,11 +32,8 @@ function buildCopyrightStrings() {
|
||||||
function buildPlunkers(basePath, destPath, options) {
|
function buildPlunkers(basePath, destPath, options) {
|
||||||
getSystemJsConfigPlunker(basePath);
|
getSystemJsConfigPlunker(basePath);
|
||||||
var errFn = options.errFn || function(e) { console.log(e); };
|
var errFn = options.errFn || function(e) { console.log(e); };
|
||||||
var configExtns = ['plnkr.json', '*plnkr.json'];
|
var plunkerPaths = path.join(basePath, '**/*plnkr.json');
|
||||||
var gpaths = configExtns.map(function(extn) {
|
var fileNames = globby.sync(plunkerPaths, { ignore: "**/node_modules/**"});
|
||||||
return path.join(basePath, '**/' + extn);
|
|
||||||
});
|
|
||||||
var fileNames = globby.sync(gpaths, { ignore: "**/node_modules/**"});
|
|
||||||
fileNames.forEach(function(configFileName) {
|
fileNames.forEach(function(configFileName) {
|
||||||
try {
|
try {
|
||||||
buildPlunkerFrom(configFileName, basePath, destPath);
|
buildPlunkerFrom(configFileName, basePath, destPath);
|
||||||
|
@ -90,8 +87,7 @@ function buildPlunkerFrom(configFileName, basePath, destPath ) {
|
||||||
function addSystemJsConfig(config, postData){
|
function addSystemJsConfig(config, postData){
|
||||||
if (config.basePath.indexOf('/ts') > -1) {
|
if (config.basePath.indexOf('/ts') > -1) {
|
||||||
// uses systemjs.config.js so add plunker version
|
// uses systemjs.config.js so add plunker version
|
||||||
var relativeFileName = 'systemjs.config.js';
|
postData['files[systemjs.config.js]'] = SYSTEMJS_CONFIG;
|
||||||
postData['files[' + relativeFileName + ']'] = SYSTEMJS_CONFIG;
|
|
||||||
postData['files[tsconfig.json]'] = TSCONFIG;
|
postData['files[tsconfig.json]'] = TSCONFIG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue