You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im having myself a problem with sources when they are not in grunt folder or inside. I didnt have this problem in <0.7.x because i just configured source files with absolutepaths and it worked fine.
With this folder structure:
my project
front
grunt-mydocular
node_modules
docular
When files are specified in configuration, documentation says: The best way of providing this is by setting this value to the return of grunt.file.expand
The problem is that docular will receive paths like::
../front/js/...
So when exporting docs into webappfolder, this code in generator.js might breaks the build:
fse.ensureDirSync(baseFolder + '/sources/');
for (var i = 0, l = docs.length; i < l; i++) {
if (dosc[i].file) {
console.log("BASE",baseFolder + '/sources/');
console.log("FILE", docs[i].file);
fse.ensureFileSync(baseFolder + '/sources/' + docs[i].file);
fse.copySync(docs[i].file, baseFolder + '/sources/' + docs[i].file);
}
}
Because baseFolder + '/sources/' + docs[i].file will be something like webapp/sources/../front/js so at the end sources are copied into webapp/front/js
Everything works fine in this code when sources are in grunt folder because the files are not passed with ../ as preffix.
I thought in a workaround copying sources intro grunt folder before starting to work with them. However, if this is a unwanted functionality, id like what do you think as a possible solution or alternative.
The text was updated successfully, but these errors were encountered:
Im having myself a problem with sources when they are not in grunt folder or inside. I didnt have this problem in <0.7.x because i just configured source files with absolutepaths and it worked fine.
With this folder structure:
When files are specified in configuration, documentation says: The best way of providing this is by setting this value to the return of grunt.file.expand
The problem is that docular will receive paths like::
../front/js/...
So when exporting docs into webappfolder, this code in generator.js might breaks the build:
Because baseFolder + '/sources/' + docs[i].file will be something like webapp/sources/../front/js so at the end sources are copied into webapp/front/js
Everything works fine in this code when sources are in grunt folder because the files are not passed with ../ as preffix.
I thought in a workaround copying sources intro grunt folder before starting to work with them. However, if this is a unwanted functionality, id like what do you think as a possible solution or alternative.
The text was updated successfully, but these errors were encountered: