mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
bbd65324bc
This add a gulp task (`gulp docs:typescript`) to automatically generate a typescript definition for the library. This should solve the problem of having an out of sync type definition when we change the API. This task takes advantage of existing JSDoc parsing to generate a temporary file which is later formatted through a mustache template to generate the final definition. This definition is then tested by compiling a typescript file that use it. The generated definition is added to the `gulp zip` task in order to be published along with the bundled library. So 2 new dev-dependencies are added with this change: `mustache` and `typescript` packages. Using node and mustache to generate the definition instead of relying on existing templating system is motivated by a better development experience, with easier debugging possibilities... through the usage of more modern tools. As a side note, support of "rest parameters" (when a parameter can be present multiple times) is added to existing JSDoc parser in order to support this pattern on typescript side (E.g. for `Color#set()` method which accept any sequence of parameters that is supported by `Color` constructors).
75 lines
2.3 KiB
JSON
75 lines
2.3 KiB
JSON
{
|
|
"name": "paper",
|
|
"version": "0.12.0",
|
|
"description": "The Swiss Army Knife of Vector Graphics Scripting",
|
|
"license": "MIT",
|
|
"homepage": "http://paperjs.org",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/paperjs/paper.js"
|
|
},
|
|
"bugs": "https://github.com/paperjs/paper.js/issues",
|
|
"contributors": ["Jürg Lehni <juerg@scratchdisk.com> (http://scratchdisk.com)", "Jonathan Puckey <jonathan@studiomoniker.com> (http://studiomoniker.com)"],
|
|
"main": "dist/paper-full.js",
|
|
"scripts": {
|
|
"precommit": "gulp jshint --branch develop",
|
|
"prepush": "gulp test --branch develop",
|
|
"build": "gulp build",
|
|
"dist": "gulp dist",
|
|
"zip": "gulp zip",
|
|
"docs": "gulp docs",
|
|
"load": "gulp load",
|
|
"jshint": "gulp jshint",
|
|
"test": "gulp test"
|
|
},
|
|
"files": ["AUTHORS.md", "CHANGELOG.md", "dist/", "examples/", "LICENSE.txt", "README.md"],
|
|
"engines": {
|
|
"node": ">=4.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"acorn": "~0.5.0",
|
|
"canvas": "^1.3.5",
|
|
"del": "^2.2.1",
|
|
"gulp": "^3.9.1",
|
|
"gulp-cached": "^1.1.0",
|
|
"gulp-git-streamed": "^2.8.1",
|
|
"gulp-jshint": "^2.0.0",
|
|
"gulp-json-editor": "^2.2.1",
|
|
"gulp-prepro": "^2.4.0",
|
|
"gulp-qunits": "^2.1.1",
|
|
"gulp-rename": "^1.2.2",
|
|
"gulp-shell": "^0.5.2",
|
|
"gulp-symlink": "^2.1.4",
|
|
"gulp-uglify": "^1.5.4",
|
|
"gulp-uncomment": "^0.3.0",
|
|
"gulp-util": "^3.0.7",
|
|
"gulp-webserver": "^0.9.1",
|
|
"gulp-whitespace": "^0.1.0",
|
|
"gulp-zip": "^3.2.0",
|
|
"husky": "^0.11.4",
|
|
"jsdom": "^9.4.0",
|
|
"jshint": "^2.9.2",
|
|
"jshint-summary": "^0.4.0",
|
|
"merge-stream": "^1.0.0",
|
|
"minimist": "^1.2.0",
|
|
"mustache": "^3.0.1",
|
|
"prepro": "^2.4.0",
|
|
"qunitjs": "^1.23.0",
|
|
"require-dir": "^0.3.0",
|
|
"resemblejs": "^2.2.1",
|
|
"run-sequence": "^1.2.2",
|
|
"source-map-support": "^0.4.0",
|
|
"stats.js": "0.16.0",
|
|
"straps": "^3.0.1",
|
|
"typescript": "^3.1.6"
|
|
},
|
|
"browser": {
|
|
"canvas": false,
|
|
"jsdom": false,
|
|
"jsdom/lib/jsdom/living/generated/utils": false,
|
|
"source-map-support": false,
|
|
"./dist/node/self.js": false,
|
|
"./dist/node/extend.js": false
|
|
},
|
|
"keywords": ["vector", "graphic", "graphics", "2d", "geometry", "bezier", "curve", "curves", "path", "paths", "canvas", "svg", "paper", "paper.js", "paperjs"]
|
|
}
|