Browse Source

Merge pull request #192 from michaek/hotfix/grunt

Gruntfile for build tasks
Emanuele 11 years ago
parent
commit
a7a0cbc224

+ 63 - 0
Gruntfile.js

@@ -0,0 +1,63 @@
+module.exports = function(grunt) {
+  // load all grunt tasks
+  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
+
+  // Project configuration.
+  grunt.initConfig({
+    nodeunit: {
+      all: ['test/*_test.js']
+    },
+
+    less: {
+      build: {
+        files: {
+          "build/css/bootstrap2/bootstrap-switch.css": "src/less/bootstrap2/bootstrap-switch.less",
+          "build/css/bootstrap3/bootstrap-switch.css": "src/less/bootstrap3/bootstrap-switch.less",
+        }
+      }
+    },
+
+    coffee: {
+      build: {
+        expand: true,
+        cwd: 'src/coffee',
+        src: '**/*.coffee',
+        dest: 'build/js',
+        ext: '.js'
+      }
+    },
+
+    cssmin: {
+      build: {
+        expand: true,
+        src: ['build/css/bootstrap2/bootstrap-switch.css', 'build/css/bootstrap3/bootstrap-switch.css'],
+        ext: '.min.css'
+      }
+    },
+
+    uglify: {
+      build: {
+        preserveComments: 'some',
+        expand: true,
+        src: 'build/js/bootstrap-switch.js',
+        ext: '.min.js'
+      }
+    },
+
+    jshint: {
+      all: ['Gruntfile.js', '*.json', 'build/js/*.js', '!**/*.min.js']
+    },
+
+    bump: {
+      options: {
+        files: ['package.json', 'bower.json'],
+        commitFiles: ['-a'],
+        push: false
+      }
+    }
+
+  });
+
+  grunt.registerTask('build', ['less', 'coffee', 'cssmin', 'uglify']);
+
+};

File diff suppressed because it is too large
+ 0 - 0
build/css/bootstrap2/bootstrap-switch.css


File diff suppressed because it is too large
+ 12 - 0
build/css/bootstrap2/bootstrap-switch.min.css


File diff suppressed because it is too large
+ 0 - 0
build/css/bootstrap3/bootstrap-switch.css


File diff suppressed because it is too large
+ 12 - 0
build/css/bootstrap3/bootstrap-switch.min.css


File diff suppressed because it is too large
+ 0 - 1
build/js/bootstrap-switch.js


File diff suppressed because it is too large
+ 0 - 0
build/js/bootstrap-switch.min.js


+ 29 - 0
package.json

@@ -0,0 +1,29 @@
+{
+  "name": "bootstrap-switch",
+  "description": "Unofficial bootstrap switch",
+  "version": "1.8.0",
+  "main": "static/js/bootstrap-switch.js",
+  "scripts": {
+    "test": "grunt test"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/nostalgiaz/bootstrap-switch.git"
+  },
+  "keywords": [
+    "bootstrap",
+    "switch"
+  ],
+  "license": "Apache Version 2",
+  "readmeFilename": "README.md",
+  "devDependencies": {
+    "matchdep": "~0.3.0",
+    "grunt": "~0.4.2",
+    "grunt-contrib-less": "~0.8.3",
+    "grunt-contrib-jshint": "~0.7.2",
+    "grunt-bump": "0.0.11",
+    "grunt-contrib-coffee": "~0.7.0",
+    "grunt-contrib-uglify": "~0.2.7",
+    "grunt-contrib-cssmin": "~0.7.0"
+  }
+}

+ 13 - 0
src/coffee/bootstrap-switch.coffee

@@ -1,3 +1,16 @@
+###! ============================================================
+ * bootstrap-switch v1.9.0 by Larentis Mattia @SpiritualGuru
+ * http://www.larentis.eu/
+ *
+ * Enhanced for radiobuttons by Stein, Peter @BdMdesigN
+ * http://www.bdmdesign.org/
+ *
+ * Project site:
+ * http://www.bootstrap-switch.org
+ * ============================================================
+ * Licensed under the Apache License, Version 2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * ============================================================ ###
 (($) ->
   $.fn.bootstrapSwitch = (method) ->
     methods =

+ 1 - 1
src/less/bootstrap2/bootstrap-switch.less

@@ -1,4 +1,4 @@
-/* ============================================================
+/*! ===========================================================
  * bootstrap-switch v1.9.0 by Larentis Mattia @SpiritualGuru
  * http://www.larentis.eu/
  *

+ 1 - 1
src/less/bootstrap3/bootstrap-switch.less

@@ -1,4 +1,4 @@
-/* ============================================================
+/*! ===========================================================
  * bootstrap-switch v1.9.0 by Larentis Mattia @SpiritualGuru
  * http://www.larentis.eu/
  *

Some files were not shown because too many files changed in this diff