Skip to content

Commit 5b4af18

Browse files
committed
Merge branch 'master' into issue/2726
2 parents b54f682 + dc88363 commit 5b4af18

40 files changed

+12808
-457
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Tell us how to reproduce this issue.
1818

1919
3. Further steps, etc.
2020

21-
Additionally, please link to a working demo that shows the issue so we can attempt to reproduce. You can use [this template](https://jsfiddle.net/5v3v353z/) as a base. Alternatively, confirm that the [Chosen demo page](http://harvesthq.github.io/chosen/) shows the issue.
21+
Additionally, please link to a working demo that shows the issue so we can attempt to reproduce. You can use [this template](https://jsfiddle.net/j7k727cp/) as a base. Alternatively, confirm that the [Chosen demo page](http://harvesthq.github.io/chosen/) shows the issue.
2222

2323

2424
### Expected behavior

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules
44
public/*.js
55
public/*.css
66
public/*.json
7+
public/LICENSE.md
78
chosen*.zip
89
.sass-cache
910
.ruby-version

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sudo: false
33
language: node_js
44

55
node_js:
6-
- "node"
6+
- 6
77

88
addons:
99
apt:
@@ -19,4 +19,4 @@ after_success: ./publish-package.sh
1919

2020
env:
2121
global:
22-
secure: FHc3fAbJDydJywQ3HcFrTxqyAmmKbiAwP5Bi3qIzvXXCKNYbZb45iSjrMPFq7sHQR/evxDKl3zzBd8k6lvx0Sr77GDkmbN7HjI22fb3wu1Pi3WhmIM90/70ATs6hSZunsNEHCtQa4fDFM3NYeOeiwHFX8HQ9tVlqtjeAZngONL8=
22+
secure: "SOYNh0YO4eLAM38FQxrg7iqytXgdjJHRkmj/1lFzGrGeuuXP6Owe/2TaMyTJXWb9nHAAtRRwQyhAUE07eKhxI6b3YNyozeRulMK4B0K8P3P1B2MslpROyvQYtZupno3dWc0tyvsQ3ucnZE25mtetH6KYcwiI+vHv6hT8HnzBnp0="

Gruntfile.coffee

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = (grunt) ->
22
require('load-grunt-tasks')(grunt)
3+
grunt.loadNpmTasks('grunt1.0-dom-munger') # the naming convention of the package does not allow auto-discovery.
34

45
grunt.initConfig
56
pkg: grunt.file.readJSON('package.json')
@@ -33,24 +34,40 @@ This file is generated by `grunt build`, do not edit it by hand.
3334
src: ['public/chosen.css']
3435
dest: 'public/chosen.css'
3536

37+
copy:
38+
main:
39+
src: 'LICENSE.md'
40+
dest: 'public/'
41+
php:
42+
src: 'composer.json'
43+
dest: 'public/'
44+
3645
coffee:
3746
options:
3847
join: true
39-
compile:
48+
jquery:
4049
files:
4150
'public/chosen.jquery.js': ['coffee/lib/select-parser.coffee', 'coffee/lib/abstract-chosen.coffee', 'coffee/chosen.jquery.coffee']
51+
proto:
52+
files:
4253
'public/chosen.proto.js': ['coffee/lib/select-parser.coffee', 'coffee/lib/abstract-chosen.coffee', 'coffee/chosen.proto.coffee']
54+
test:
55+
files:
4356
'spec/public/jquery_specs.js': 'spec/jquery/*.spec.coffee'
4457
'spec/public/proto_specs.js': 'spec/proto/*.spec.coffee'
4558

4659
uglify:
4760
options:
48-
mangle:
49-
except: ['jQuery', 'AbstractChosen', 'Chosen', 'SelectParser']
5061
banner: '<%= minified_comments %>'
51-
minified_chosen_js:
62+
jquery:
63+
options:
64+
ie8: true
65+
mangle:
66+
reserved: ['jQuery']
5267
files:
5368
'public/chosen.jquery.min.js': ['public/chosen.jquery.js']
69+
proto:
70+
files:
5471
'public/chosen.proto.min.js': ['public/chosen.proto.js']
5572

5673
sass:
@@ -65,41 +82,55 @@ This file is generated by `grunt build`, do not edit it by hand.
6582
processors: [
6683
require('autoprefixer')(browsers: 'last 2 versions, IE 8')
6784
]
68-
dist:
85+
main:
6986
src: 'public/chosen.css'
7087

7188
cssmin:
72-
minified_chosen_css:
73-
options:
74-
banner: '<%= minified_comments %>'
75-
keepSpecialComments: 0
89+
options:
90+
banner: '<%= minified_comments %>'
91+
keepSpecialComments: 0
92+
main:
7693
src: 'public/chosen.css'
7794
dest: 'public/chosen.min.css'
7895

7996
watch:
80-
scripts:
97+
default:
8198
files: ['coffee/**/*.coffee', 'sass/*.scss']
82-
tasks: ['build']
99+
tasks: ['build', 'jasmine']
100+
test:
101+
files: ['spec/**/*.coffee']
102+
tasks: ['jasmine']
83103

84104
jasmine:
85105
jquery:
106+
options:
107+
vendor: [
108+
'public/docsupport/jquery-3.2.1.min.js'
109+
]
110+
specs: 'spec/public/jquery_specs.js'
86111
src: [ 'public/chosen.jquery.js' ]
112+
jquery_old:
87113
options:
88-
vendor: [ 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js' ]
114+
vendor: [
115+
'public/docsupport/jquery-1.12.4.min.js'
116+
]
89117
specs: 'spec/public/jquery_specs.js'
118+
src: [ 'public/chosen.jquery.js' ]
90119
proto:
91-
src: [ 'public/chosen.proto.js' ]
92120
options:
93121
vendor: [
94-
'https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js',
95-
'public/docsupport/event.simulate.js'
122+
'public/docsupport/prototype-1.7.0.0.js'
123+
'node_modules/simulant/dist/simulant.umd.js'
96124
]
97125
specs: 'spec/public/proto_specs.js'
126+
src: [ 'public/chosen.proto.js' ]
98127

99128
grunt.loadTasks 'tasks'
100129

101130
grunt.registerTask 'default', ['build']
102-
grunt.registerTask 'build', ['coffee', 'sass', 'concat', 'uglify', 'postcss', 'cssmin', 'package-bower']
131+
grunt.registerTask 'build', ['coffee:jquery', 'coffee:proto', 'sass', 'concat', 'uglify', 'postcss', 'cssmin', 'copy']
103132
grunt.registerTask 'test', ['coffee', 'jasmine']
133+
grunt.registerTask 'test:jquery', ['coffee:test', 'coffee:jquery', 'jasmine:jquery', 'jasmine:jquery_old']
134+
grunt.registerTask 'test:proto', ['coffee:test', 'coffee:proto', 'jasmine:proto']
104135

105136

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Chosen is a library for making long, unwieldy select boxes more user friendly.
44

5-
- jQuery support: 1.4+
5+
- jQuery support: 1.7+
66
- Prototype support: 1.7+
77

88
For **documentation**, usage, and examples, see:
@@ -13,8 +13,7 @@ https://github.com/harvesthq/chosen/releases/
1313

1414
### Package managers
1515

16-
Chosen is available through [Bower](https://bower.io/) and [npm](https://www.npmjs.com),
17-
_however, the package names are not the same_.
16+
Chosen is available through [Bower](https://bower.io/), [npm](https://www.npmjs.com), and [Composer](https://getcomposer.org/), _however, the package names are not the same_.
1817

1918
To install with Bower:
2019

@@ -28,6 +27,12 @@ To install with npm:
2827
npm install chosen-js
2928
```
3029

30+
To install with Composer:
31+
32+
```
33+
composer require harvesthq/chosen
34+
```
35+
3136
The compiled files for these packages are automatically generated and stored in a [2nd Chosen repository](https://github.com/harvesthq/chosen-package). No pull requests will be accepted to that repository.
3237

3338
### Contributing to this project

0 commit comments

Comments
 (0)