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

Commit 13996f7

Browse files
committed
chore: support stripping API entry pages of ng-cloak
1 parent 82e2921 commit 13996f7

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
@@ -25,6 +25,7 @@ var treeKill = require("tree-kill");
2525
var blc = require("broken-link-checker");
2626
var less = require('gulp-less');
2727
var tslint = require('gulp-tslint');
28+
const replace = require('gulp-replace');
2829

2930
// TODO:
3031
// 1. Think about using runSequence
@@ -660,6 +661,17 @@ gulp.task('_cp-ng2-app-public', () => cpNg2App('public'));
660661
gulp.task('_cp-ng2-app-www-ng2', cb =>
661662
argv.ng2 && fs.existsSync(WWW) ? cpNg2App(WWW) : cb())
662663

664+
gulp.task('ng2-adj-api', cb => {
665+
const baseDir = argv.ng2 ? WWW : DOCS_PATH;
666+
gutil.log(`Stripping ng-cloak from HTML & Jade files under ${baseDir} for all languages.`);
667+
return gulp.src([
668+
`${baseDir}/*/latest/api/**/*.html`,
669+
`${baseDir}/*/latest/api/**/*.jade`,
670+
], { base: baseDir })
671+
.pipe(replace(/ng-cloak/g, ''))
672+
.pipe(gulp.dest(baseDir));
673+
});
674+
663675
gulp.task('dartdoc', ['pub upgrade'], function() {
664676
const ngRepoPath = ngPathFor('dart');
665677
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
@@ -44,7 +44,6 @@
4444
"browser-sync": "^2.9.3",
4545
"canonical-path": "0.0.2",
4646
"cheerio": "^0.20.0",
47-
"codelyzer": "0.0.26",
4847
"cross-spawn": "^4.0.0",
4948
"del": "^2.2.0",
5049
"dgeni": "^0.4.0",
@@ -55,6 +54,7 @@
5554
"gulp": "^3.5.6",
5655
"gulp-env": "0.4.0",
5756
"gulp-less": "^3.1.0",
57+
"gulp-replace": "^0.5.4",
5858
"gulp-sass": "^2.3.2",
5959
"gulp-task-listing": "^1.0.1",
6060
"gulp-tslint": "^5.0.0",

0 commit comments

Comments
 (0)