grunt-geo
所属分类:地理学
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2016-07-26 10:12:38
上 传 者:
sh-1993
说明: Grunt插件,用于查找回购的地理中心并保存geojson文件,
(Grunt plugin that finds the geographic center of your repo and saves geojson file,)
文件列表:
.jshintrc (206, 2016-07-26)
Gruntfile.js (1743, 2016-07-26)
LICENSE-MIT (1049, 2016-07-26)
collaborators.geojson (6298, 2016-07-26)
contributors.geojson (77858, 2016-07-26)
forks.geojson (16001, 2016-07-26)
package.json (1068, 2016-07-26)
samples/ (0, 2016-07-26)
samples/Leaflet.geojson (77858, 2016-07-26)
samples/bower.geojson (51276, 2016-07-26)
samples/d3-d3parsets.geojson (7390, 2016-07-26)
samples/jashkenas-backbone.geojson (6298, 2016-07-26)
samples/postgis-forks.geojson (13819, 2016-07-26)
samples/postgis.geojson (3265, 2016-07-26)
samples/twitter-bootstrap.geojson (166797, 2016-07-26)
tasks/ (0, 2016-07-26)
tasks/geo.js (4627, 2016-07-26)
test/ (0, 2016-07-26)
test/geo_test.js (1394, 2016-07-26)
# grunt-geo
> Find and map the geographic center of a github repo
## Getting Started
This plugin requires Grunt `~0.4.1`
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
```shell
npm install grunt-geo --save-dev
```
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-geo');
```
## The "geo" task
### Overview
In your project's Gruntfile, add a section named `geo` to the data object passed into `grunt.initConfig()`.
```js
grunt.initConfig({
geo: {
collaborators: {
options: {
// file: 'name of the file you want (defaults to collaborators.geojson)'
// repo: 'the https url to a github api of a repo, uses package.json to default to current project'
// token: 'your github api token for issuing requests beyond the anon rate limits'
},
},
},
})
```
### Options
#### options.file
Type: `String`
Default value: `'collaborators.geojson'`
A string value that is used as the name of the file you'd like to create
#### options.repo
Type: `String`
Default value: `'https://api.github.com/repos/{user}/{repo}'`
A string value used to create geojson from any other github repo
#### options.token
Type: `String`
Default value: `none`
A string value used to make more requests than the anon github rate limits let you
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
## Release History
_(Nothing yet)_
近期下载者:
相关文件:
收藏者: