Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-PaulCrowder committed Aug 12, 2015
0 parents commit b074760
Show file tree
Hide file tree
Showing 20 changed files with 1,117 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "bower_components"
}
11 changes: 11 additions & 0 deletions .brackets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"language": {
"javascript": {
"linting.prefer": [
"JSHint",
"JSCS"
],
"linting.usePreferredOnly": true
}
}
}
12 changes: 12 additions & 0 deletions .editorconfig
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
6 changes: 6 additions & 0 deletions .gitignore
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
6 changes: 6 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"preset": "crockford",
"disallowDanglingUnderscores": null,
"disallowTrailingWhitespace": null,
"requireLineFeedAtFileEnd": null
}
38 changes: 38 additions & 0 deletions .jshintrc
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
}
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
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`
83 changes: 83 additions & 0 deletions Gruntfile.js
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']);
};
27 changes: 27 additions & 0 deletions LICENSE-MIT
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.
Loading

0 comments on commit b074760

Please sign in to comment.