aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/gen-docs.js
diff options
context:
space:
mode:
authorJulie2014-01-06 15:13:57 -0800
committerJulie2014-01-08 13:07:58 -0800
commitb6c42d5e8155edc9013bd531f553c278ce37c3c8 (patch)
tree225bbc1e0522b42b2cdd9bccfe36452ad88ad3d4 /docs/src/gen-docs.js
parent1c045f1b463cf8c2d0c470fc6e44170997e85d89 (diff)
downloadangular.js-b6c42d5e8155edc9013bd531f553c278ce37c3c8.tar.bz2
feat(docs): adding the <doc:protractor> ngdoc-tag
This is the first step in migrating tests from <doc:scenario> to <doc:protractor>. In-documentation examples with doc:protractor sections will have their contents output to a tab on the docs site as well as output to a standalone test file in build/docs/ptore2e.
Diffstat (limited to 'docs/src/gen-docs.js')
-rwxr-xr-xdocs/src/gen-docs.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js
index abb001b5..9fc5f8db 100755
--- a/docs/src/gen-docs.js
+++ b/docs/src/gen-docs.js
@@ -18,6 +18,8 @@ writer.makeDir('build/docs/', true).then(function() {
}).then(function() {
return writer.makeDir('build/docs/components/font-awesome');
}).then(function() {
+ return writer.makeDir('build/docs/e2etests');
+}).then(function() {
console.log('Generating AngularJS Reference Documentation...');
return reader.collect();
}).then(function generateHtmlDocPartials(docs_) {
@@ -53,6 +55,10 @@ writer.makeDir('build/docs/', true).then(function() {
var id = doc.id.replace('angular.Module', 'angular.IModule');
fileFutures.push(writer.output('partials/' + doc.section + '/' + id + '.html', doc.html()));
+ // If it has a sample Protractor test, output that as well.
+ if (doc.protractorTests.length) {
+ fileFutures.push(writer.output('ptore2e/' + doc.section + '/' + id + '_test.js', ngdoc.writeProtractorTest(doc)));
+ }
});
ngdoc.checkBrokenLinks(docs);