Skip to content

Commit 945fff0

Browse files
committed
Merge pull request #68 from geekjuice/master
Major updates (UMD, ES6, etc)
2 parents 6b64c10 + 89c28f1 commit 945fff0

27 files changed

+1241
-2775
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## v1.0.0
2+
- Add proper UMD to `Drop`
3+
- Convert from `Coffeescript` to `ES6 (Babel)`
4+
- Fix `*.json` files to include `main`
5+
- Remove bundled `drop.js`
6+
- Restructure directory layout
7+
- Update `gulp` builds
8+
- Update `tether` dependency to `v0.7.1`

CONTRIBUTING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Contributing Guide
2+
3+
You will need:
4+
5+
- Node.js/io.js & npm
6+
- Bower
7+
- Gulp
8+
- _Ruby_ (to be deprecated)
9+
- _Sass gem_ (to be deprecated)
10+
- _Compass gem_ (to be deprecated)
11+
12+
13+
## Getting started
14+
15+
1. Fork the project
16+
2. Clone your forked project by running `git clone git@github.com:{
17+
YOUR_USERNAME }/drop.git`
18+
3. Run `npm install` to install both node modules and bower components
19+
4. Test that you can build the source by moving/renaming the existing `dist`
20+
directory and running `npm run build`
21+
5. Assuming everything went well, you should now have a `dist` directory that
22+
matches the one you moved in step 4.
23+
6. __NOTE__: Depending on your local version of Sass and Compass, you may end up
24+
with slightly different stylesheets. In most cases, the changes are
25+
equivalents and nothing to worry about. That said, we are planning on
26+
removing the Ruby dependencies to alleviate issues like this.
27+
28+
29+
## Writing code!
30+
31+
We use `gulp` to facilitate things like transpilation, minification, etc. so
32+
can focus on writing relevant code. If there is a fix or feature you would like
33+
to contribute, we ask that you take the following steps:
34+
35+
1. Most of the _editable_ code lives in the `src` directory while built code
36+
will end up in the `dist` directory upon running `npm run build`.
37+
2. Depending on how big your changes are, bump the version numbers appropriately
38+
in `bower.json` and `package.json`. We try to follow semver, so a good rule
39+
of thumb for how to bump the version is:
40+
- A fix to existing code, perform a patch bump e.g. x.x.0 -> x.x.1
41+
- New feature, perform a minor bump e.g. x.0.x -> x.1.x
42+
- Breaking changes such a rewrite, perform a major bump e.g.
43+
1.x.x -> 2.x.x
44+
45+
Versioning is hard, so just use good judgement and we'll be more than happy
46+
to help out.
47+
3. Provide a thoughtful commit message and push your changes to your fork using
48+
`git push origin master` (assuming your forked project is using `origin` for
49+
the remote name and you are on the `master` branch).
50+
4. Open a Pull Request on GitHub with a description of your changes.
51+
52+
53+
## Testing
54+
55+
Work in progress. We are hoping to add some tests, so if you would like to help
56+
us get started, feel free to contact us through the Issues or open a Pull
57+
Request.

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,47 @@ Drop.js is a powerful Javascript and CSS library for creating dropdowns and othe
44

55
[![Drop Docs](http://i.imgur.com/sgmx9aJ.png)](http://github.hubspot.com/drop/)
66

7-
### [Demo](http://github.hubspot.com/drop/docs/welcome)    [Documentation](http://github.hubspot.com/drop)
7+
8+
## Install
9+
10+
__Dependencies__
11+
12+
* __[Tether](https://github.com/HubSpot/tether)__
13+
14+
Installing via `npm` and `bower` will bring in the above dependencies as well.
15+
16+
17+
__npm__
18+
```sh
19+
$ npm install tether-drop
20+
```
21+
22+
__bower__
23+
```sh
24+
$ bower install tether-drop
25+
```
26+
27+
## Usage
28+
29+
```javascript
30+
let dropInstance = new Drop({
31+
target: document.querySelector('.drop-target'),
32+
content: 'Welcome to the future',
33+
classes: 'drop-theme-arrows',
34+
position: 'bottom left',
35+
openOn: 'click'
36+
})
37+
```
38+
39+
[API documentation](http://github.hubspot.com/drop)
40+
41+
[Demo](http://github.hubspot.com/drop/docs/welcome)
42+
43+
44+
## Contributing
45+
46+
We encourage contributions of all kinds. If you would like to contribute in some way, please review our [guidelines for contributing](CONTRIBUTING.md).
47+
48+
49+
## License
50+
Copyright © 2015 HubSpot - [MIT License](LICENSE)

bower.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
{
2-
"name": "drop",
3-
"version": "0.5.8",
2+
"name": "tether-drop",
3+
"version": "1.0.0",
44
"homepage": "https://github.com/HubSpot/drop",
55
"authors": [
66
"Adam Schwartz <adam.flynn.schwartz@gmail.com>",
77
"Zack Bloom <zackbloom@gmail.com>"
88
],
9+
"maintainers": [
10+
"Nicholas Hwang <nick.joosung.hwang@gmail.com>"
11+
],
912
"description": "Client-side library for creating dropdowns",
1013
"keywords": [
1114
"dropdown",
1215
"overlay",
1316
"tether"
1417
],
1518
"license": "MIT",
16-
"main": "drop.js",
19+
"main": "dist/js/drop.js",
1720
"ignore": [
1821
"**/.*",
1922
"node_modules",
@@ -22,6 +25,6 @@
2225
"tests"
2326
],
2427
"dependencies": {
25-
"tether": "~0.6.5"
28+
"tether": "~0.7.1"
2629
}
2730
}

0 commit comments

Comments
 (0)