Skip to content

Commit dc2d86f

Browse files
committed
Config: Add "pre-release" option
JQuery UI began to publish pre-releases, eg. 1.11.0-beta.1, which can't be described as stable nor legacy. So, it turned out that one more option was needed: "pre-release". Ref: #208
1 parent 97bb2ae commit dc2d86f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"jqueryUi": [
33
{
44
"version": "1.11.0-beta.1",
5-
"dependsOn": "jQuery1.6+"
5+
"dependsOn": "jQuery1.6+",
6+
"pre-release": true
67
},
78
{
89
"version": "1.10.4",

lib/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Config = module.exports = function() {
88
// Validate jqueryUi, eg:
99
// "jqueryUi": [
1010
// {
11+
// "version": "1.11.0-beta.1",
12+
// "dependsOn": "jQuery 1.7+",
13+
// "pre-release": true
14+
// },
15+
// {
1116
// "version": "1.10.0",
1217
// "dependsOn": "jQuery 1.7+",
1318
// "stable": true

lib/jquery-ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function JqueryUi( path, options ) {
3838
options = options || {};
3939
this.dependsOn = options.dependsOn;
4040
this.stable = options.stable;
41-
this.label = this.stable ? "Stable" : "Legacy";
41+
this.label = this.stable ? "Stable" : options[ "pre-release" ] ? "Pre-release" : "Legacy";
4242
// 1: Always with a trailing slash
4343
this.path = path.replace( /\/*$/, "/" ) /* 1 */;
4444
this.pkg = JSON.parse( fs.readFileSync( path + "/package.json" ) );

0 commit comments

Comments
 (0)