grunt插件

  • 在项目中安装grunt插件

    • jscs npm install grunt-jscs —save-dev
    • jshint npm install grunt-contrib-jshint —save-dev
    • csslint npm install grunt-contrib-csslint —save-dev
    • scss-lint npm install grunt-scss-lint —save-dev
  • 插件的配置文件

    • JSCS
  1. {
  2. options: {
  3. config: true,
  4. verbose: true
  5. },
  6. files: {
  7. src: [...]
  8. }
  9. }
  • JSHint
  1. {
  2. options: {
  3. jshintrc: true
  4. },
  5. files: {
  6. src: [...]
  7. }
  8. }
  • CSSLint
  1. {
  2. options: {
  3. csslintrc: '.csslintrc'
  4. },
  5. files: {
  6. src: [...]
  7. }
  8. }
  • SCSS-Lint
  1. {
  2. options: {
  3. config: '.scss-lint.yml'
  4. },
  5. files: {
  6. src: [...]
  7. }
  8. }

Heavily inspired by Idiomatic CSS and the GitHub Styleguide.

Origin Project by @mdo.

Partly chinese translated by @zoomzhao.

Made with all the love by @AlloyTeam.

Open sourced under MIT. Copyright (c) 2015 Tencent AlloyTeam, All rights reserved.