Skip to content

Commit

Permalink
Add bower support and allow using npm install to install intern-geezer
Browse files Browse the repository at this point in the history
* Add bower.json
* Remove cpm-related dependencies from package.json
* Add intern-geezer to devDependencies in package.json
* Update README
  • Loading branch information
Kenneth G. Franqueiro committed Aug 7, 2014
1 parent 849fe25 commit d4aefc2
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 65 deletions.
78 changes: 42 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
This project provides widgets for lists of data, including simple sets of scrolling rows,
grids of data, on-demand lazy-loaded data, and various plugins for additional functionality.
This project also provides touch scrolling for mobile devices with native style
momentum, bouncing, and scrollbars.
The dgrid project provides widgets for lists of data, including simple sets of scrolling rows,
grids of data, on-demand lazy-loaded data, and various mixins for additional functionality.

The dgrid project is available under the same dual BSD/AFLv2 license as the Dojo Toolkit.
dgrid is available under the same dual BSD/AFLv2 license as the Dojo Toolkit.

# Installation

## Automatic Download with CPM
## Installing with bower

dgrid can be installed via [CPM](https://github.com/kriszyp/cpm)
using the following command:
dgrid and its dependencies can be installed via [bower](http://bower.io/) using the following command:

cpm install dgrid
```
bower install dgrid
```

Note that by default, bower installs to a `bower_components` subdirectory. If you'd
like to install to the current directory instead (which tends to be more appropriate
for AMD projects), add a `.bowerrc` with the following:

The above command will automatically find the highest tagged version of dgrid and
install it. Alternatively, the latest development version of dgrid can be
installed by instructing CPM to install from the master branch:
```json
{
"directory": "."
}
```

By default, bower will automatically find the highest tagged version of dgrid and
install it along with its dependencies. Alternatively, the latest development version of dgrid can be
installed by instructing bower to install from the master branch:

cpm install dgrid master
```
bower install dgrid#master
```

Note that while dgrid lists the dojo package as a dependency, it does not install
dijit, as it is not a hard requirement. Dijit can be additionally installed by
Note that while dgrid lists the `dojo` package as a dependency, it will not automatically
install `dijit`, as it is not a hard requirement. Dijit can be additionally installed by
running:

cpm install dijit
```
bower install dijit#<target>
```

dgrid 0.4 also uses [dstore](https://github.com/SitePen/dstore) for store-backed grids.
dstore is not listed in cpm's repository, so it will need to be obtained manually.
We are still investigating options in regard to package managers for new releases.
...where `<target>` corresponds to the version of Dojo you have installed.

## Manual Download

Expand All @@ -37,7 +48,7 @@ Alternatively, dgrid and its dependencies can be downloaded individually:
* [xstyle](https://github.com/kriszyp/xstyle)
* [put-selector](https://github.com/kriszyp/put-selector)
* [dstore](https://github.com/SitePen/dstore) for store-backed grids
* [The Dojo Toolkit](http://dojotoolkit.org) SDK version 1.7 or higher
* [The Dojo Toolkit](http://dojotoolkit.org) SDK version 1.8 or higher
* Out of the DTK components, Dojo core is the only hard dependency for dgrid;
however, some of the test pages also use components from Dijit, and
Dojox (namely grid for a comparison test, and mobile for a mobile page).
Expand All @@ -46,31 +57,23 @@ It is recommended to arrange all dependencies as siblings, resulting in a
directory structure like the following:

* `dgrid`
* `dijit` (optional, dependency of some dgrid tests)
* `dijit` (optional, dependency of some dgrid tests/components)
* `dojo`
* `dojox` (optional, dependency of some dgrid tests)
* `dstore`
* `put-selector`
* `xstyle`
* `util` (optional, e.g. if pursuing a custom build)

dgrid works best with the latest revision of Dojo 1.7 or higher. As of this
writing, [Dojo 1.9.3](http://download.dojotoolkit.org/release-1.9.3/) is
dgrid works best with the latest revision of Dojo 1.8 or higher. As of this
writing, [Dojo 1.10.0](http://download.dojotoolkit.org/release-1.10.0/) is
recommended.

Note that while dgrid supports Dojo 1.8 and 1.9 and may take advantage of features
or fix issues specific to them where possible, it does not have any hard dependency
on APIs new to 1.8 or 1.9, so as to maintain compatibility with 1.7.

# Documentation

Documentation for dgrid components is available in the
[dgrid GitHub project wiki](https://github.com/SitePen/dgrid/wiki).
The wiki's content may still be obtained for offline reading by cloning
the wiki repository, as indicated under the "Git Access" tab.

In addition to the documentation on the wiki, if upgrading from a previous
dgrid release, please be sure to read the changelog, found in CHANGES.md.
[doc folder](doc). In addition to the documentation on the wiki, if upgrading from a previous
dgrid release, please be sure to read the [release notes on GitHub](https://github.com/SitePen/dgrid/releases).

# Testing

Expand All @@ -79,16 +82,19 @@ either be run using the browser, or using a cloud provider such as
[Sauce Labs](https://saucelabs.com/). More information on writing your own tests
with Intern can be found in the [Intern wiki](https://github.com/theintern/intern/wiki).

*Note that installing dgrid via bower will not include the test folder; if you
wish to run dgrid's unit tests, download the package directly.*

## Setting up

**Note:** Commands listed in this section are all written assuming they are
run inside the `dgrid` directory.

Install the latest *geezer* version of Intern, which supports IE 8
in addition to modern browsers.
Run `npm install` to install the latest *geezer* version of Intern 2,
which supports IE 8 in addition to modern browsers:

```
npm install --production intern-geezer
npm install
```

## Running via the browser
Expand Down
31 changes: 31 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "dgrid",
"description": "A lightweight, mobile-ready, data-driven, modular widget designed for lists and grids",
"keywords": [
"dojo",
"grid"
],
"authors": [
"Kris Zyp",
"Kenneth G. Franqueiro",
"Ed Hager"
],
"main": "OnDemandGrid.js",
"homepage": "http://dgrid.io",
"repository": {
"type": "git",
"url": "git://github.com/SitePen/dgrid"
},
"dependencies": {
"dojo": ">=1.8.1",
"dstore": ">=0.1.1",
"xstyle": ">=0.1.3",
"put-selector": ">=0.3.5"
},
"ignore": [
".*",
"test"
],
"license": [ "AFL-2.1", "BSD-3-Clause" ],
"moduleType": [ "amd" ]
}
57 changes: 28 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
{
"name": "dgrid",
"author": "Kris Zyp",
"version": "0.4.0-dev",
"description": "A lightweight, mobile-ready, data-driven, modular widget designed for lists and grids",
"licenses": [
{
"type": "AFLv2.1",
"url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43"
},
{
"type": "BSD",
"url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13"
}
],
"repository": {
"type":"git",
"url":"http://github.com/SitePen/dgrid"
},
"dependencies": {
"dojo": "1.7.2",
"put-selector": "0.3.5",
"xstyle": "0.1.3"
},
"directories": {
"lib": "."
},
"main": "./OnDemandGrid",
"icon": "http://packages.dojofoundation.org/images/dgrid.png",
"dojoBuild": "package.js"
"name": "dgrid",
"author": "Kris Zyp",
"version": "0.4.0-dev",
"description": "A lightweight, mobile-ready, data-driven, modular widget designed for lists and grids",
"licenses": [
{
"type": "AFLv2.1",
"url": "https://spdx.org/licenses/AFL-2.1"
},
{
"type": "BSD",
"url": "http://opensource.org/licenses/BSD-3-Clause"
}
],
"repository": {
"type":"git",
"url":"http://github.com/SitePen/dgrid"
},
"devDependencies": {
"intern-geezer": "~2"
},
"directories": {
"doc": "./doc",
"lib": "."
},
"main": "./OnDemandGrid",
"icon": "http://packages.dojofoundation.org/images/dgrid.png",
"dojoBuild": "package.js"
}

0 comments on commit d4aefc2

Please sign in to comment.