Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'grunt-automation'
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilto committed Apr 9, 2015
2 parents a8c2c6f + 18cfb9b commit 7d59fd3
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,4 +5,5 @@ node_modules
**/.sass-cache/*
*.bak
*.zip
.grunt

34 changes: 25 additions & 9 deletions gruntfile.js
Expand Up @@ -19,7 +19,7 @@
files: [ "dist" ]
},
concat: {

dist: {
options: {
banner: "<%= banner %>",
Expand All @@ -38,7 +38,7 @@
dest: "dist/picturefill.min.js"
}
},

qunit: {
files: [ "tests/**/*.html" ]
},
Expand All @@ -55,6 +55,20 @@
src: "<%= jshint.all.src %>"
}
},
"gh-pages": {
options: {
base: '.'
},
src: ["**/*", "!node_modules/**/*", "!test/**/*", "!src/**/*"]
},
release: {
options: {
additionalFiles: ["bower.json"],
commitMessage: "Picturefill <%= version %>",
tagMessage: "Picturefill <%= version %>",
afterRelease: ["gh-pages"]
}
},
watch: {
gruntfile: {
files: [ "Gruntfile.js", "src/*.js", "src/includes/*.js", "tests/*.js" ],
Expand Down Expand Up @@ -84,26 +98,27 @@
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-jscs-checker");

grunt.loadNpmTasks("grunt-gh-pages");

grunt.task.registerTask("support-types", "insert support for image types dev wants to include", function() {
var supportTypes = "";
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];

switch ( arg ) {
case "webp":
case "webp":
case "svg":
case "jxr":
case "jp2":
case "apng":

toConcat.push("src/includes/" + arg + ".js");
}

supportTypes += ":" + arg;

}

if (!supportTypes) {
supportTypes = supportTypes;
}
Expand All @@ -114,5 +129,6 @@
// Default task.
grunt.registerTask("default", [ "jscs", "test", "clean", "concat", "uglify" ]);
grunt.registerTask("test", [ "jscs", "jshint", "qunit" ]);
grunt.registerTask("publish", [ "gh-pages" ]);
};
})();
76 changes: 39 additions & 37 deletions package.json
@@ -1,39 +1,41 @@
{
"name": "picturefill",
"description": "A responsive image polyfill.",
"version": "2.3.1",
"homepage": "https://scottjehl.github.io/picturefill/",
"bugs": "https://github.com/scottjehl/picturefill/issues",
"license": "MIT",
"author": "Scott Jehl <scottjehl@gmail.com>",
"repository": {
"type": "git",
"url": "git@github.com:scottjehl/picturefill.git"
},
"keywords": [
"picturefill",
"srcset",
"picture",
"responsive",
"responsive images"
],
"engines": {
"node": ">= 0.8.0"
},
"main": "./dist/picturefill",
"scripts": {
"test": "grunt test --verbose"
},
"devDependencies": {
"grunt": "~0.4.2",
"grunt-cli": "~0.1",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-qunit": "~0.2.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-watch": "~0.6.0",
"grunt-jscs-checker": "~0.4.3",
"grunt-insert": "~0.1.0"
}
"name": "picturefill",
"description": "A responsive image polyfill.",
"version": "2.3.1",
"homepage": "https://scottjehl.github.io/picturefill/",
"bugs": "https://github.com/scottjehl/picturefill/issues",
"license": "MIT",
"author": "Scott Jehl <scottjehl@gmail.com>",
"repository": {
"type": "git",
"url": "git@github.com:scottjehl/picturefill.git"
},
"keywords": [
"picturefill",
"srcset",
"picture",
"responsive",
"responsive images"
],
"engines": {
"node": ">= 0.8.0"
},
"main": "./dist/picturefill",
"scripts": {
"test": "grunt test --verbose"
},
"devDependencies": {
"grunt": "~0.4.2",
"grunt-cli": "~0.1",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-qunit": "~0.2.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-watch": "~0.6.0",
"grunt-gh-pages": "^0.10.0",
"grunt-insert": "~0.1.0",
"grunt-jscs-checker": "~0.4.3",
"grunt-release": "^0.12.0"
}
}

0 comments on commit 7d59fd3

Please sign in to comment.