zoukankan      html  css  js  c++  java
  • grunt 检测js配置

    module.exports = function(grunt) {
    
        // 项目配置
        grunt.initConfig({
            pkg: grunt.file.readJSON('package.json'),
            uglify: {
                options: {
                    banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */
    '
                },
                build: {
                    files: [{
                        expand: true, //启用动态扩展
                        cwd: 'src/', //批匹配相对lib目录的src来源
                        src: '**/*.js', //实际的匹配模式
                        dest: 'build/', //目标路径前缀
                        ext: '.min.js' //目标文件路径中文件的扩展名.
                    }]
                }
            },
            jshint: {
                // define the files to lint
                files: ['gruntfile.js', 'src/**/*.js'],
                // configure JSHint (documented at http://www.jshint.com/docs/)
                options: {
                    // more options here if you want to override JSHint defaults
                    globals: {
                        jQuery: true,
                        console: true,
                        module: true
                    }
                }
            }
    
        });
    
        // 加载提供"uglify"任务的插件
        grunt.loadNpmTasks('grunt-contrib-uglify');
        grunt.loadNpmTasks('grunt-contrib-jshint');
    
        // 默认任务
        grunt.registerTask('default', ['uglify']);
        grunt.registerTask('jiance', ['jshint']);
    };
  • 相关阅读:
    Ansible概述
    iptables端口转发
    iptables配置实例
    iptables常用操作
    iptables常用命令
    每日总结3.15
    每日总结3.12
    每日总结3.11
    每日总结3.10
    每日总结3.9
  • 原文地址:https://www.cnblogs.com/qqloving/p/3633051.html
Copyright © 2011-2022 走看看