mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
chore(demos): add option to use a custom demo template
This commit is contained in:
@ -475,8 +475,11 @@ gulp.task('build.demos', function(){
|
||||
function createIndexHTML() {
|
||||
return through2.obj(function(file, enc, next) {
|
||||
var indexTemplate = baseIndexTemplate;
|
||||
var customTemplateFp = file.path.split('/').slice(0, -1).join('/') + '/index.html';
|
||||
if (file.path.indexOf('component-docs') > -1) {
|
||||
indexTemplate = docsIndexTemplate;
|
||||
} else if (fs.existsSync(customTemplateFp)) {
|
||||
indexTemplate = _.template(fs.readFileSync(customTemplateFp))();
|
||||
}
|
||||
this.push(new VinylFile({
|
||||
base: file.base,
|
||||
|
Reference in New Issue
Block a user