Skip to content
Permalink
Browse files

Grunt: Add grunt-esformatter, formats all source files (no validation)

  • Loading branch information
jzaefferer committed Dec 7, 2013
1 parent 6a483fd commit 327bcbae8c7ee3021325e27136a258a47488f847
Showing with 17 additions and 0 deletions.
  1. +16 −0 Gruntfile.js
  2. +1 −0 package.json
@@ -110,6 +110,7 @@ grunt.loadNpmTasks( "grunt-jscs-checker" );
grunt.loadNpmTasks( "grunt-html" );
grunt.loadNpmTasks( "grunt-compare-size" );
grunt.loadNpmTasks( "grunt-git-authors" );
grunt.loadNpmTasks( "grunt-esformatter" );
// local testswarm and build tasks
grunt.loadTasks( "build/tasks" );

@@ -202,6 +203,21 @@ grunt.initConfig({
csslintrc: ".csslintrc"
}
}
},

esformatter: {
options: {
preset: "jquery"
},
ui: "ui/*.js",
tests: "tests/unit/**/*.js",
build: {
options: {
skipHashbang: true
},
src: "build/**/*.js"
},
grunt: "Gruntfile.js"
}
});

@@ -66,6 +66,7 @@
"grunt-jscs-checker": "0.2.0",
"grunt-html": "0.3.3",
"grunt-git-authors": "1.2.0",
"grunt-esformatter": "0.2.0",
"rimraf": "2.1.4",
"testswarm": "1.1.0"
},

5 comments on commit 327bcba

@rxaviers

This comment has been minimized.

Copy link
Member

@rxaviers rxaviers replied Dec 11, 2013

Is it a temporary or permanent thing?

While I understand this is a very nice tool to help us to fix the coding standard former bugs in the short term, I am wondering what would be the long term reason of this task? Because, I think a validator is sufficient to point to the unnoticed coding standard slips. Is writing code in any format, then using esformatter to beautify it a practice we want to advocate?

@scottgonzalez

This comment has been minimized.

Copy link
Member

@scottgonzalez scottgonzalez replied Dec 11, 2013

Is writing code in any format, then using esformatter to beautify it a practice we want to advocate?

No, but it's much better than forcing a contributor to manually fix stupid things like spacing.

@rxaviers

This comment has been minimized.

Copy link
Member

@rxaviers rxaviers replied Dec 11, 2013

Ok. I see.

@jzaefferer

This comment has been minimized.

Copy link
Member Author

@jzaefferer jzaefferer replied Dec 18, 2013

I'm not sure how this ended up in master, I meant to only push this to the esformatter branch. Oh well, as long as you don't run grunt esformatter specifically, it doesn't do any damage.

@rxaviers

This comment has been minimized.

Copy link
Member

@rxaviers rxaviers replied Dec 18, 2013

:p

Please sign in to comment.
You can’t perform that action at this time.