Skip to content

Commit

Permalink
Remove Grunt and update some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Mar 12, 2017
1 parent 4b73563 commit 5b8fcc3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 215 deletions.
8 changes: 0 additions & 8 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"globals": {
"SHIFTY_DEBUG_NOW": true,
"root": true,
"Tweenable": true,
"module": true,
"define": true
},

"asi": false,
"boss": true,
"browser": true,
Expand Down
23 changes: 4 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,18 @@ released (built and tagged). When making a Pull Request, please branch off of
`develop` and request to merge back into it. `master` is only merged into from
`develop`.

## Versioning

Shifty uses [SemVer](http://semver.org/) for versioning. If you modify the
source code, please adhere to this convention (in all likelihood you will only
need to modify the rightmost digit by one). To change the version, you'll need
to update the version in two places: `bower.json` and `package.json` (look for
the lines that say `version`). The version numbers in these two files must be
kept in sync.

## Building

Shifty uses [Grunt](http://gruntjs.com/) (version 0.4.1 or later, globally
installed) to generate the distributable binaries. If you make any changes to
the source code and need to rebuild the binaries for testing or an alternative
release, run this command:

````
$: grunt build
$: npm run build
````

## Testing

Please make sure that all tests pass before submitting a Pull Request. To run
the tests on the command line (requires [PhantomJS](http://phantomjs.org/)):
Please make sure that all tests pass before submitting a Pull Request.

````
$: grunt qunit
$: npm test
````

You can also run the tests in the browser. They are in `tests/`. If you are
Expand All @@ -62,5 +47,5 @@ Please try to remain consitent with existing code. To automatically check for
style issues or other potential problems, you can run:

````
$: grunt jshint
$: npm run lint
````
140 changes: 0 additions & 140 deletions Gruntfile.js

This file was deleted.

50 changes: 11 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,13 @@ are:

## Installation

Shifty is available through NPM and Bower:

````
npm install --save shifty
````

````
bower install --save shifty
````

## Browser compatibility

Shifty officially supports Internet Explorer 8 and up, as well as all Evergreen
browsers.
Shifty officially supports Evergreen browsers.

## Using Shifty

Expand Down Expand Up @@ -268,9 +261,7 @@ step.

## Building Shifty

Shifty uses [nodejs](http://nodejs.org) and [Grunt](http://gruntjs.com/) for
the build system. It also requires a handful of Node modules for the build
process. Install the dependencies via npm like so:
First, install the dependencies via npm like so:

````
$: npm install
Expand All @@ -279,48 +270,29 @@ $: npm install
Once those are installed, do this at the command line to build the project:

````
$: grunt build
````

The the default `build` task creates a binary that includes all extensions.
You can also create minimal binaries that only include the bare essentials for
Shifty to run:

````
$: grunt build-minimal
````

Note that a minimal build includes no tweening formulas. You can customize and
add build targets in the `grunt.js` file. You can also lint the code and run
the unit tests with the default Grunt task:

````
$: grunt
$: npm run build
````

To generate the documentation:

````
$: grunt yuidoc
$: npm run doc
````

## AMD and NodeJS
## Loading Shifty

If an AMD loader (eg. [RequireJS](http://requirejs.org/),
[Curl.js](https://github.com/unscriptable/curl)) is present on the page, Shifty
won't generate any globals, so to use it you must list `"shifty"` as
a dependency.
Shifty exposes a UMD module, so you can load it however you like:

````javascript
define(['shifty'], function(Tweenable){
var tweenable = new Tweenable();
});
import { Tweenable } from 'shifty';
````

Shifty can also be used in NodeJS:
Or:

````javascript
var Tweenable = require('shifty');
define(['shifty'], function(shifty){
var tweenable = new shifty.Tweenable();
});
````

## Contributors
Expand Down
12 changes: 3 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,8 @@
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-preset-es2015": "^6.22.0",
"grunt": "~0.4.1",
"grunt-bump": "0.0.13",
"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-jshint": "^0.11.1",
"grunt-contrib-uglify": "^0.9.2",
"grunt-contrib-yuidoc": "^0.5.2",
"grunt-dox": "~0.5.0",
"jsdoc": "^3.4.3",
"jshint": "^2.9.4",
"mocha": "^3.2.0",
"nodemon": "^1.11.0",
"webpack": "^1.14.0",
Expand All @@ -32,7 +25,8 @@
"start": "webpack-dev-server --config webpack.test.config.js",
"test": "mocha ./node_modules/babel-core/register.js test/index.js",
"test:watch": "nodemon --exec \"npm test\" --watch src --watch test",
"doc": "jsdoc -c .jsdoc src/*.js"
"doc": "jsdoc -c .jsdoc src/*.js",
"lint": "jshint src"
},
"contributors": [
{
Expand Down

0 comments on commit 5b8fcc3

Please sign in to comment.