Skip to content

Commit

Permalink
Let’s Make a (D3) Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
romsson committed Jul 28, 2016
1 parent f9e815f commit b342ef4
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
.DS_Store
build/
node_modules
npm-debug.log
2 changes: 2 additions & 0 deletions .npmignore
@@ -0,0 +1,2 @@
build/*.zip
test/
13 changes: 12 additions & 1 deletion README.md
@@ -1,2 +1,13 @@
# d3-gridding
creates various grid partitions and overlays for d3 charts

Creates various grid partitions and overlays for d3 charts.

## Installing

If you use NPM, `npm install d3-gridding`. Otherwise, download the [latest release](https://github.com/romsson/d3-gridding/releases/latest).

## API Reference

<a href="#foo" name="foo">#</a> <b>gridding</b>()

Computes the answer to the ultimate question of life, the universe, and everything.
1 change: 1 addition & 0 deletions index.js
@@ -0,0 +1 @@
export {default as gridding} from "./src/gridding";
28 changes: 28 additions & 0 deletions package.json
@@ -0,0 +1,28 @@
{
"name": "d3-gridding",
"version": "0.0.1",
"description": "creates various grid partitions and overlays for d3 charts",
"keywords": [
"d3",
"d3-module"
],
"license": "BSD-3-Clause",
"main": "build/d3-gridding.js",
"jsnext:main": "index",
"homepage": "https://github.com/romsson/d3-gridding",
"repository": {
"type": "git",
"url": "https://github.com/romsson/d3-gridding.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && rollup -f umd -n d3 -o build/d3-gridding.js -- index.js",
"test": "tape 'test/**/*-test.js'",
"prepublish": "npm run test && uglifyjs build/d3-gridding.js -c -m -o build/d3-gridding.min.js",
"postpublish": "zip -j build/d3-gridding.zip -- LICENSE README.md build/d3-gridding.js build/d3-gridding.min.js"
},
"devDependencies": {
"rollup": "0.27",
"tape": "4",
"uglify-js": "2"
}
}
3 changes: 3 additions & 0 deletions src/gridding.js
@@ -0,0 +1,3 @@
export default function() {
return 42;
};
7 changes: 7 additions & 0 deletions test/gridding-test.js
@@ -0,0 +1,7 @@
var tape = require("tape"),
gridding = require("../");

tape("gridding() returns the answer to the ultimate question of life, the universe, and everything.", function(test) {
test.equal(gridding.gridding(), 42);
test.end();
});

0 comments on commit b342ef4

Please sign in to comment.