From a0e538c6e4655b08ce58dbfc0e60c00b5dd6292b Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Wed, 4 Nov 2015 12:19:11 +0200 Subject: [PATCH] Added gruntfile, updated plugin information json's. --- Gruntfile.js | 52 +++++++++++++++++++++++++++++++++++++ bower.json | 1 - package.json | 16 +++++++----- twbs-pagination.jquery.json | 4 +-- 4 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..61cd5ea --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,52 @@ +module.exports = function (grunt) { + // Project configuration. + grunt.initConfig({ + // Task configuration. + pkg: grunt.file.readJSON('package.json'), + + // License banner text + banner: '/*\n' + + ' * <%= pkg.nativeName %> v<%= pkg.version %>\n' + + ' * <%= pkg.homepage %>\n' + + ' *\n' + + ' * Copyright 2014-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + + ' * Released under <%= pkg.license %> license\n' + + ' * <%= pkg.licenseUrl %>\n' + + ' */\n', + uglify: { + main: { + options: { + banner: '<%= banner %>', + sourceMap: false, + mangle: true, + compress: true, + beautify: false + }, + files: { + 'jquery.twbsPagination.min.js':'jquery.twbsPagination.js' + } + } + }, + // Run predefined tasks whenever watched file changed or deleted + watch: { + js: { + options: { + atBegin: true + }, + files: ['jquery.twbsPagination.js'], + tasks: [ + 'build' + ] + } + } + }); + + // These plugins provide necessary tasks. + require('load-grunt-tasks')(grunt); + + // Default task. + grunt.registerTask('default', ['watch:js']); + // + //// Custom tasks + grunt.registerTask('build', ['uglify:main']); +}; diff --git a/bower.json b/bower.json index d4ae04c..eb49c6f 100644 --- a/bower.json +++ b/bower.json @@ -24,7 +24,6 @@ "**/.*", "node_modules", "bower_components", - "test", "tests" ] } diff --git a/package.json b/package.json index 89118ff..749e128 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "twbs-pagination", "version": "1.2.6", + "nativeName": "jQuery Bootstrap Pagination", "homepage": "https://github.com/esimakin/twbs-pagination", "author": "Eugene Simakin ", "description": "jQuery simple pagination plugin for bootstrap-style webpages", @@ -8,16 +9,19 @@ "dependencies": { "jquery": ">=1.7.0" }, + "devDependencies": { + "grunt": "^0.4.5", + "grunt-cli": "~0.1.13", + "grunt-contrib-watch": "~0.6.1", + "grunt-contrib-uglify": "^0.9.2", + "load-grunt-tasks": "^3.1.0" + }, "keywords": [ "pagination", "jQuery", "jQuery-plugin", "bootstrap" ], - "volo": { - "dependencies": { - "jquery": "jquery/jquery/>=1.7.0" - } - }, - "license": "Apache 2.0" + "license": "Apache 2.0", + "licenseUrl": "http://apache.org/licenses/LICENSE-2.0.html" } diff --git a/twbs-pagination.jquery.json b/twbs-pagination.jquery.json index 969f30b..720621e 100644 --- a/twbs-pagination.jquery.json +++ b/twbs-pagination.jquery.json @@ -1,7 +1,7 @@ { "name": "twbs-pagination", "version": "1.2.6", - "title": "Twbs Pagination", + "title": "jQuery Bootstrap Pagination", "author": { "name": "Eugene Simakin", "email": "mail@esimakin.com", @@ -14,7 +14,7 @@ } ], "dependencies": { - "jquery": "> 1.10.2" + "jquery": "> 1.7" }, "description": "Twbs Pagination is a jQuery plugin that provides pagination for your web site or application. Check out the demo!", "keywords": [