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

Commit 7d59fd3

Browse files
committed
Merge branch 'grunt-automation'
2 parents a8c2c6f + 18cfb9b commit 7d59fd3

File tree

3 files changed

+65
-46
lines changed

3 files changed

+65
-46
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ node_modules
55
**/.sass-cache/*
66
*.bak
77
*.zip
8+
.grunt
89

gruntfile.js

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
files: [ "dist" ]
2020
},
2121
concat: {
22-
22+
2323
dist: {
2424
options: {
2525
banner: "<%= banner %>",
@@ -38,7 +38,7 @@
3838
dest: "dist/picturefill.min.js"
3939
}
4040
},
41-
41+
4242
qunit: {
4343
files: [ "tests/**/*.html" ]
4444
},
@@ -55,6 +55,20 @@
5555
src: "<%= jshint.all.src %>"
5656
}
5757
},
58+
"gh-pages": {
59+
options: {
60+
base: '.'
61+
},
62+
src: ["**/*", "!node_modules/**/*", "!test/**/*", "!src/**/*"]
63+
},
64+
release: {
65+
options: {
66+
additionalFiles: ["bower.json"],
67+
commitMessage: "Picturefill <%= version %>",
68+
tagMessage: "Picturefill <%= version %>",
69+
afterRelease: ["gh-pages"]
70+
}
71+
},
5872
watch: {
5973
gruntfile: {
6074
files: [ "Gruntfile.js", "src/*.js", "src/includes/*.js", "tests/*.js" ],
@@ -84,26 +98,27 @@
8498
grunt.loadNpmTasks("grunt-contrib-uglify");
8599
grunt.loadNpmTasks("grunt-contrib-watch");
86100
grunt.loadNpmTasks("grunt-jscs-checker");
87-
101+
grunt.loadNpmTasks("grunt-gh-pages");
102+
88103
grunt.task.registerTask("support-types", "insert support for image types dev wants to include", function() {
89104
var supportTypes = "";
90105
for (var i = 0; i < arguments.length; i++) {
91106
var arg = arguments[i];
92-
107+
93108
switch ( arg ) {
94-
case "webp":
109+
case "webp":
95110
case "svg":
96111
case "jxr":
97112
case "jp2":
98113
case "apng":
99-
114+
100115
toConcat.push("src/includes/" + arg + ".js");
101116
}
102-
117+
103118
supportTypes += ":" + arg;
104-
119+
105120
}
106-
121+
107122
if (!supportTypes) {
108123
supportTypes = supportTypes;
109124
}
@@ -114,5 +129,6 @@
114129
// Default task.
115130
grunt.registerTask("default", [ "jscs", "test", "clean", "concat", "uglify" ]);
116131
grunt.registerTask("test", [ "jscs", "jshint", "qunit" ]);
132+
grunt.registerTask("publish", [ "gh-pages" ]);
117133
};
118134
})();

package.json

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
{
2-
"name": "picturefill",
3-
"description": "A responsive image polyfill.",
4-
"version": "2.3.1",
5-
"homepage": "https://scottjehl.github.io/picturefill/",
6-
"bugs": "https://github.com/scottjehl/picturefill/issues",
7-
"license": "MIT",
8-
"author": "Scott Jehl <[email protected]>",
9-
"repository": {
10-
"type": "git",
11-
"url": "[email protected]:scottjehl/picturefill.git"
12-
},
13-
"keywords": [
14-
"picturefill",
15-
"srcset",
16-
"picture",
17-
"responsive",
18-
"responsive images"
19-
],
20-
"engines": {
21-
"node": ">= 0.8.0"
22-
},
23-
"main": "./dist/picturefill",
24-
"scripts": {
25-
"test": "grunt test --verbose"
26-
},
27-
"devDependencies": {
28-
"grunt": "~0.4.2",
29-
"grunt-cli": "~0.1",
30-
"grunt-contrib-clean": "~0.4.0",
31-
"grunt-contrib-concat": "~0.3.0",
32-
"grunt-contrib-jshint": "~0.10.0",
33-
"grunt-contrib-qunit": "~0.2.0",
34-
"grunt-contrib-uglify": "~0.2.0",
35-
"grunt-contrib-watch": "~0.6.0",
36-
"grunt-jscs-checker": "~0.4.3",
37-
"grunt-insert": "~0.1.0"
38-
}
2+
"name": "picturefill",
3+
"description": "A responsive image polyfill.",
4+
"version": "2.3.1",
5+
"homepage": "https://scottjehl.github.io/picturefill/",
6+
"bugs": "https://github.com/scottjehl/picturefill/issues",
7+
"license": "MIT",
8+
"author": "Scott Jehl <[email protected]>",
9+
"repository": {
10+
"type": "git",
11+
"url": "[email protected]:scottjehl/picturefill.git"
12+
},
13+
"keywords": [
14+
"picturefill",
15+
"srcset",
16+
"picture",
17+
"responsive",
18+
"responsive images"
19+
],
20+
"engines": {
21+
"node": ">= 0.8.0"
22+
},
23+
"main": "./dist/picturefill",
24+
"scripts": {
25+
"test": "grunt test --verbose"
26+
},
27+
"devDependencies": {
28+
"grunt": "~0.4.2",
29+
"grunt-cli": "~0.1",
30+
"grunt-contrib-clean": "~0.4.0",
31+
"grunt-contrib-concat": "~0.3.0",
32+
"grunt-contrib-jshint": "~0.10.0",
33+
"grunt-contrib-qunit": "~0.2.0",
34+
"grunt-contrib-uglify": "~0.2.0",
35+
"grunt-contrib-watch": "~0.6.0",
36+
"grunt-gh-pages": "^0.10.0",
37+
"grunt-insert": "~0.1.0",
38+
"grunt-jscs-checker": "~0.4.3",
39+
"grunt-release": "^0.12.0"
40+
}
3941
}

0 commit comments

Comments
 (0)