Code Monkey home page Code Monkey logo

grunt-seed's Introduction

grunt-seed

a web project seed used grunt

#安装Grunt

npm install -g grunt-cli

进入到下载的代码目录执行以下命令

#安装插件

npm install --save-dev

#启动本地开发

grunt server

#部署

grunt build

#测试

grunt test

#插件的使用

##Css

  1. autoprefixer 解析CSS文件并且添加浏览器前缀到CSS规则里,使用 Can I Use的数据来决定哪些前缀是需要的

  2. grunt-contrib-less 编译 LESS 文件到 CSS.

  3. grunt-contrib-cssmin CSS压缩

##JS

  1. grunt-contrib-uglify 使用UglifyJS压缩JS文件
  2. grunt-contrib-jshint JS文件格式检查
  3. grunt-contrib-requirejs 使用r.js优化RequireJS工程

##Image

  1. grunt-contrib-imagemin 图片压缩

##Html

  1. grunt-contrib-htmlmin html压缩

##Test

  1. grunt-karma 运行 Karma 测试

##Automation自动化

  1. load-grunt-tasks 简化加载npmtasks
  2. grunt-concurrent 用来执行多线程任务的
  3. time-grunt 计算任务的执行时间
  4. grunt-newer 配置 Grunt 的 Task 只执行新文件
  5. grunt-open 自动打开浏览器
  6. grunt-contrib-connect 启动一个 Web Server
  7. grunt-connect-proxy 启动一个代理 Web Server 用于代理后端服务
  8. grunt-contrib-copy 自动复制粘贴文件
  9. grunt-rev 文件名md5避免缓存
  10. grunt-contrib-watch 监测文件变化,自动执行其他Task
  11. grunt-contrib-livereload 自动刷新浏览器,增加F5的使用寿命,开发必备
  12. grunt-contrib-clean 清理无用文件
  13. grunt-usemin 自动合并文件,concat -> uglifyjs
  14. grunt-replace 替换变量 style.css?rel=@@timestamp --> style.css?rel=1388030486

grunt-seed's People

Contributors

bingooyong avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.