Skip to content

Commit

Permalink
Merge pull request #68 from geekjuice/master
Browse files Browse the repository at this point in the history
Major updates (UMD, ES6, etc)
  • Loading branch information
geekjuice committed May 9, 2015
2 parents 6b64c10 + 89c28f1 commit 945fff0
Show file tree
Hide file tree
Showing 27 changed files with 1,241 additions and 2,775 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## v1.0.0
- Add proper UMD to `Drop`
- Convert from `Coffeescript` to `ES6 (Babel)`
- Fix `*.json` files to include `main`
- Remove bundled `drop.js`
- Restructure directory layout
- Update `gulp` builds
- Update `tether` dependency to `v0.7.1`
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Contributing Guide

You will need:

- Node.js/io.js & npm
- Bower
- Gulp
- _Ruby_ (to be deprecated)
- _Sass gem_ (to be deprecated)
- _Compass gem_ (to be deprecated)


## Getting started

1. Fork the project
2. Clone your forked project by running `git clone [email protected]:{
YOUR_USERNAME }/drop.git`
3. Run `npm install` to install both node modules and bower components
4. Test that you can build the source by moving/renaming the existing `dist`
directory and running `npm run build`
5. Assuming everything went well, you should now have a `dist` directory that
matches the one you moved in step 4.
6. __NOTE__: Depending on your local version of Sass and Compass, you may end up
with slightly different stylesheets. In most cases, the changes are
equivalents and nothing to worry about. That said, we are planning on
removing the Ruby dependencies to alleviate issues like this.


## Writing code!

We use `gulp` to facilitate things like transpilation, minification, etc. so
can focus on writing relevant code. If there is a fix or feature you would like
to contribute, we ask that you take the following steps:

1. Most of the _editable_ code lives in the `src` directory while built code
will end up in the `dist` directory upon running `npm run build`.
2. Depending on how big your changes are, bump the version numbers appropriately
in `bower.json` and `package.json`. We try to follow semver, so a good rule
of thumb for how to bump the version is:
- A fix to existing code, perform a patch bump e.g. x.x.0 -> x.x.1
- New feature, perform a minor bump e.g. x.0.x -> x.1.x
- Breaking changes such a rewrite, perform a major bump e.g.
1.x.x -> 2.x.x

Versioning is hard, so just use good judgement and we'll be more than happy
to help out.
3. Provide a thoughtful commit message and push your changes to your fork using
`git push origin master` (assuming your forked project is using `origin` for
the remote name and you are on the `master` branch).
4. Open a Pull Request on GitHub with a description of your changes.


## Testing

Work in progress. We are hoping to add some tests, so if you would like to help
us get started, feel free to contact us through the Issues or open a Pull
Request.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,47 @@ Drop.js is a powerful Javascript and CSS library for creating dropdowns and othe

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

### [Demo](http://github.hubspot.com/drop/docs/welcome)    [Documentation](http://github.hubspot.com/drop)

## Install

__Dependencies__

* __[Tether](https://github.com/HubSpot/tether)__

Installing via `npm` and `bower` will bring in the above dependencies as well.


__npm__
```sh
$ npm install tether-drop
```

__bower__
```sh
$ bower install tether-drop
```

## Usage

```javascript
let dropInstance = new Drop({
target: document.querySelector('.drop-target'),
content: 'Welcome to the future',
classes: 'drop-theme-arrows',
position: 'bottom left',
openOn: 'click'
})
```

[API documentation](http://github.hubspot.com/drop)

[Demo](http://github.hubspot.com/drop/docs/welcome)


## Contributing

We encourage contributions of all kinds. If you would like to contribute in some way, please review our [guidelines for contributing](CONTRIBUTING.md).


## License
Copyright © 2015 HubSpot - [MIT License](LICENSE)
11 changes: 7 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"name": "drop",
"version": "0.5.8",
"name": "tether-drop",
"version": "1.0.0",
"homepage": "https://github.com/HubSpot/drop",
"authors": [
"Adam Schwartz <[email protected]>",
"Zack Bloom <[email protected]>"
],
"maintainers": [
"Nicholas Hwang <[email protected]>"
],
"description": "Client-side library for creating dropdowns",
"keywords": [
"dropdown",
"overlay",
"tether"
],
"license": "MIT",
"main": "drop.js",
"main": "dist/js/drop.js",
"ignore": [
"**/.*",
"node_modules",
Expand All @@ -22,6 +25,6 @@
"tests"
],
"dependencies": {
"tether": "~0.6.5"
"tether": "~0.7.1"
}
}
Loading

0 comments on commit 945fff0

Please sign in to comment.