@@ -14,7 +14,6 @@ module.exports = function (grunt) {
1414 // Setup doc names / paths.
1515 docsName : '<%= pkg.name %>_docs-<%= version %>' ,
1616 docsZip : "<%= docsName %>.zip" ,
17- docsFolder : "./output/<%= docsName %>/" ,
1817
1918 // Setup Uglify for JS minification.
2019 uglify : {
@@ -55,13 +54,13 @@ module.exports = function (grunt) {
5554 url : '<%= pkg.url %>' ,
5655 logo : '<%= pkg.logo %>' ,
5756 options : {
58- paths : [ '../src /' ] ,
57+ paths : [ './' ] ,
5958 outdir : '<%= docsFolder %>' ,
6059 linkNatives : true ,
6160 attributesEmit : true ,
6261 selleck : true ,
63- helpers : [ "./path.js" ] ,
64- themedir : "createjsTheme/"
62+ helpers : [ "../build /path.js" ] ,
63+ themedir : "../build/ createjsTheme/"
6564 }
6665 }
6766 } ,
@@ -81,7 +80,7 @@ module.exports = function (grunt) {
8180 copy : {
8281 docsZip : {
8382 files : [
84- { expand : true , cwd :'output/' , src :'<%= docsZip %>' , dest :'../docs/' }
83+ { expand : true , cwd :'./ output/' , src :'<%= docsZip %>' , dest :'../docs/' }
8584 ]
8685 } ,
8786 docsSite : {
@@ -185,11 +184,21 @@ module.exports = function (grunt) {
185184 grunt . loadNpmTasks ( 'grunt-contrib-copy' ) ;
186185 grunt . loadTasks ( 'tasks/' ) ;
187186
187+ grunt . registerTask ( 'setDocsBase' , "Internal utility task to set a correct base for YUIDocs." , function ( ) {
188+ grunt . file . setBase ( '../src' ) ;
189+ grunt . config . set ( 'docsFolder' , "../build/output/<%= docsName %>/" ) ;
190+ } ) ;
191+
192+ grunt . registerTask ( 'resetBase' , "Internal utility task to reset the base, after setDocsBase" , function ( ) {
193+ grunt . file . setBase ( '../build' ) ;
194+ grunt . config . set ( 'docsFolder' , "./output/<%= docsName %>/" ) ;
195+ } ) ;
196+
188197 /**
189198 * Build the docs using YUIdocs.
190199 */
191200 grunt . registerTask ( 'docs' , [
192- "yuidoc" , "compress" , "copy:docsZip"
201+ "setDocsBase" , " yuidoc" , "resetBase ", "compress" , "copy:docsZip"
193202 ] ) ;
194203
195204 /**
0 commit comments