Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit e3819f5

Browse files
author
Marlow Payne
authored
Merge pull request #61 from mobify/release-v6.0.0
Release v6.0.0
2 parents fdff1f6 + f58545e commit e3819f5

File tree

119 files changed

+409
-14980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+409
-14980
lines changed

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Ensure the tests pass:
1919
```
2020
grunt test
2121
```
22-
22+
2323
Make your changes, add tests for your changes, then run the tests again:
2424

2525
```
@@ -38,6 +38,4 @@ Run the following `grunt` task to build the dist:
3838
grunt build
3939
```
4040

41-
Push to your fork, and open a [pull request](https://github.com/mobify/bellows/compare). Please ensure you describe your changes in your pull request, as they have a higher liklihood of being merged.
42-
43-
41+
Push to your fork, and open a [pull request](https://github.com/mobify/bellows/compare). Please ensure you describe your changes in your pull request, as they have a higher likelihood of being merged.

.github/ISSUE_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**Feature Request** or **Bug Report**
2+
3+
<feature request here, if applicable>
4+
5+
<bug report here, if applicable>
6+
### Summary
7+
8+
### Expected behaviour
9+
10+
### Actual behaviour
11+
12+
### Steps to reproduce

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Reviewers: GitHub @<name>s of all reviewers
2+
3+
Linked PRs: <links to corresponding PRs, optional>
4+
5+
## Changes
6+
- <changes here>
7+
8+
## TODOs:
9+
- [ ] +1
10+
- [ ] Updated README
11+
- [ ] Updated CHANGELOG
12+
- [ ] <Other applicable TODOs>
13+
- [ ] <Feedback from reviewers>
14+
15+
## How To Test
16+
- <necessary config changes>
17+
- <necessary corresponding PRs>
18+
- <how to access the new / changed functionality -- fixtures, URLs>
19+
20+
## Applicable Research Resources
21+
- <links, optional>

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules/
2-
bower_components/
32
.DS_Store
43
/.sass-cache/

.npmignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Ref https://docs.npmjs.com/misc/developers
2+
.github/
3+
examples/
4+
tasks/
5+
templates/
6+
tests/
7+
circle.yml
8+
Gruntfile.js

CHANGELOG

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
6.0.0
2+
- Publish to NPM
3+
- Remove Zepto support in favor of jQuery
4+
- Migrate all dependencies to NPM, remove Bower
5+
- Migrate JS linting to eslint
6+
- Migrate SCSS compilation to libsass
7+
- Lint SCSS with sass-lint
8+
- Update circleCI config with modern testing steps
9+
- Add some GitHub templates for contributing, issues, and PRs
110
5.1.2
211
- Ensuring disabled items don't close on close
312
5.0.1

Gruntfile.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict'
1+
'use strict';
22

33
var path = require('path');
44

@@ -28,16 +28,18 @@ module.exports = function(grunt) {
2828

2929
// load npm tasks
3030
var npmTasks = [
31-
'grunt-contrib-uglify',
32-
'grunt-contrib-watch',
33-
'grunt-contrib-connect',
34-
'grunt-css',
35-
'grunt-shell',
31+
'grunt-autoprefixer',
3632
'grunt-contrib-clean',
33+
'grunt-contrib-connect',
3734
'grunt-contrib-copy',
38-
'grunt-autoprefixer',
39-
'grunt-contrib-sass',
35+
'grunt-contrib-uglify',
36+
'grunt-contrib-watch',
37+
'grunt-eslint',
4038
'grunt-mocha-phantomjs',
39+
'grunt-open',
40+
'grunt-sass',
41+
'grunt-sass-lint',
42+
'grunt-shell',
4143
'grunt-version'
4244
];
4345

@@ -47,10 +49,11 @@ module.exports = function(grunt) {
4749
}
4850
});
4951

52+
grunt.registerTask('examples', ['build', 'connect:server', 'open:examples', 'watch']);
5053
grunt.registerTask('serve', ['build', 'connect:server', 'watch']);
51-
grunt.registerTask('build', ['lint:dev', 'copy', 'uglify', 'version:all', 'sass', 'autoprefixer', 'cssmin']);
52-
grunt.registerTask('release', ['lint:dev', 'test', 'shell:tagRelease']);
54+
grunt.registerTask('build', ['sasslint', 'lint:prod', 'copy', 'uglify', 'version:all', 'sass', 'autoprefixer']);
55+
grunt.registerTask('release', ['test', 'shell:tagRelease']);
5356
grunt.registerTask('test', ['build', 'connect:test', 'mocha_phantomjs']);
54-
grunt.registerTask('test:browser', ['build', 'connect:test:keepalive']);
57+
grunt.registerTask('test:browser', ['build', 'open:tests', 'connect:test:keepalive']);
5558
grunt.registerTask('default', 'build');
5659
};

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Mobify Research &amp; Development Inc.
3+
Copyright (c) 2016 Mobify Research &amp; Development Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,46 @@
22

33
A mobile-first accordion UI module for progressive disclosure on the web.
44

