forked from github/opensource.guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
452 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ _site/ | |
.sass-cache/ | ||
bin | ||
node_modules | ||
vendor | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "anchor-js", | ||
"version": "3.2.1", | ||
"authors": [ | ||
"Bryan Braun" | ||
], | ||
"description": "A Javascript utility for adding deep anchor links to online docs.", | ||
"main": "anchor.js", | ||
"license": "MIT", | ||
"homepage": "https://github.com/bryanbraun/anchorjs", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"package.json" | ||
], | ||
"_release": "3.2.1", | ||
"_resolution": { | ||
"type": "version", | ||
"tag": "3.2.1", | ||
"commit": "688c1be39ad11a5f41421644d721ffabad6bbf63" | ||
}, | ||
"_source": "https://github.com/bryanbraun/anchorjs.git", | ||
"_target": "^3.2.1", | ||
"_originalSource": "anchor-js", | ||
"_direct": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# AnchorJS [](https://travis-ci.org/bryanbraun/anchorjs) | ||
|
||
A JavaScript utility for adding deep anchor links ([like these](http://ux.stackexchange.com/q/36304/33248)) to existing page content. AnchorJS is lightweight, accessible, and has no dependencies. | ||
|
||
**[See Live Examples in the Documentation](http://bryanbraun.github.io/anchorjs#examples).** | ||
|
||
 | ||
|
||
## Installation | ||
|
||
Download AnchorJS using npm, | ||
|
||
```bash | ||
npm install anchor-js | ||
``` | ||
|
||
or bower: | ||
|
||
```bash | ||
bower install anchor-js --save-dev | ||
``` | ||
|
||
(or just [download it from github](https://github.com/bryanbraun/anchorjs/releases)). | ||
|
||
Then include the anchor.js file (or anchor.min.js) in your webpage. | ||
|
||
```html | ||
<script src="anchor.js"></script> | ||
``` | ||
|
||
You could also include it via a CDN like [CDNJS](https://cdnjs.com/libraries/anchor-js) or [jsDelivr](http://www.jsdelivr.com/projects/anchorjs). | ||
|
||
##Usage | ||
See **[the Documentation](http://bryanbraun.github.io/anchorjs#basic-usage)** for detailed instructions. | ||
|
||
## Compatibility | ||
Currently Supports: IE9+ and modern browsers | ||
|
||
## Contributing [](https://david-dm.org/bryanbraun/anchorjs#info=devDependencies) | ||
To contribute: | ||
|
||
1. Fork/Clone the repo. | ||
2. Make your changes. | ||
3. Write tests as needed. | ||
4. Run tests locally to confirm everything is working: | ||
- Install phantomjs: `brew install phantomjs` | ||
- Install test modules: Run `npm install` | ||
- Run all tests: `npm test` | ||
5. Minify the code: `npm run release` | ||
6. Submit a Pull Request. | ||
|
||
## License | ||
Licensed with the [MIT License](http://opensource.org/licenses/MIT). |
Oops, something went wrong.