首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Gruntfile.js中未找到任务“default”

在Gruntfile.js中未找到任务“default”
EN

Stack Overflow用户
提问于 2015-07-19 23:26:30
回答 1查看 77关注 0票数 0

我花了太多的时间来找出我的错误。我打赌我少了一个分号。

代码语言:javascript
复制
module.exports = function  (grunt) {

grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

cssbeautifier : {
files : ["css/style.css"],
options : {
indent: '  ',
openbrace: 'end-of-line',
autosemicolon: false
  }
}
grunt.loadNpmTasks('grunt-cssbeautifier');
grunt.registerTask('default',["cssbeautifier"]);
   })
}

package.json:

代码语言:javascript
复制
    {
  "name": "zavrsni-php",
  "version": "1.0.0",
  "description": "Job interview simulator\r Demo: http://interviewsimulator.eu.pn/",
  "main": "index.php",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/MarkoIvanetic/zavrsni-PHP.git"
  },
  "author": "Grad",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/MarkoIvanetic/zavrsni-PHP/issues"
  },
  "homepage": "https://github.com/MarkoIvanetic/zavrsni-PHP#readme",
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-cssbeautifier": "^0.1.2",
    "grunt-jsbeautifier": "^0.2.10"
  }
}

EN

回答 1

Stack Overflow用户

发布于 2015-07-20 00:02:36

找到它,把花括号放错地方

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31502801

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档