Skip to content

Commit 4ec8647

Browse files
author
Alexander Prinzhorn
committed
Upgrade to grunt 0.4. Fixes Prinzhorn#144
1 parent 6e4aa40 commit 4ec8647

11 files changed

+113
-52
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

Gruntfile.js

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
module.exports = function(grunt) {
2+
//Configuration.
3+
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json') ,
5+
jshint: {
6+
options: {
7+
smarttabs: false
8+
},
9+
all: ['Gruntfile.js', 'test/test.js', 'src/skrollr.js', 'src/plugins/skrollr.ie.js', 'src/plugins/skrollr.menu.js', 'src/mobile/skrollr.mobile.js']
10+
},
11+
qunit: {
12+
all: ['test/index.html']
13+
},
14+
uglify: {
15+
options: {
16+
banner: '/*! skrollr <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) | Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr | Free to use under terms of MIT license */\n'
17+
},
18+
19+
all: {
20+
files: {
21+
'dist/skrollr.min.js': ['src/skrollr.js'],
22+
'dist/skrollr.mobile.min.js': ['src/mobile/iscroll.js', 'src/mobile/skrollr.mobile.js'],
23+
'dist/skrollr.ie.min.js': ['src/plugins/skrollr.ie.js'],
24+
'dist/skrollr.menu.min.js': ['src/plugins/skrollr.menu.js']
25+
}
26+
},
27+
28+
mobile: {
29+
options: {
30+
banner:
31+
'/*! skrollr <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) | Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr | Free to use under terms of MIT license */\n' +
32+
'/*! contains iScroll */\n' +
33+
'/*! iScroll v4.2.4 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org Released under MIT license, http://cubiq.org/license */\n'
34+
},
35+
36+
files: {
37+
'dist/skrollr.mobile.min.js': ['src/mobile/iscroll.js', 'src/mobile/skrollr.mobile.js']
38+
}
39+
}
40+
}
41+
});
42+
43+
//Dependencies.
44+
grunt.loadNpmTasks('grunt-contrib-jshint');
45+
grunt.loadNpmTasks('grunt-contrib-qunit');
46+
grunt.loadNpmTasks('grunt-contrib-uglify');
47+
48+
//Tasks.
49+
grunt.registerTask('default', ['jshint', 'qunit', 'uglify']);
50+
grunt.registerTask('travis', ['jshint', 'qunit']);
51+
};

dist/skrollr.ie.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/skrollr.menu.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/skrollr.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/skrollr.mobile.min.js

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+37-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
{
2-
"name": "skrollr",
3-
"title": "skrollr",
4-
"description": "Stand-alone parallax scrolling library with zero dependencies.",
5-
"version": "0.5.0-alpha",
6-
"homepage": "https://github.com/Prinzhorn/skrollr",
7-
"author": {
8-
"name": "Alexander Prinzhorn",
9-
"email": "[email protected]",
10-
"url": "http://www.prinzhorn.it/"
11-
},
12-
"repository": {
13-
"type": "git",
14-
"url": "git://github.com/Prinzhorn/skrollr.git"
15-
},
16-
"bugs": {
17-
"url": "https://github.com/Prinzhorn/skrollr/issues"
18-
},
19-
"licenses": [
20-
{
21-
"type": "MIT",
22-
"url": "https://github.com/Prinzhorn/skrollr/blob/master/LICENSE.txt"
23-
}
24-
],
25-
"main": "dist/skrollr.min.js",
26-
"engines": {
27-
"node": ">=0.8"
28-
},
29-
"scripts": {
30-
"test": "grunt travis --verbose"
31-
},
32-
"devDependencies": {
33-
"grunt": "0.3.x"
34-
},
35-
"keywords": []
2+
"name": "skrollr",
3+
"title": "skrollr",
4+
"description": "Stand-alone parallax scrolling library with zero dependencies.",
5+
"version": "0.5.14",
6+
"homepage": "https://github.com/Prinzhorn/skrollr",
7+
"author": {
8+
"name": "Alexander Prinzhorn",
9+
"email": "[email protected]",
10+
"url": "http://www.prinzhorn.it/"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git://github.com/Prinzhorn/skrollr.git"
15+
},
16+
"bugs": {
17+
"url": "https://github.com/Prinzhorn/skrollr/issues"
18+
},
19+
"licenses": [
20+
{
21+
"type": "MIT",
22+
"url": "https://github.com/Prinzhorn/skrollr/blob/master/LICENSE.txt"
23+
}
24+
],
25+
"main": "dist/skrollr.min.js",
26+
"engines": {
27+
"node": ">=0.8"
28+
},
29+
"scripts": {
30+
"test": "grunt travis --verbose"
31+
},
32+
"devDependencies": {
33+
"grunt": "~0.4.1",
34+
"grunt-contrib-uglify": "~0.2.0",
35+
"grunt-contrib-jshint": "~0.3.0",
36+
"grunt-contrib-qunit": "~0.2.0"
37+
},
38+
"keywords": []
3639
}

src/mobile/skrollr.mobile.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
/*
1+
/*!
2+
* Plugin for skrollr.
23
* This file is the bridge between iscroll and skrollr.
34
* It configures the page so that both work together
45
* and exposes an instance of iscroll to skrollr.
5-
*/
66
7+
* Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr
8+
*
9+
* Free to use under terms of MIT license
10+
*/
711
(function(window, document, undefined) {
812
document.addEventListener('touchmove', function(e) {
913
e.preventDefault();

src/plugins/skrollr.ie.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* Plugin for skrollr.
33
* This plugin brings opacity and hsl colors to IE < 9.
44
*
5-
* https://github.com/Prinzhorn/skrollr
5+
* Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr
66
*
7-
* free to use under terms of MIT license
7+
* Free to use under terms of MIT license
88
*/
99
(function(document, skrollr) {
1010
var rxHSLAColor = /hsla?\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)%\s*,\s*(-?[\d.]+)%.*?\)/g;

src/plugins/skrollr.menu.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/*!
1+
/*!
22
* Plugin for skrollr.
33
* This plugin makes hashlinks scroll nicely to their target position.
44
*
5-
* https://github.com/Prinzhorn/skrollr
5+
* Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr
66
*
7-
* free to use under terms of MIT license
7+
* Free to use under terms of MIT license
88
*/
99
(function(document, skrollr) {
1010
var DEFAULT_DURATION = 500;

src/skrollr.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* skrollr
2+
* skrollr core
33
*
4-
* https://github.com/Prinzhorn/skrollr
4+
* Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr
55
*
6-
* free to use under terms of MIT license
6+
* Free to use under terms of MIT license
77
*/
88
(function(window, document, undefined) {
99
'use strict';

0 commit comments

Comments
 (0)