Update readme and build script
This commit is contained in:
15
README.md
15
README.md
@@ -38,6 +38,21 @@ var simulation = d3.forceSimulation(nodes);
|
||||
</script>
|
||||
```
|
||||
|
||||
## File structure
|
||||
- [index.js](index.js) Export list of the module
|
||||
- [src/](src) Source code of the module
|
||||
- [package.json](package.json) Node.js moudle descriptor with build scripts
|
||||
- [img](img) Images for this readme file
|
||||
- [examples](examples) An example page running all the algorithms implemented
|
||||
|
||||
## Building
|
||||
```bash
|
||||
npm run build
|
||||
npm run minify
|
||||
npm run zip
|
||||
```
|
||||
See package.json for more details.
|
||||
|
||||
## API Reference
|
||||
|
||||
#### Spring Model
|
||||
|
||||
@@ -12,14 +12,12 @@
|
||||
"main": "build/d3-spring-model.js",
|
||||
"jsnext:main": "index",
|
||||
"scripts": {
|
||||
"pretest": "rm -rf build && mkdir build && rollup -g d3-force:d3,d3-dispatch:d3,d3-quadtree:d3,d3-collection:d3 -f umd -n d3 -o build/d3-spring-model.js -- index.js",
|
||||
"test": "tape 'test/**/*-test.js'",
|
||||
"prepublish": "npm run test && node_modules/uglify-es/bin/uglifyjs build/d3-spring-model.js -c -m -o build/d3-spring-model.min.js",
|
||||
"postpublish": "zip -j build/d3-spring-model.zip -- LICENSE README.md build/d3-spring-model.js build/d3-spring-model.min.js"
|
||||
"build": "rimraf build && mkdir build && rollup -g d3-force:d3,d3-dispatch:d3,d3-quadtree:d3,d3-collection:d3 -f umd -n d3 -o build/d3-spring-model.js -- index.js",
|
||||
"minify": "node_modules/uglify-es/bin/uglifyjs build/d3-spring-model.js -c -m -o build/d3-spring-model.min.js",
|
||||
"zip": "zip -j build/d3-spring-model.zip -- LICENSE README.md build/d3-spring-model.js build/d3-spring-model.min.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rollup": "0.36",
|
||||
"tape": "4",
|
||||
"uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user