mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Merge pull request #334 from extremumratio/master
Cross-platform build script and Build help
This commit is contained in:
commit
2852ea9a87
20
README.md
20
README.md
@ -9,7 +9,6 @@ $.datetimepicker.setLocale('en');
|
|||||||
```
|
```
|
||||||
[Documentation][doc]
|
[Documentation][doc]
|
||||||
|
|
||||||
|
|
||||||
jQuery Plugin Date and Time Picker
|
jQuery Plugin Date and Time Picker
|
||||||
|
|
||||||
DateTimePicker
|
DateTimePicker
|
||||||
@ -33,3 +32,22 @@ Options to highlight individual dates or periods
|
|||||||
![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/6.png)
|
![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/6.png)
|
||||||
|
|
||||||
[doc]: http://xdsoft.net/jqplugins/datetimepicker/
|
[doc]: http://xdsoft.net/jqplugins/datetimepicker/
|
||||||
|
|
||||||
|
### JS Build help
|
||||||
|
|
||||||
|
**Requires Node and NPM** [Download and install node.js](http://nodejs.org/download/).
|
||||||
|
|
||||||
|
Install:
|
||||||
|
|
||||||
|
1. Install `bower` globally with `npm install -g bower`.
|
||||||
|
2. Run `npm install`. npm will look at `package.json` and automatically install the necessary dependencies.
|
||||||
|
3. Run `bower install`, which installs front-end packages defined in `bower.json`.
|
||||||
|
|
||||||
|
Build:
|
||||||
|
|
||||||
|
- `npm run build`
|
||||||
|
|
||||||
|
When build completed, you'll have the following files:
|
||||||
|
- **build/jquery.datetimepicker.full.js** - browser file
|
||||||
|
- **build/jquery.datetimepicker.full.min.js** - browser minified file
|
||||||
|
- **build/jquery.datetimepicker.min.js** - amd module style minified file
|
@ -4,10 +4,10 @@
|
|||||||
* (c) 2014, Chupurnov Valeriy.
|
* (c) 2014, Chupurnov Valeriy.
|
||||||
*/
|
*/
|
||||||
/*global document,window,jQuery,setTimeout,clearTimeout,HighlightedDate,getCurrentValue*/
|
/*global document,window,jQuery,setTimeout,clearTimeout,HighlightedDate,getCurrentValue*/
|
||||||
(function (factory) {
|
;(function (factory) {
|
||||||
if ( typeof define === 'function' && define.amd ) {
|
if ( typeof define === 'function' && define.amd ) {
|
||||||
// AMD. Register as an anonymous module.
|
// AMD. Register as an anonymous module.
|
||||||
define(['jquery', 'jquery-mousewheel'], factory);
|
define(['jquery', 'jquery-mousewheel', 'date-functions'], factory);
|
||||||
} else if (typeof exports === 'object') {
|
} else if (typeof exports === 'object') {
|
||||||
// Node/CommonJS style for Browserify
|
// Node/CommonJS style for Browserify
|
||||||
module.exports = factory;
|
module.exports = factory;
|
||||||
|
2
build/jquery.datetimepicker.full.min.js
vendored
2
build/jquery.datetimepicker.full.min.js
vendored
File diff suppressed because one or more lines are too long
2
build/jquery.datetimepicker.min.js
vendored
2
build/jquery.datetimepicker.min.js
vendored
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
|||||||
"main": "jquery.datetimepicker.js",
|
"main": "jquery.datetimepicker.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"concat": "bower update && cat jquery.datetimepicker.js bower_components/jquery-mousewheel/jquery.mousewheel.js bower_components/date-functions/date-functions.js > build/jquery.datetimepicker.full.js",
|
"concat": "bower update && concat-cli -f jquery.datetimepicker.js bower_components/jquery-mousewheel/jquery.mousewheel.js bower_components/date-functions/date-functions.js -o build/jquery.datetimepicker.full.js",
|
||||||
"minify": "uglifyjs jquery.datetimepicker.js -c -m -o build/jquery.datetimepicker.min.js",
|
"minify": "uglifyjs jquery.datetimepicker.js -c -m -o build/jquery.datetimepicker.min.js",
|
||||||
"minifyconcat": "uglifyjs build/jquery.datetimepicker.full.js -c -m -o build/jquery.datetimepicker.full.min.js",
|
"minifyconcat": "uglifyjs build/jquery.datetimepicker.full.js -c -m -o build/jquery.datetimepicker.full.min.js",
|
||||||
"build": "npm run minify && npm run concat && npm run minifyconcat"
|
"build": "npm run minify && npm run concat && npm run minifyconcat"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/xdan/datetimepicker",
|
"homepage": "https://github.com/xdan/datetimepicker",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bower": "^1.5.2",
|
"concat-cli": "^1.0.1",
|
||||||
"uglifyjs": "^2.4.10"
|
"uglifyjs": "^2.4.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user