Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 0b56a55

Browse files
committed
chore: support stripping API entry pages of ng-cloak
1 parent b31d4a0 commit 0b56a55

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

gulpfile.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var treeKill = require("tree-kill");
2424
var blc = require("broken-link-checker");
2525
var less = require('gulp-less');
2626
var tslint = require('gulp-tslint');
27+
const replace = require('gulp-replace');
2728

2829
// TODO:
2930
// 1. Think about using runSequence
@@ -658,6 +659,17 @@ gulp.task('_cp-ng2-app-public', () => cpNg2App('public'));
658659
gulp.task('_cp-ng2-app-www-ng2', cb =>
659660
argv.ng2 && fs.existsSync(WWW) ? cpNg2App(WWW) : cb())
660661

662+
gulp.task('ng2-adj-api', cb => {
663+
const baseDir = argv.ng2 ? WWW : DOCS_PATH;
664+
gutil.log(`Stripping ng-cloak from HTML & Jade files under ${baseDir} for all languages.`);
665+
return gulp.src([
666+
`${baseDir}/*/latest/api/**/*.html`,
667+
`${baseDir}/*/latest/api/**/*.jade`,
668+
], { base: baseDir })
669+
.pipe(replace(/ng-cloak/g, ''))
670+
.pipe(gulp.dest(baseDir));
671+
});
672+
661673
gulp.task('dartdoc', ['pub upgrade'], function() {
662674
const ngRepoPath = ngPathFor('dart');
663675
if (argv.fast && fs.existsSync(path.resolve(ngRepoPath, relDartDocApiDir))) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"browser-sync": "^2.9.3",
5050
"canonical-path": "0.0.2",
5151
"cheerio": "^0.20.0",
52-
"codelyzer": "0.0.26",
5352
"cross-spawn": "^4.0.0",
5453
"del": "^2.2.0",
5554
"dgeni": "^0.4.0",
@@ -60,6 +59,7 @@
6059
"gulp": "^3.5.6",
6160
"gulp-env": "0.4.0",
6261
"gulp-less": "^3.1.0",
62+
"gulp-replace": "^0.5.4",
6363
"gulp-sass": "^2.3.2",
6464
"gulp-task-listing": "^1.0.1",
6565
"gulp-tslint": "^5.0.0",

0 commit comments

Comments
 (0)