大佬教程收集整理的这篇文章主要介绍了gruntjs – 引用Grunt对象导致Warning:Object true没有方法’indexOf’,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
'use Strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'),//Define paths js_src_path: 'webapp/js',js_build_path: 'webapp/js',css_src_path: 'webapp/css',css_build_path: 'webapp/css',less_src_path: 'webapp/less',less_build_path:'webapp/less',//Convert Less to CSS and minify if compress = true less: { development: { options: { path: ['<%= less_src_path %>'],},files: { //'<%= less_build_path %>/app.css':'<%= concat.less.dest %>',//Dynamic expansion 1:1 expand: true,cwd: '<%= less_src_path %>',dest: '<%= less_build_path %>',src: '*.less',ext: '.less.css' } },production: { options: { path: ['<%= less_src_path %>'],//compress: true yuicompress: true },ext: '.less.min.css' } } } }); // Load the plugin that provides the tasks. grunt.loadNpmTasks('grunt-lib-contrib'); grunt.loadNpmTasks('grunt-contrib-less'); // Task(s). grunt.registerTask('les',['less']); grunt.registerTask('proless',['less:production']); grunt.registerTask('devless',['less:devevelopment']); };
运行下列各项:
grunt les grunt proless grunt devless
结果是:
Warning: Object true has no method 'indexOf' Use --force to conTinue
以上是大佬教程为你收集整理的gruntjs – 引用Grunt对象导致Warning:Object true没有方法’indexOf’全部内容,希望文章能够帮你解决gruntjs – 引用Grunt对象导致Warning:Object true没有方法’indexOf’所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。