Skip to content
This repository was archived by the owner on Feb 25, 2018. It is now read-only.

Commit 5e42c7f

Browse files
committed
Add editorconfig, update Grunt task.
1 parent 65b21cc commit 5e42c7f

7 files changed

Lines changed: 38 additions & 8 deletions

File tree

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
indent_style = spaces
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
indent_size = 2

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# CHANGELOG
2+
3+
### HEAD
4+
* Add time-grunt to measure build times
5+
* Add jit-grunt to load tasks only when needed (+ improve performance)
6+
* Change log level to notice in Gruntfile
7+
* Document correct CasperJS log levels and pass them as arguments / option
8+
* Added .editorconfig
9+
10+
### v0.3.0
11+
* Added `mismatchTolerance` tolerance (`mismatchTolerance: 0.0.5` is default) (thx [fidgety](https://github.com/chrisgladd/grunt-phantomcss/pull/17))
12+
* Use PhantomCSS v0.7.1
13+
* Update dependencies
14+
* Remove grunt as peerDependency causing multiple issues with peerPackages
15+
* Fix post-script `bower install`

Gruntfile.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ module.exports = function (grunt) {
3737
visualTest: {
3838
options: {
3939
screenshots: 'fixtures/screenshots/',
40-
results: 'results/'
40+
results: 'results/',
41+
viewportSize: [1280, 800],
42+
mismatchTolerance: 0.05,
43+
logLevel: 'warning' // debug | info | warning | error
4144
},
4245
src: [
4346
'fixtures/coffeemachine_test.js'
@@ -51,13 +54,13 @@ module.exports = function (grunt) {
5154
},
5255
});
5356

54-
// Actually load this plugin's task(s).
55-
grunt.loadTasks('tasks');
57+
// Timings for Grunt
58+
require('time-grunt')(grunt);
5659

57-
// These plugins provide necessary tasks.
58-
grunt.loadNpmTasks('grunt-contrib-jshint');
59-
grunt.loadNpmTasks('grunt-contrib-clean');
60-
grunt.loadNpmTasks('grunt-contrib-nodeunit');
60+
// Load all tasks JIT
61+
require('jit-grunt')(grunt, {
62+
phantomcss: 'tasks/phantomcss.js'
63+
});
6164

6265
// Whenever the "test" task is run, first clean the "tmp" dir,
6366
// then run this plugin's task(s), then test the result.
-11.2 KB
Binary file not shown.
-14 KB
Binary file not shown.
-7.64 KB
Binary file not shown.

tasks/phantomcss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function(grunt) {
2626
results: 'results',
2727
viewportSize: [1280, 800],
2828
mismatchTolerance: 0.05,
29-
logLevel: 'error' // notice | warn | error
29+
logLevel: 'debug' // debug | info | warning | error
3030
});
3131

3232
// Timeout ID for message checking loop

0 commit comments

Comments
 (0)