Skip to content

Commit

Permalink
Infrastructure updates and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Feb 20, 2013
1 parent e2d7fdf commit b423c9c
Show file tree
Hide file tree
Showing 46 changed files with 812 additions and 402 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
.DS_Store .DS_Store
docs/_build /docs/_build
node_modules /node_modules
15 changes: 15 additions & 0 deletions .jshintrc
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"unused": true,
"boss": true,
"eqnull": true,
"node": true,
"es5": true
}
156 changes: 156 additions & 0 deletions Gruntfile.js
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,156 @@
'use strict';

module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('jcarousel.jquery.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
clean: {
files: ['dist']
},
concat: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
all: {
src: [
'src/core.js',
'src/core_plugin.js',
'src/scrollintoview.js',
'src/control.js',
'src/pagination.js',
'src/autoscroll.js'
],
dest: 'dist/jquery.<%= pkg.name %>.js'
},
core: {
src: [
'src/core.js',
'src/core_plugin.js'
],
dest: 'dist/jquery.<%= pkg.name %>-core.js'
},
scrollintoview: {
src: [
'src/scrollintoview.js'
],
dest: 'dist/jquery.<%= pkg.name %>-scrollintoview.js'
},
control: {
src: [
'src/control.js'
],
dest: 'dist/jquery.<%= pkg.name %>-control.js'
},
pagination: {
src: [
'src/pagination.js'
],
dest: 'dist/jquery.<%= pkg.name %>-pagination.js'
},
autoscroll: {
src: [
'src/autoscroll.js'
],
dest: 'dist/jquery.<%= pkg.name %>-autoscroll.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
all: {
src: '<%= concat.all.dest %>',
dest: 'dist/jquery.<%= pkg.name %>.min.js'
},
core: {
src: '<%= concat.core.dest %>',
dest: 'dist/jquery.<%= pkg.name %>-core.min.js'
},
scrollintoview: {
src: '<%= concat.scrollintoview.dest %>',
dest: 'dist/jquery.<%= pkg.name %>-scrollintoview.min.js'
},
control: {
src: '<%= concat.control.dest %>',
dest: 'dist/jquery.<%= pkg.name %>-control.min.js'
},
pagination: {
src: '<%= concat.pagination.dest %>',
dest: 'dist/jquery.<%= pkg.name %>-pagination.min.js'
},
autoscroll: {
src: '<%= concat.autoscroll.dest %>',
dest: 'dist/jquery.<%= pkg.name %>-autoscroll.min.js'
}
},
replace: {
dist: {
options: {
variables: {
'VERSION': '<%= pkg.version %>',
'DATE': '<%= grunt.template.today() %>'
},
prefix: '@'
},
files: {
'dist/': ['dist/*.js']
}
}
},
qunit: {
files: ['test/unit/**/*.html']
},
jshint: {
gruntfile: {
options: {
jshintrc: '.jshintrc'
},
src: 'Gruntfile.js'
},
src: {
options: {
jshintrc: 'src/.jshintrc'
},
src: ['src/**/*.js']
},
test: {
options: {
jshintrc: 'test/unit/.jshintrc'
},
src: ['test/unit/**/*.js']
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
src: {
files: '<%= jshint.src.src %>',
tasks: ['jshint:src', 'qunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
}
}
});

grunt.loadNpmTasks('grunt-replace');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('default', ['jshint', 'qunit']);
grunt.registerTask('dist', ['clean', 'concat', 'replace', 'uglify']);

};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012 Jan Sorgalla Copyright (c) 2013 Jan Sorgalla


Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation obtaining a copy of this software and associated documentation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ inspired by the [Carousel Component](http://billwscott.com/carousel/) by
License License
------- -------


Copyright (c) 2012 Jan Sorgalla. Copyright (c) 2013 Jan Sorgalla.
Released under the [MIT](https://github.com/jsor/jcarousel/blob/master/LICENSE-MIT) license. Released under the [MIT](https://github.com/jsor/jcarousel/blob/master/LICENSE-MIT) license.
8 changes: 3 additions & 5 deletions dist/jquery.jcarousel-autoscroll.js
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,6 @@
/*! jCarousel - v0.3.0-beta.2 - 2013-01-31 /*! jCarousel - v0.3.0-beta.2 - 2013-02-19
* http://sorgalla.com/jcarousel/ * http://sorgalla.com/jcarousel
* Copyright 2013 Jan Sorgalla * Copyright (c) 2013 Jan Sorgalla; Licensed MIT */
* Released under the MIT license */

(function($) { (function($) {
'use strict'; 'use strict';


Expand Down
9 changes: 4 additions & 5 deletions dist/jquery.jcarousel-autoscroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions dist/jquery.jcarousel-control.js
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,6 @@
/*! jCarousel - v0.3.0-beta.2 - 2013-01-31 /*! jCarousel - v0.3.0-beta.2 - 2013-02-19
* http://sorgalla.com/jcarousel/ * http://sorgalla.com/jcarousel
* Copyright 2013 Jan Sorgalla * Copyright (c) 2013 Jan Sorgalla; Licensed MIT */
* Released under the MIT license */

(function($) { (function($) {
'use strict'; 'use strict';


Expand Down
9 changes: 4 additions & 5 deletions dist/jquery.jcarousel-control.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions dist/jquery.jcarousel-core.js
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,6 @@
/*! jCarousel - v0.3.0-beta.2 - 2013-01-31 /*! jCarousel - v0.3.0-beta.2 - 2013-02-19
* http://sorgalla.com/jcarousel/ * http://sorgalla.com/jcarousel
* Copyright 2013 Jan Sorgalla * Copyright (c) 2013 Jan Sorgalla; Licensed MIT */
* Released under the MIT license */

(function($) { (function($) {
'use strict'; 'use strict';


Expand Down
Loading

0 comments on commit b423c9c

Please sign in to comment.