@@ -12,8 +12,10 @@ process.on('uncaughtException', function(err) {
12
12
var start = now ( ) ;
13
13
var docs ;
14
14
15
- writer . makeDir ( 'build/docs/syntaxhighlighter' ) . then ( function ( ) {
16
- console . log ( 'Generating Angular Reference Documentation...' ) ;
15
+ writer . makeDir ( 'build/docs/' , true ) . then ( function ( ) {
16
+ return writer . makeDir ( 'build/docs/partials/' ) ;
17
+ } ) . then ( function ( ) {
18
+ console . log ( 'Generating AngularJS Reference Documentation...' ) ;
17
19
return reader . collect ( ) ;
18
20
} ) . then ( function generateHtmlDocPartials ( docs_ ) {
19
21
docs = docs_ ;
@@ -41,8 +43,10 @@ writer.makeDir('build/docs/syntaxhighlighter').then(function() {
41
43
function writeTheRest ( writesFuture ) {
42
44
var metadata = ngdoc . metadata ( docs ) ;
43
45
44
- writesFuture . push ( writer . copyDir ( 'img' ) ) ;
45
- writesFuture . push ( writer . copyDir ( 'font' ) ) ;
46
+ writesFuture . push ( writer . symlinkTemplate ( 'css' ) ) ;
47
+ writesFuture . push ( writer . symlinkTemplate ( 'font' ) ) ;
48
+ writesFuture . push ( writer . symlinkTemplate ( 'img' ) ) ;
49
+ writesFuture . push ( writer . symlinkTemplate ( 'js' ) ) ;
46
50
47
51
var manifest = 'manifest="/build/docs/appcache.manifest"' ;
48
52
@@ -66,38 +70,27 @@ function writeTheRest(writesFuture) {
66
70
writesFuture . push ( writer . copy ( 'docs/src/templates/index.html' , 'index-jq-debug.html' ,
67
71
writer . replace , { 'doc:manifest' : '' } ) ) ;
68
72
69
- writesFuture . push ( writer . copyTpl ( 'offline.html' ) ) ;
70
- writesFuture . push ( writer . copyTpl ( 'docs-scenario.html' ) ) ;
71
- writesFuture . push ( writer . copyTpl ( 'js/jquery.min.js' ) ) ;
72
- writesFuture . push ( writer . copyTpl ( 'js/jquery.js' ) ) ;
73
+ writesFuture . push ( writer . symlinkTemplate ( 'offline.html' ) ) ;
73
74
74
- writesFuture . push ( writer . output ( 'js/docs-keywords.js' ,
75
+ writesFuture . push ( writer . copyTemplate ( 'docs-scenario.html' ) ) ; // will be rewritten, don't symlink
76
+ writesFuture . push ( writer . output ( 'docs-scenario.js' , ngdoc . scenarios ( docs ) ) ) ;
77
+
78
+ writesFuture . push ( writer . output ( 'docs-keywords.js' ,
75
79
[ 'NG_PAGES=' , JSON . stringify ( metadata ) . replace ( / { / g, '\n{' ) , ';' ] ) ) ;
76
80
writesFuture . push ( writer . output ( 'sitemap.xml' , new SiteMap ( docs ) . render ( ) ) ) ;
77
- writesFuture . push ( writer . output ( 'docs-scenario.js' , ngdoc . scenarios ( docs ) ) ) ;
81
+
78
82
writesFuture . push ( writer . output ( 'robots.txt' , 'Sitemap: http://docs.angularjs.org/sitemap.xml\n' ) ) ;
79
83
writesFuture . push ( writer . output ( 'appcache.manifest' , appCache ( ) ) ) ;
80
- writesFuture . push ( writer . copyTpl ( '.htaccess' ) ) ;
84
+ writesFuture . push ( writer . copyTemplate ( '.htaccess' ) ) ; // will be rewritten, don't symlink
81
85
82
- writesFuture . push ( writer . copy ( 'docs/src/templates/js/docs.js' , 'js/docs.js' ) ) ;
83
-
84
- writesFuture . push ( writer . copy ( 'docs/src/templates/css/bootstrap.min.css' , 'css/bootstrap.min.css' ) ) ;
85
- writesFuture . push ( writer . copy ( 'docs/src/templates/css/docs.css' , 'css/docs.css' ) ) ;
86
- writesFuture . push ( writer . copy ( 'docs/src/templates/css/font-awesome.css' , 'css/font-awesome.css' ) ) ;
87
-
88
- writesFuture . push ( writer . copyTpl ( 'font/fontawesome-webfont.eot' ) ) ;
89
- writesFuture . push ( writer . copyTpl ( 'font/fontawesome-webfont.svg' ) ) ;
90
- writesFuture . push ( writer . copyTpl ( 'font/fontawesome-webfont.svgz' ) ) ;
91
- writesFuture . push ( writer . copyTpl ( 'font/fontawesome-webfont.ttf' ) ) ;
92
- writesFuture . push ( writer . copyTpl ( 'font/fontawesome-webfont.woff' ) ) ;
93
-
94
- writesFuture . push ( writer . copyTpl ( 'app.yaml' ) ) ;
95
- writesFuture . push ( writer . copyTpl ( 'index.yaml' ) ) ;
96
- writesFuture . push ( writer . copyTpl ( 'favicon.ico' ) ) ;
97
- writesFuture . push ( writer . copyTpl ( 'main.py' ) ) ;
86
+ writesFuture . push ( writer . symlinkTemplate ( 'app.yaml' ) ) ;
87
+ writesFuture . push ( writer . symlinkTemplate ( 'index.yaml' ) ) ;
88
+ writesFuture . push ( writer . symlinkTemplate ( 'favicon.ico' ) ) ;
89
+ writesFuture . push ( writer . symlinkTemplate ( 'main.py' ) ) ;
98
90
}
99
91
100
92
101
93
function now ( ) { return new Date ( ) . getTime ( ) ; }
102
94
103
95
function noop ( ) { } ;
96
+
0 commit comments