From 1f3eeef6e25811b9fe22215f2bc80b0dd21f5cbe Mon Sep 17 00:00:00 2001 From: Arjen van Bochoven Date: Sat, 28 May 2016 00:03:26 +0200 Subject: [PATCH 1/3] Add gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..33063b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ + +node_modules +npm-debug.log +tmp +.idea +.DS_Store \ No newline at end of file From e21b53aede6c57f2f2d10f4859ca5fb7dd1c72b0 Mon Sep 17 00:00:00 2001 From: Arjen van Bochoven Date: Sat, 28 May 2016 00:05:12 +0200 Subject: [PATCH 2/3] Add Gruntfile and package.json --- Gruntfile.js | 25 +++++++++++++++++++++++++ package.json | 13 +++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..df2c3ed --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,25 @@ +'use strict'; + +module.exports = function(grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + uglify: { + options: { + mangle: true, + banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' + }, + default: { + files: { + 'bootstrap-formform.min.js': ['bootstrap-formform.js'] + } + } + } + }); + + //grunt.loadTasks('tasks'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + + grunt.registerTask('default', ['uglify']); + +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0866549 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "bootstrap-formform", + "license": "(MIT OR Apache-2.0)", + "repository": { + "type": "git", + "url": "https://github.com/zmip/bootstrap-formform.git" + }, + "version": "0.1.0", + "devDependencies": { + "grunt": "~0.4.5", + "grunt-contrib-uglify": "~0.5.0" + } +} From 73f9847d42fb9ef532da4a6eef1eaf53c7c4b1fd Mon Sep 17 00:00:00 2001 From: Arjen van Bochoven Date: Sat, 28 May 2016 00:05:34 +0200 Subject: [PATCH 3/3] Build min.js --- bootstrap-formform.min.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 bootstrap-formform.min.js diff --git a/bootstrap-formform.min.js b/bootstrap-formform.min.js new file mode 100644 index 0000000..aebe452 --- /dev/null +++ b/bootstrap-formform.min.js @@ -0,0 +1,2 @@ +/*! bootstrap-formform 2016-05-28 */ +var FormForm=function(){function a(a,b){this.parentForm=a,this.formData=b,this.col1=4,this.col2=8,this.isHorizontal=a.hasClass("form-horizontal")}function b(b){if(this.classes=["form-control"],this.id=b.id?b.id:b.name?b.name:"id_"+a.prototype.unique_id++,this.name=b.name?b.name:this.id,this.attributes={id:this.id,name:this.name},b.placeholder&&(this.attributes.placeholder=b.placeholder),b.data){var c=this;$.each(b.data,function(a,b){c.attributes["data-"+a]=b})}b.classes&&this.classes.push(b.classes),this.itemData=b}function c(a){b.call(this,a),this.elem=$("