Grunt的基本使用

 时间:2024-10-12 18:50:37

Grunt是一款自动化构建工具,下面介绍Grunt的安装和基本使用

Grunt的基本使用Grunt的基本使用

创建package.json文件

1、{ "name": "grunt-web", "version": "1.0.0", "description": "grunt", "main": "Gruntfile.js", "dependencies": { }, "author": "eamiear", "license": "MIT", "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-copy": "^0.8.0", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-sass": "*", "grunt-contrib-cssmin": "^0.12.2", "grunt-contrib-uglify": "^0.9.1", "grunt-contrib-watch": "*", "grunt-contrib-qunit": "*", "grunt-contrib-concat": "*", "grunt-autoprefixer": "~0.7.2", "grunt-contrib-compass": "latest", "grunt-contrib-livereload": "*", "grunt-contrib-connect": "*", "grunt-regarde": "*", "autoprefixer": "^6.1.0", "grunt-contrib-compass": "^1.0.3", "grunt-postcss": "^0.7.1", "load-grunt-tasks": "^3.2.0", "serve-index": "^1.7.3", "serve-static": "^1.10.2" }, "keywords": [ "grunt" ]}devDependencies:为依赖插件名称及其版本

Grunt的基本使用Grunt的基本使用Grunt的基本使用

执行任务

1、grunt-web中注册了一个serve任务,这个任务中启动了一个服务连接及观察任务。要执行该任务,只需在命令行控制台中输入grunt serve指令即可。

Grunt的基本使用
  • 劳保鞋的种类
  • 怎么做香菇炒丝瓜
  • 豆芽醋醋酸汤
  • 怎样对待发胖的丈夫
  • 热门搜索
    大亚湾旅游景点大全 福建莆田旅游 鸟巢水立方旅游攻略 镇江西津渡旅游攻略 驻马店旅游景点大全 印尼巴厘岛旅游攻略 辽宁周边旅游景点大全 哈尔滨旅游必去景点 适合春季旅游的地方 海口旅游景点介绍