5-
[![Bower version](https://badge.fury.io/bo/bellows.svg)](http://badge.fury.io/bo/bellows)
5+
[![NPM](https://nodei.co/npm/bellows-ui.png?downloads=true)](https://nodei.co/npm/bellows-ui/)
66
[![Dependency Status](https://www.versioneye.com/user/projects/53ff9b7deab62a5003000009/badge.svg?style=flat)](https://www.versioneye.com/user/projects/53ff9b7deab62a5003000009)
77
[![Build Status](https://circleci.com/gh/mobify/bellows/tree/master.svg?style=shield&circle-token=8c096b513a1f04ef1b977178c4f3358c2a42a132)](https://circleci.com/gh/mobify/bellows)
88

99
![Bellows in action](https://raw.githubusercontent.com/mobify/bellows/master/examples/assets/i/bellows.gif "Bellows in action")
1010

1111
## Demo
1212

13-
You can find a simple demo on [the Documentation page](http://mobify.github.io/bellows). More demos can be found inside the `examples` folder in the repo.
13+
You can find a simple demo on [the Documentation page](http://mobify.github.io/bellows). More demos can be found inside the `examples` folder in the repo. Run `grunt examples` to see them in Chrome (mobile device emulation is recommended).
1414

1515
## Requirements
1616

17-
* [Zepto](http://zeptojs.com/)
18-
* [Velocity.js](http://velocityjs.org)
17+
* [jQuery](http://jquery.com/)
18+
* [Velocity.js](http://julian.com/research/velocity/)
1919

20-
### Velocity
20+
### Zepto Support
2121

22-
If you are using Zepto, you need to load `bower_components/velocity/velocity.js` (this file comes with a jQuery shim bundled directly in it). If you are using jQuery, you need to load `bower_components/velocity/jquery.velocity.js`.
23-
24-
### jQuery Support
25-
26-
Bellows supports jQuery but is not actively developed for it. You should be able to use Bellows directly with jQuery 2.0. While we don't actively support jQuery for Bellows, we welcome any and all issues and PRs to help us make it work.
22+
Bellows supports Zepto up until v5.1.2 but is not actively developed for it. While we don't actively support Zepto for Bellows, we welcome any and all issues and PRs to help us make it work.
2723

2824

2925
## Installation
3026

31-
Bellows can be installed using bower:
27+
Bellows can be installed using NPM:
3228

3329
```
34-
bower install bellows
30+
npm install bellows-ui
3531
```
3632

3733
## Usage with Require.js
3834

39-
To use with require.js, after installing through bower you merely have to reference bellows in your require config file:
35+
To use with require.js, after installing through NPM you merely have to reference bellows in your require config file (**Note**: If your project already has these external dependencies, and the versions are compatible, it's recommended that you use the one in your project to reduce duplication):
4036

4137
```config.js
4238

4339
{
4440
'paths': {
45-
'plugin': 'bower_components/plugin/dist/plugin.min',
46-
'bellows': 'bower_components/bellows/dist/bellows.min',
47-
'velocity': 'bower_components/mobify-velocity/velocity'
41+
'$': 'node_modules/bellows-ui/node_modules/jquery/dist/jquery.min',
42+
'plugin': 'node_modules/bellows-ui/node_modules/plugin/dist/plugin.min',
43+
'velocity': 'node_modules/bellows-ui/node_modules/velocity-animate/velocity'
44+
'bellows': 'node_modules/bellows-ui/dist/bellows.min',
4845
}
4946
}
5047

@@ -54,7 +51,7 @@ And then require bellows in as needed:
5451

5552
```
5653
define(
57-
['zepto', 'bellows'],
54+
['$', 'bellows'],
5855
function($) {
5956
$('.bellows').bellows();
6057
}
@@ -104,9 +101,9 @@ At a bare minimum, your markup structure should follow the above structure. You
104101
</div>
105102

106103
<!-- Include dependencies -->
107-
<script src="zepto.min.js"></script>
108-
<script src="bower_components/mobify-velocity/dist/velocity.min.js"></script>
109-
<script src="bower_components/plugin/dist/plugin.min.js"></script>
104+
<script src="jqueryin.js"></script>
105+
<script src="node_modules/velocity-animate/velocity.min.js"></script>
106+
<script src="node_modules/plugin/dist/plugin.min.js"></script>
110107

111108
<!-- Include bellows.js -->
112109
<script src="bellows.min.js"></script>
@@ -173,10 +170,10 @@ default: `swing`
173170

174171
Sets the easing for the animation. Bellows takes all of the same easing properties that [Velocity.js](http://julian.com/research/velocity) accepts.
175172

176-
> * [jQuery UI's easings](http://easings.net/) and CSS3's easings ("ease", "ease-in", "ease-out", and "ease-in-out"), which are pre-packaged into Velocity. A bonus "spring" easing (sampled in the CSS Support pane) is also included.
177-
* CSS3's bezier curves: Pass in a four-item array of bezier points. (Refer to [Cubic-Bezier.com](http://cubic-bezier.com/) for crafing custom bezier curves.)
178-
* Spring physics: Pass a two-item array in the form of [ tension, friction ]. A higher tension (default: 600) increases total speed and bounciness. A lower friction (default: 20) increases ending vibration speed.
179-
* Step easing: Pass a one-item array in the form of [ steps ]. The animation will jump toward its end values using the specified number of steps.
173+
> * [jQuery UI's easings](http://easings.net/) and CSS3's easings ("ease", "ease-in", "ease-out", and "ease-in-out"), which are pre-packaged into Velocity. A bonus "spring" easing (sampled in the CSS Support pane) is also included.
174+
* CSS3's bezier curves: Pass in a four-item array of bezier points. (Refer to [Cubic-Bezier.com](http://cubic-bezier.com/) for crafing custom bezier curves.)
175+
* Spring physics: Pass a two-item array in the form of [ tension, friction ]. A higher tension (default: 600) increases total speed and bounciness. A lower friction (default: 20) increases ending vibration speed.
176+
* Step easing: Pass a one-item array in the form of [ steps ]. The animation will jump toward its end values using the specified number of steps.
180177

181178
For more information, check out [Velocity's docs on easing](http://julian.com/research/velocity/#easing).
182179

@@ -197,11 +194,11 @@ Triggered every time the selected bellows item is starting to open.
197194
| Parameter name | Description |
198195
|----------------|-------------|
199196
| **e** | An Event object passed to the callback |
200-
| **ui** | An object containing any associated data for use inside the callback |
197+
| **ui** | An object containing any associated data for use inside the callback |
201198

202199
```js
203200
$('.bellows').bellows({
204-
open: function(e, ui) {
201+
open: function(e, ui) {
205202
// ui.item contains the item opening
206203
}
207204
});
@@ -218,11 +215,11 @@ Triggered every time the selected bellows item has finished opening.
218215
| Parameter name | Description |
219216
|----------------|-------------|
220217
| **e** | An Event object passed to the callback |
221-
| **ui** | An object containing any associated data for use inside the callback |
218+
| **ui** | An object containing any associated data for use inside the callback |
222219

223220
```js
224221
$('.bellows').bellows({
225-
opened: function(e, ui) {
222+
opened: function(e, ui) {
226223
// ui.item contains the item that opened
227224
}
228225
});
@@ -237,11 +234,11 @@ Triggered every time an bellows item is starting to close.
237234
| Parameter name | Description |
238235
|----------------|-------------|
239236
| **e** | An Event object passed to the callback |
240-
| **ui** | An object containing any associated data for use inside the callback |
237+
| **ui** | An object containing any associated data for use inside the callback |
241238

242239
```js
243240
$('.bellows').bellows({
244-
close: function(e, ui) {
241+
close: function(e, ui) {
245242
// ui.item contains the item closing
246243
}
247244
});
@@ -256,11 +253,11 @@ Triggered every time an bellows item is finished closing.
256253
| Parameter name | Description |
257254
|----------------|-------------|
258255
| **e** | An Event object passed to the callback |
259-
| **ui** | An object containing any associated data for use inside the callback |
256+
| **ui** | An object containing any associated data for use inside the callback |
260257

261258
```js
262259
$('.bellows').bellows({
263-
closed: function(e, ui) {
260+
closed: function(e, ui) {
264261
// ui.item contains the item that closed
265262
}
266263
});
@@ -291,7 +288,7 @@ $bellows.bellows('openAll');
291288
```
292289

293290
### close
294-
291+
295292
Close the selected bellows item by element reference
296293

297294
```js
@@ -313,7 +310,7 @@ $bellows.bellows('closeAll');
313310
```
314311

315312
### toggle
316-
313+
317314
Toggle the selected bellows item by element reference
318315

319316
```js
@@ -363,7 +360,7 @@ $('.bellows').bellows({
363360
});
364361
```
365362

366-
This will scroll the viewport to the opened bellows item, restoring its position in the viewport.
363+
This will scroll the viewport to the opened bellows item, restoring its position in the viewport.
367364

368365
## Browser Compatibility
369366

@@ -379,19 +376,16 @@ This will scroll the viewport to the opened bellows item, restoring its position
379376
## Building a distribution
380377

381378
### Requirements
382-
* [node.js 0.10.x/npm](http://nodejs.org/download/)
379+
* [Node.js v4.x LTS + NPM v2.x](https://nodejs.org/en/download/) (Mobify recommends [NVM](https://github.com/creationix/nvm) for installing Node + NPM)
383380
* [Grunt](http://gruntjs.com/)
384381
* Install with `npm install -g grunt-cli`
385-
* [Bower](http://bower.io/)
386-
* Install with `npm install -g bower`
387382

388383
### Steps
389384
1. `npm install`
390-
1. `bower install`
391385
1. `grunt build`
392386

393387
The `dist` directory will be populated with minified versions of the css and javascript files for distribution and use with whatever build system you might use. The `src` directory has our raw unminified Sass and Javascript files if you prefer to work with those.
394388

395389
## License
396390

397-
_MIT License. Bellows is Copyright © 2014 Mobify. It is free software and may be redistributed under the terms specified in the LICENSE file._
391+
_MIT License. Bellows is Copyright © 2016 Mobify. It is free software and may be redistributed under the terms specified in the LICENSE file._

bower.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)