-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b074760
Showing
20 changed files
with
1,117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "bower_components" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"language": { | ||
"javascript": { | ||
"linting.prefer": [ | ||
"JSHint", | ||
"JSCS" | ||
], | ||
"linting.usePreferredOnly": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
indent_style = spaces | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/bower_components | ||
/node_modules | ||
/npm-debug.log | ||
/tmp | ||
**/results | ||
/scratchpad.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"preset": "crockford", | ||
"disallowDanglingUnderscores": null, | ||
"disallowTrailingWhitespace": null, | ||
"requireLineFeedAtFileEnd": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"node": true, | ||
"browser": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"regexp": true, | ||
"undef": true, | ||
"trailing": true, | ||
"smarttabs": true, | ||
"sub": true, | ||
"boss": true, | ||
"eqnull": true, | ||
"phantom": true, | ||
|
||
"globals": { | ||
"jQuery": true, | ||
"$": true, | ||
"Modernizr": true, | ||
|
||
"module": true, | ||
"require": true, | ||
"requirejs": true, | ||
"define": true, | ||
|
||
"sinon": true, | ||
"describe": true, | ||
"it": true, | ||
"expect": true, | ||
"beforeEach": true, | ||
"afterEach": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# CHANGELOG | ||
|
||
### HEAD | ||
|
||
### v0.3.2 | ||
* Update dependencies | ||
* Add `mismatchTolerance`as option | ||
* Add `waitTimeout` as option | ||
|
||
### v0.3.1 | ||
* Keep log level at "notice" | ||
* Add time-grunt to measure build times | ||
* Add jit-grunt to load tasks only when needed (+ improve performance) | ||
* Change log level to notice in Gruntfile | ||
* Document correct CasperJS log levels and pass them as arguments / option | ||
* Added .editorconfig | ||
|
||
### v0.3.0 | ||
* Added `mismatchTolerance` tolerance (`mismatchTolerance: 0.0.5` is default) (thx [fidgety](https://github.com/chrisgladd/grunt-phantomcss/pull/17)) | ||
* Use PhantomCSS v0.7.1 | ||
* Update dependencies | ||
* Remove grunt as peerDependency causing multiple issues with peerPackages | ||
* Fix post-script `bower install` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* grunt-phantomcss | ||
* https://github.com/micahgodbolt/grunt-phantomcss | ||
* | ||
* Copyright (c) 2013 Chris Gladd | ||
* Copyright (c) since 2014 Anselm Hannemann | ||
* Copyright (c) since 2015 Micah Godbolt | ||
* | ||
* Licensed under the MIT license. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = function (grunt) { | ||
var jsHintFiles = [ | ||
'Gruntfile.js', | ||
'tasks/phantomcss.js', | ||
'phantomjs/runner.js', | ||
'<%= nodeunit.tests %>' | ||
]; | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
jshint: { | ||
all: jsHintFiles, | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}, | ||
|
||
jscs: { | ||
options: { | ||
config: '.jscsrc' | ||
}, | ||
all: jsHintFiles | ||
}, | ||
|
||
// Before generating any new files, remove any | ||
// previously-created files. | ||
clean: { | ||
tests: ['tmp'], | ||
results: ['results'] | ||
}, | ||
|
||
// Configuration to be run (and then tested). | ||
phantomcss: { | ||
visualTest: { | ||
options: { | ||
screenshots: 'screenshots', | ||
results: 'results', | ||
viewportSize: [1280, 800], | ||
mismatchTolerance: 0.05, | ||
waitTimeout: 5000, | ||
rootUrl: 'fixtures', | ||
logLevel: 'warning' // debug | info | warning | error | ||
}, | ||
src: [ | ||
'fixtures/**/*_test.js' | ||
] | ||
} | ||
}, | ||
|
||
// Unit tests. | ||
nodeunit: { | ||
tests: ['test/*_test.js'] | ||
} | ||
}); | ||
|
||
// Timings for Grunt | ||
require('time-grunt')(grunt); | ||
|
||
// Load all tasks JIT | ||
require('jit-grunt')(grunt, { | ||
phantomcss: 'tasks/phantomcss.js' | ||
}); | ||
|
||
// Whenever the "test" task is run, first clean the "tmp" dir, | ||
// then run this plugin's task(s), then test the result. | ||
grunt.registerTask('test', ['clean', 'phantomcss', 'nodeunit']); | ||
|
||
// By default, lint and run all tests. | ||
grunt.registerTask('default', ['jscs', 'jshint', 'test']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Currently maintained and therefore Copyright (c) 2014 | ||
(applies to all commits since 2014-07-01) Anselm Hannemann | ||
|
||
---- | ||
|
||
Original Copyright (c) 2013 Chris Gladd | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.