Skip to content

Commit 422c12f

Browse files
committed
new build
1 parent ff0d5d9 commit 422c12f

File tree

9 files changed

+34
-12
lines changed

9 files changed

+34
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ So what has changed since version 1.x?
5858
* **custom***Validate value against regexp
5959
* **num_answers***Validate that a select element has the required number of selected options (num_answers num5)*
6060
* Show help information automatically when input is focused
61-
* Validate given values immediately when input is blurred.
61+
* Validate given values immediately when input looses focus.
6262
* Make validation dependent on another input of type checkbox being checked by adding attribute data-validation-if-checked="name of checkbox input"
6363
* Make validation optional by adding attribute data-validation-optional="true" to the element. This means
6464
that the validation defined in data-validation only will take place in case a value is given.
@@ -189,7 +189,7 @@ It is possible to show that the value of an input is incorrect immediately when
189189
```
190190

191191
## Show help information
192-
It is possible to display help information for each input. The information will fade in when input is focused and fade out when input is blurred.
192+
It is possible to display help information for each input. The information will fade in when input is focused and fade out when input looses focus.
193193

194194
```html
195195
<form action="" onsubmit="return $(this).validate();" id="my_form">

build

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var fs = require('fs'),
55
exec = require('child_process').exec,
66
jsPath = 'form-validator/',
77
mainScript = jsPath + 'jquery.form-validator.js',
8+
mainMinifiedScript = jsPath + 'jquery.form-validator.min.js',
89
newVersion = -1;
910

1011
/*
@@ -23,6 +24,13 @@ else {
2324

2425
console.log('Build version: '+newVersion);
2526

27+
/*
28+
* Get code docs
29+
*/
30+
var documentation = fs.readFileSync(mainScript, 'utf-8').split('*/')[0]+'*/';
31+
console.log(documentation);
32+
33+
2634
/**
2735
* Create new minified version of a file and change
2836
* version number
@@ -37,20 +45,25 @@ function buildFile(path, newName) {
3745
fs.writeFileSync(newName, '');
3846
exec('uglifyjs '+path+' >> '+newName, function (error, stdout, stderr) {
3947
if(stdout)
40-
console.log(stdout);
48+
console.log('stdout: '+stdout);
4149
if(error)
42-
console.log(error);
50+
console.log('error: '+error);
4351
if(stderr)
44-
console.log(stderr);
52+
console.log('stderror: '+stderr);
4553

4654
console.log('* '+newName);
4755
});
4856
}
4957

50-
buildFile(mainScript, jsPath + 'jquery.form-validator.min.js');
58+
buildFile(mainScript, mainMinifiedScript);
5159
fs.readdirSync(jsPath).forEach(function(f) {
5260
if(f.substr(-7) == '.dev.js') {
5361
var compressedFileName = jsPath + f.substr(0, f.length - 6) + 'js';
5462
buildFile(jsPath+f, compressedFileName);
5563
}
5664
});
65+
66+
/*
67+
* Add docs to main script
68+
*/
69+
fs.writeFileSync(mainMinifiedScript, documentation+"\n"+fs.readFileSync(mainMinifiedScript, 'utf-8'));

form-validator/date.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* @license Dual licensed under the MIT or GPL Version 2 licenses
15-
* @version 1.9.15
15+
* @version 1.9.19
1616
*/
1717
(function($) {
1818

form-validator/jquery.form-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Documentation and issue tracking on Github <https://github.com/victorjonsson/jQuery-Form-Validator/>
66
*
77
* @license Dual licensed under the MIT or GPL Version 2 licenses
8-
* @version 1.9.15
8+
* @version 1.9.19
99
*/
1010
(function($) {
1111

form-validator/jquery.form-validator.min.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

form-validator/location.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* @license Dual licensed under the MIT or GPL Version 2 licenses
14-
* @version 1.9.15
14+
* @version 1.9.19
1515
*/
1616
(function($) {
1717

form-validator/security.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* - validate_backend
1313
*
1414
* @license Dual licensed under the MIT or GPL Version 2 licenses
15-
* @version 1.9.15
15+
* @version 1.9.19
1616
*/
1717
(function($) {
1818

form-validator/sweden.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* - validate_swephone
1414
*
1515
* @license Dual licensed under the MIT or GPL Version 2 licenses
16-
* @version 1.9.15
16+
* @version 1.9.19
1717
*/
1818
(function($) {
1919

form-validator/uk.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* - validate_ukvatnumber
1010
*
1111
* @license Dual licensed under the MIT or GPL Version 2 licenses
12-
* @version 1.9.15
12+
* @version 1.9.19
1313
*/
1414
$.formUtils.addValidator({
1515
name : 'validate_ukvatnumber',

0 commit comments

Comments
 (0)