Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Commit

Permalink
Upgraded Bespoke.js to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed Dec 23, 2014
1 parent dad8a12 commit 7b461ec
Show file tree
Hide file tree
Showing 19 changed files with 530 additions and 407 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,2 +1,4 @@
node_modules
bower_components
lib-instrumented
test/coverage
1 change: 1 addition & 0 deletions .jshintrc
@@ -1,5 +1,6 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
Expand Down
7 changes: 5 additions & 2 deletions .travis.yml
@@ -1,4 +1,7 @@
language: node_js

node_js:
- '0.8'
- '0.10'
- "0.10"

after_script:
- npm run coveralls
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
@@ -1,27 +1,27 @@
# Contributing

## Important notes
Please don't edit files in the `dist` subdirectory as they are generated via [Grunt](http://gruntjs.com/). You'll find source code in the `src` subdirectory!
Please don't edit files in the `dist` subdirectory as they are generated via [gulp](https://github.com/gulpjs/gulp). You'll find source code in the `lib` subdirectory!

### Code style
Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**

## Modifying the code
First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed.

Test that Grunt's CLI is installed by running `grunt --version`. If the command isn't found, run `npm install -g grunt-cli`. For more information about installing Grunt, see the [getting started with Grunt guide](http://gruntjs.com/getting-started).
Test that gulp is installed globally by running `gulp --version` at the command-line. If gulp isn't installed globally, run `npm install -g gulp` to install the latest version.

1. Fork and clone the repo.
1. Run `npm install` to install all build dependencies (including Grunt).
1. Run `grunt` to grunt this project.
1. Run `npm install` to install all dependencies (including gulp).
1. Run `gulp` to build this project.

Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken.
Assuming that you don't see any red, you're ready to go. Just be sure to run `gulp` after making any changes, to ensure that nothing is broken.

## Submitting pull requests

1. Create a new branch, please don't work in your `master` branch directly.
1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.
1. Add failing tests for the change you want to make. Run `gulp` to see the tests fail.
1. Fix stuff.
1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.
1. Run `gulp` to see if the tests pass. Repeat steps 2-4 until done.
1. Update the documentation to reflect any changes.
1. Push to your fork and submit a pull request.
80 changes: 0 additions & 80 deletions Gruntfile.js

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
@@ -1,5 +1,5 @@
bespoke-advanced javascript library. Auto advance slides on a timer in bespoke.js
Copyright (c) 2013 Joel Purra <http://joelpurra.com/>
bespoke-advanced javascript library. Auto advance slides on a timer in Bespoke.js
Copyright (c) 2013, 2014 Joel Purra <http://joelpurra.com/>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
67 changes: 40 additions & 27 deletions README.md
@@ -1,4 +1,4 @@
[![Build Status](https://secure.travis-ci.org/joelpurra/bespoke-advanced.png?branch=master)](https://travis-ci.org/joelpurra/bespoke-advanced)
[![Build Status](https://secure.travis-ci.org/joelpurra/bespoke-advanced.png?branch=master)](https://travis-ci.org/joelpurra/bespoke-advanced) [![Coverage Status](https://coveralls.io/repos/joelpurra/bespoke-advanced/badge.png)](https://coveralls.io/r/joelpurra/bespoke-advanced)

# bespoke-advanced

Expand All @@ -13,53 +13,70 @@ Download the [production version][min] or the [development version][max], or use

## Usage

First, include `bespoke.js`, `bespoke-convenient.js` and `bespoke-advanced.js` in your page.
This plugin is shipped in a [UMD format](https://github.com/umdjs/umd), meaning that it is available as a CommonJS/AMD module or browser global.

Then, simply include the plugin when instantiating your presentation.
For example, when using CommonJS modules:

```js
bespoke.horizontal.from('article', {
advanced: true
});
var bespoke = require('bespoke'),
advanced = require('bespoke-advanced');

bespoke.from('#presentation', [
advanced()
]);
```

When using browser globals:

```js
bespoke.from('#presentation', [
bespoke.plugins.advanced()
]);
```

- Key <kbd>A</kbd>: start and stop auto advancing.

## Options

These are the defaults, which you can override.
For example, when using CommonJS modules:

```js
bespoke.horizontal.from('article', {
advanced: {
var bespoke = require('bespoke'),
advanced = require('bespoke-advanced');

bespoke.from('#presentation', [
advanced({
interval: 3000, // Time between advances in milliseconds
key: 0x41 // (65) "A" key.
}
});
})
]);
```

When using browser globals:

```js
bespoke.from('#presentation', [
bespoke.plugins.advanced({
interval: 3000, // Time between advances in milliseconds
key: 0x41 // (65) "A" key.
})
]);
```

## Package managers

### Bower

```bash
$ bower install bespoke-advanced
```
## Package managers

### npm

```bash
$ npm install bespoke-advanced
```

The bespoke-advanced npm package is designed for use with [browserify](http://browserify.org/), e.g.
### Bower

```js
require('bespoke');
require('bespoke-convenient');
require('bespoke-advanced');
```bash
$ bower install bespoke-advanced
```

## Credits
Expand All @@ -73,13 +90,9 @@ My best friend, [bespoke-convenient](https://github.com/joelpurra/bespoke-conven

## License

Copyright (c) 2013, [Joel Purra](http://joelpurra.com/) All rights reserved.
Copyright (c) 2013, 2014, [Joel Purra](http://joelpurra.com/) All rights reserved.

When using bespoke-advanced, comply to the [MIT license](http://joelpurra.mit-license.org/2013). Please see the LICENSE file for details, and the [MIT License on Wikipedia](http://en.wikipedia.org/wiki/MIT_License).
When using bespoke-advanced, comply to the [MIT license](http://joelpurra.mit-license.org/2013-2014). Please see the LICENSE file for details, and the [MIT License on Wikipedia](http://en.wikipedia.org/wiki/MIT_License).

[bespoke.js]: https://github.com/markdalgleish/bespoke.js
[default-events]: https://github.com/markdalgleish/bespoke.js#events


[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/joelpurra/bespoke-advanced/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

16 changes: 10 additions & 6 deletions bower.json
@@ -1,8 +1,12 @@
{
"name": "bespoke-advanced",
"version": "0.1.0",
"dependencies": {
"bespoke.js": "~0.3.1",
"bespoke-convenient": "~0.3.0"
}
"name": "bespoke-advanced",
"version": "1.0.0-alpha.1",
"main": "./dist/bespoke-advanced.js",
"ignore": [
"**/.*"
],
"dependencies": {
"bespoke.js": "^1.0.0",
"bespoke-convenient": "^1.0.0"
}
}
11 changes: 7 additions & 4 deletions demo/demo.js
Expand Up @@ -3,9 +3,12 @@
(function(bespoke) {
"use strict";

bespoke.horizontal.from("article", {
advanced: {
bespoke.from('article', [
bespoke.plugins.keys(),
bespoke.plugins.touch(),
bespoke.plugins.classes(),
bespoke.plugins.advanced({
interval: 1500
}
});
}),
]);
}(bespoke));
37 changes: 20 additions & 17 deletions demo/index.html
@@ -1,49 +1,49 @@
<!doctype html>
<html>

<head>
<head>
<meta name="viewport" content="width=device-width" />
<title>bespoke-advanced demo</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
</head>

<body>
<body>

<h1>bespoke-advanced</h1>

<article>
<section>
<section>
<h2>Slide 1</h2>
<p>
Press the
<kbd>A</kbd>
key to start auto advancing.
</p>
</section>
<section>
</section>
<section>
<h2>Slide 2</h2>
<p>
Isn't this easy?
</p>
</section>
<section>
</section>
<section>
<h2>Slide 3</h2>
<p>
Like floating down a river.
</p>
</section>
<section>
</section>
<section>
<h2>Slide 4</h2>
<p>
Enjoying the view.
</p>
</section>
<section>
</section>
<section>
<h2>Slide 5</h2>
<p>
Everyone is so stressed out.
</p>
</section>
</section>
<section>
<h2>Slide 6</h2>
<p>
Expand Down Expand Up @@ -88,10 +88,13 @@ <h2>Slide 11</h2>
</section>
</article>

<script src="../bower_components/bespoke.js/dist/bespoke.js"></script>
<script src="../bower_components/bespoke-convenient/dist/bespoke-convenient.js"></script>
<script src="../src/bespoke-advanced.js"></script>
<script src="../node_modules/bespoke/dist/bespoke.js"></script>
<script src="../node_modules/bespoke-keys/dist/bespoke-keys.js"></script>
<script src="../node_modules/bespoke-touch/dist/bespoke-touch.js"></script>
<script src="../node_modules/bespoke-classes/dist/bespoke-classes.js"></script>
<script src="../node_modules/bespoke-convenient/dist/bespoke-convenient.js"></script>
<script src="../dist/bespoke-advanced.js"></script>
<script src="demo.js"></script>
</body>
</body>

</html>

0 comments on commit 7b461ec

Please sign in to comment.