gruntjs - Visual Studio 2015: Destination wwwroot/css/site.css not written because no source files were found. -
i'm trying use grunt in asp project, whatever reasons have stupid warning-message visual studio. how can see down, bower-task has been executed, haven't uglify- , less-tasks. gruntfile.js , folder "wwwroot" in same folder. what's wrong ?
this console output in visual studio 2015:
> cmd.exe /c grunt -b "c:\t\bw\src\bw" --gruntfile "c:\t\bw\src\bw\gruntfile.js" bower running "bower:install" (bower) task >> installed bower packages >> copied packages c:\t\bw\src\bw\wwwroot\lib done, without errors. process terminated code 0. > cmd.exe /c grunt -b "c:\t\bw\src\bw" --gruntfile "c:\t\bw\src\bw\gruntfile.js" uglify_default running "uglify:uglify_target" (uglify) task process terminated code 0. >> destination wwwroot/lib/angular/angular.js not written because src files empty. >> no files created. done, without errors. > cmd.exe /c grunt -b "c:\t\bw\src\bw" --gruntfile "c:\t\bw\src\bw\gruntfile.js" less running "less:dev" (less) task >> destination wwwroot/css/site.css not written because no source files found. done, without errors. process terminated code 0.
this gruntfile.js:
grunt.initconfig({ bower: { install: { options: { targetdir: "wwwroot/lib", layout: "bycomponent", cleantargetdir: false } } }, uglify: { uglify_target: { files: { "wwwroot/lib/angular/angular.js":["src/angular.min.js"] } } }, less: { dev: { files: { "wwwroot/css/site.css": ["less/site.less"] }, options: { sourcemap: true, } } }, }); grunt.registertask("default", ["bower:install"]); grunt.loadnpmtasks("grunt-bower-task"); grunt.loadnpmtasks("grunt-contrib-uglify"); grunt.loadnpmtasks("grunt-contrib-less");
are sure "wwwroot/lib/angular/angular.js":["src/angular.min.js"]
correct in uglify step? uglify minifying files, seem if have destination , source parameters reversed. getting message destination wwwroot/lib/angular/angular.js not written because src files empty.
seem indicate well.
the less step seems correct, can't find less file trying compile. sure site.less exists in less folder?
here less portion of grunt file wrote, , seems work well, although getting sourcemap generate still issue. pretty exact equivalent of vs 2013 web essentials installed. compiling less files in content folder using autoprefix browsers support, , puts .css content folder. doesn't compile less file starts _, includes/variables.
less: { development: { options: { paths: ["content"], compress: true, plugins: [ new (require('less-plugin-autoprefix'))({ browsers: ["ie >= 9, firefox > 10, last 2 chrome versions, last 2 safari versions, last 2 ios versions"], map: { inline: false } }) ] }, files: [{ expand: true, cwd: 'content', src: ['*.less', '!_*.less'], dest: 'content', ext: '.css' }] } },
Comments
Post a Comment