diff --git a/.gitignore b/.gitignore index 16793c2110..090642e729 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,8 @@ pubspec.lock .idea **/js/latest/api **/ts/latest/api -**/docs/_fragments +**/docs/**/_fragments +_.* **/resources/zips public/docs/xref-*.* _zip-output @@ -26,4 +27,5 @@ plnkr.html public/docs/*/latest/guide/cheatsheet.json protractor-results.txt -public/docs/ts/latest/guide/_.*.jade + + diff --git a/gulpfile.js b/gulpfile.js index cf1967eb06..4d62214d32 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -413,8 +413,14 @@ gulp.task('_shred-devguide-shared-jade', ['_shred-clean-devguide-shared-jade'], }); gulp.task('_shred-clean-devguide-shared-jade', function(cb) { - var cleanPath = path.join(DOCS_PATH, '**/_.*.jade') - return delPromise([ cleanPath]); + // oldCleanPath is only needed to cleanup any jade fragments still sitting in the old location + var oldCleanPath = path.join(DOCS_PATH, '**/_.*.jade'); + // jade fragments now all go into _fragments subdirs under their source. + var newCleanPath = path.join(DOCS_PATH, '**/_fragments/*.jade'); + // Much slower 8-9x then using globby first ... ??? + // return delPromise([ newCleanPath, oldCleanPath]); + var files = globby.sync( [newCleanPath, oldCleanPath]); + return delPromise(files); }); gulp.task('_shred-clean-devguide', function(cb) { diff --git a/public/_includes/_util-fns.jade b/public/_includes/_util-fns.jade index da27732e32..7a3c7268d9 100644 --- a/public/_includes/_util-fns.jade +++ b/public/_includes/_util-fns.jade @@ -56,7 +56,8 @@ mixin makeJson( filePath, jsonConfig, title, stylePatterns) - var topLevelDir = matches[1]; - var currentPath = current.path; - var subPaths = currentPath.slice(2); -- subPaths[subPaths.length - 1] = "_." + subPaths[subPaths.length - 1]; +- // subPaths[subPaths.length - 1] = "_." + subPaths[subPaths.length - 1]; +- subPaths[subPaths.length - 1] = "_fragments/" + subPaths[subPaths.length - 1]; - var newPath = getPathToDocs() + topLevelDir + '/' + subPaths.join("/"); - var result = newPath + regionPad + ".jade"; - } else { @@ -64,7 +65,8 @@ mixin makeJson( filePath, jsonConfig, title, stylePatterns) - var baseFileName = getBaseFileName(filePath); - var noExtnFileName = baseFileName.substr(0,baseFileName.length - (extn.length + 1)); - var folder = getFolder(filePath); -- var result = folder + "/_." + noExtnFileName + regionPad + "." + extn; +- // var result = folder + "/_." + noExtnFileName + regionPad + "." + extn; +- var result = folder + "/_fragments/" + noExtnFileName + regionPad + "." + extn; - } - return result - } diff --git a/tools/doc-shredder/processors/renderAsJadeProcessor.js b/tools/doc-shredder/processors/renderAsJadeProcessor.js index b9df9994d2..392a84f73f 100644 --- a/tools/doc-shredder/processors/renderAsJadeProcessor.js +++ b/tools/doc-shredder/processors/renderAsJadeProcessor.js @@ -15,7 +15,8 @@ module.exports = function renderAsJadeProcessor() { var regionSuffix = (doc.regionName && doc.regionName.length) ? "-" + doc.regionName.trim() : ""; var origName = fileInfo.baseName + "." + fileInfo.extension; - var newName = "_." + fileInfo.baseName + regionSuffix + "." + fileInfo.extension; + //var newName = "_." + fileInfo.baseName + regionSuffix + "." + fileInfo.extension; + var newName = "./_fragments/" + fileInfo.baseName + regionSuffix + "." + fileInfo.extension; doc.outputPath = fileInfo.filePath.replace(origName, newName); return doc; })