chore: move jade fragments into separate _fragments subdirs.
closes #842
This commit is contained in:
parent
3d992384c3
commit
3926d4202f
|
@ -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
|
||||
|
||||
|
||||
|
|
10
gulpfile.js
10
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) {
|
||||
|
|
|
@ -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
|
||||
- }
|
||||
|
|
|
@ -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;
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue