gruntfile
来源:互联网 发布:数学学术论文知乎 编辑:程序博客网 时间:2024/05/02 04:37
{ "name": "123", "version": "1.0.0", "description": "tosone", "main": "Gruntfile.js", "dependencies": {}, "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-copy": "^0.7.0", "grunt-contrib-cssmin": "^0.11.0", "grunt-contrib-htmlmin": "^0.3.0", "grunt-contrib-uglify": "^0.7.0", "grunt-rev": "^0.1.0", "grunt-usemin": "^3.0.0", "load-grunt-tasks": "^2.0.0", "time-grunt": "^1.0.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "tosone", "license": "ISC"}
'use strict';module.exports = function(grunt) {require('load-grunt-tasks')(grunt);require('time-grunt')(grunt);grunt.loadNpmTasks('grunt-rev');grunt.loadNpmTasks('grunt-contrib-htmlmin');grunt.loadNpmTasks('grunt-contrib-cssmin');grunt.loadNpmTasks('grunt-contrib-uglify');grunt.loadNpmTasks('grunt-contrib-copy');grunt.loadNpmTasks('grunt-contrib-clean');grunt.loadNpmTasks('grunt-contrib-concat');grunt.loadNpmTasks('grunt-usemin');var config = {app: "app",dist: "dist"};grunt.initConfig({config: config,clean: {dist: {files: [{src: ['<%= config.dist %>/**/*','!<%= config.dist %>/.git']}]}},copy: {dist: {files: [{expand: true,cwd: '<%= config.app %>/',src: ['**/*.{php,png,jpg,bmp,ico,jpeg,ttf,svg,woff,eot,mp4,mp3,swf}'],dest: '<%= config.dist %>/'}]}},htmlmin: {dist: {options: {removeComments: true,collapseWhitespace: true},files: [{expand: true,cwd: '<%= config.app %>/',src: ['**/*.html'],dest: '<%= config.dist %>/'}]}},uglify: {dist: {files: [{expand: true,cwd: '<%= config.app %>/',src: ['**/*.js'],dest: '<%= config.dist %>/'}]}},cssmin: {dist: {files: [{expand: true,cwd: '<%= config.app %>/',src: ['**/*.css'],dest: '<%= config.dist %>/'}]}},rev: {options: {algorithm: 'md5',length: 8},dist: {files: [{src: ['<%= config.dist %>/**/*.{js,css,png,jpg,bmp,ico,jpeg,ttf,svg,woff,eot,mp4,mp3,swf}'],dest: '<%= config.dist %>/123/'}]}},usemin: {css: '<%= config.dist %>/**/*.css',html: '<%= config.dist %>/**/*.html',js: '<%= config.dist %>/**/*.js',}})grunt.registerTask('build', ['clean', 'copy', 'uglify', 'htmlmin', 'cssmin', 'rev', 'usemin']);}
0 0
- gruntfile
- Gruntfile 范例
- Gruntfile.coffee
- Gruntfile.js详解
- grunt gruntfile.js详解
- Gruntfile.js详解
- Grunt 入门教程三:GruntFile 例子
- 一份Gruntfile.js的样板
- Grunt Gruntfile.js文件详解
- grunt学习笔记三:gruntfile.js-demo
- nodeJs grunt中Gruntfile.js模版
- package.json, Gruntfile.js等文件配置
- Build the seajs project 2: editing the Gruntfile
- Grunt如何拆分Gruntfile.js进行任务拆分的?
- grunt入门讲解3:实例讲解使用 Gruntfile 配置任务
- grunt入门讲解3:实例讲解使用 Gruntfile 配置任务
- Grunt学习笔记之Gruntfile中任务的配置
- Grunt Gruntfile.js uglify concat watch 基本配置
- 将大写字母转化成小写字母
- No package 'glibmm-2.4' found ( When install Mango)
- 第三方开始大力开发艰苦拉萨地方阿斯蒂芬阿萨德
- 解决C++中宏定义导致的名字污染
- hdu 3549 Flow Problem(最大流)
- gruntfile
- 银行的利润到底有多高?
- Asp.net判断图片存在的并获取图片
- 蓝桥杯试题集 基础练习 特殊回文数
- java的Future和FutureTask
- 7.ios之xib的使用
- [IOS]你用过原生的 UIRefreshControl 吗?
- Linux账号管理
- 支持不同设备(2)支持不同的屏幕