mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Prebuilt module for commit 139f3c66adbabbf9733f9590b88fecdc9a0ec075
This commit is contained in:
parent
68f2574062
commit
38f4ce6cca
9 changed files with 6591 additions and 42 deletions
48
README.md
48
README.md
|
@ -64,8 +64,9 @@ different projects:
|
|||
Homebrew is recommended on macOS also if you intend to install Paper.js with
|
||||
rendering to the Canvas on Node.js, as described in the next paragraph.
|
||||
|
||||
For Linux, see <https://nodejs.org/download/> to locate 32-bit and 64-bit Node.js
|
||||
binaries as well as sources, or use NVM, as described in the paragraph above.
|
||||
For Linux, see <https://nodejs.org/download/> to locate 32-bit and 64-bit
|
||||
Node.js binaries as well as sources, or use NVM, as described in the paragraph
|
||||
above.
|
||||
|
||||
### Installing Paper.js Using NPM
|
||||
|
||||
|
@ -167,21 +168,20 @@ run:
|
|||
|
||||
### Setting Up For Building
|
||||
|
||||
As of 2016, Paper.js uses [Gulp.js](https://gulpjs.com/) for building, and has a
|
||||
couple of dependencies as NPM modules. Read the chapter [Installing
|
||||
Node.js and NPM](#installing-nodejs-and-npm) if you still need to
|
||||
install these.
|
||||
Paper.js uses [Gulp.js](https://gulpjs.com/) for building, and has a couple of
|
||||
dependencies as NPM modules. Read the chapter [Installing Node.js and
|
||||
NPM](#installing-nodejs-and-npm) if you still need to install these.
|
||||
|
||||
Due to a conflict in Gulp 3 that could only be resolved using package
|
||||
resolution, we recently switched from NPM to `yarn` for development, which also
|
||||
needs to be installed now. See
|
||||
[Installing Yarn](https://classic.yarnpkg.com/en/docs/install/) for details.
|
||||
|
||||
In order to be able to build Paper.js, after checking out the repository, paper
|
||||
has dependencies that need to be installed. Install them by issuing the
|
||||
following commands from the Paper.js directory:
|
||||
|
||||
npm install
|
||||
|
||||
It is also recommended to install Gulp.js globally, so you can easier execute
|
||||
the build commands from anywhere in the command line:
|
||||
|
||||
npm install -g gulp
|
||||
yarn install
|
||||
|
||||
### Building the Library
|
||||
|
||||
|
@ -189,7 +189,7 @@ The Paper.js sources are distributed across many separate files, organised in
|
|||
subfolders inside the `src` folder. To compile them all into distributable
|
||||
files, you can run the `build` task:
|
||||
|
||||
gulp build
|
||||
yarn build
|
||||
|
||||
You will then find the built library files inside the `dist` folder, named
|
||||
`paper-full.js` and `paper-core.js`, along with their minified versions. Read
|
||||
|
@ -207,11 +207,11 @@ library.
|
|||
This means you can switch between loading from sources and loading a built
|
||||
library simply by running.
|
||||
|
||||
gulp load
|
||||
yarn load
|
||||
|
||||
And to go back to a built library
|
||||
|
||||
gulp build
|
||||
yarn build
|
||||
|
||||
Note that your PaperScripts examples do not need to change, they can keep
|
||||
loading `dist/paper-full.js`, which will always do the right thing. Note also
|
||||
|
@ -221,11 +221,7 @@ that `src/load.js` handles both browsers and Node.js, as supported by Prepro.js.
|
|||
|
||||
Create a final zipped distribution file inside the `dist` folder:
|
||||
|
||||
gulp dist
|
||||
|
||||
And since `dist` is the default task, this is the same:
|
||||
|
||||
gulp
|
||||
yarn dist
|
||||
|
||||
### Branch structure
|
||||
|
||||
|
@ -236,7 +232,7 @@ only merged into [`master`](https://github.com/paperjs/paper.js/tree/master)
|
|||
when a new release occurs.
|
||||
|
||||
As of version `0.9.26`, the `dist` folder is excluded on all branches, and the
|
||||
building is now part of the `npm publish` process by way of the `prepublish`
|
||||
building is now part of the `yarn publish` process by way of the `prepublish`
|
||||
script.
|
||||
|
||||
We also offer prebuilt versions of the latest state of the `develop` branch on
|
||||
|
@ -248,7 +244,7 @@ and [`prebuilt/dist`](https://github.com/paperjs/paper.js/tree/prebuilt/dist).
|
|||
Similarly to building the library, you can run the `docs` task to build the
|
||||
documentation:
|
||||
|
||||
gulp docs
|
||||
yarn docs
|
||||
|
||||
Your docs will then be located at `dist/docs`.
|
||||
|
||||
|
@ -266,20 +262,20 @@ CORS restrictions. In order to run the browser based tests on Chrome, you need
|
|||
to run a local web-server through Gulp.js. The following command will handle it
|
||||
for you, and will also open the browser at the right address straight away:
|
||||
|
||||
gulp test:browser
|
||||
yarn test:browser
|
||||
|
||||
You can also run the unit tests through PhantomJS in Gulp directly on the
|
||||
command line:
|
||||
|
||||
gulp test:phantom
|
||||
yarn test:phantom
|
||||
|
||||
To test the Node.js version of Paper.js, use this command:
|
||||
|
||||
gulp test:node
|
||||
yarn test:node
|
||||
|
||||
And to test both the PhantomJS and Node.js environments together, simply run:
|
||||
|
||||
gulp test
|
||||
yarn test
|
||||
|
||||
### Contributing [![Open Source Helpers](https://www.codetriage.com/paperjs/paper.js/badges/users.svg)](https://www.codetriage.com/paperjs/paper.js)
|
||||
|
||||
|
|
2
dist/docs/assets/js/paper.js
vendored
2
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Fri Mar 12 22:28:42 2021 +0100
|
||||
* Date: Fri Mar 12 23:00:58 2021 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
2
dist/paper-core.js
vendored
2
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Fri Mar 12 22:28:42 2021 +0100
|
||||
* Date: Fri Mar 12 23:00:58 2021 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
4
dist/paper-core.min.js
vendored
4
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/paper-full.js
vendored
2
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Fri Mar 12 22:28:42 2021 +0100
|
||||
* Date: Fri Mar 12 23:00:58 2021 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
4
dist/paper-full.min.js
vendored
4
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/paper.d.ts
vendored
2
dist/paper.d.ts
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Fri Mar 12 22:28:42 2021 +0100
|
||||
* Date: Fri Mar 12 23:00:58 2021 +0100
|
||||
*
|
||||
* This is an auto-generated type definition.
|
||||
*/
|
||||
|
|
18
package.json
18
package.json
|
@ -16,6 +16,7 @@
|
|||
"main": "dist/paper-full.js",
|
||||
"types": "dist/paper.d.ts",
|
||||
"scripts": {
|
||||
"minify": "gulp minify",
|
||||
"build": "gulp build",
|
||||
"dist": "gulp dist",
|
||||
"zip": "gulp zip",
|
||||
|
@ -23,7 +24,9 @@
|
|||
"load": "gulp load",
|
||||
"jshint": "gulp jshint",
|
||||
"test": "gulp test",
|
||||
"preinstall": "npx npm-force-resolutions || true"
|
||||
"test:browser": "gulp test:browser",
|
||||
"test:phantom": "gulp test:phantom",
|
||||
"test:node": "gulp test:node"
|
||||
},
|
||||
"files": [
|
||||
"AUTHORS.md",
|
||||
|
@ -38,17 +41,17 @@
|
|||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "gulp jshint --ensure-branch develop",
|
||||
"pre-push": "gulp test --ensure-branch develop"
|
||||
"pre-commit": "yarn jshint --ensure-branch develop",
|
||||
"pre-push": "yarn test --ensure-branch develop"
|
||||
}
|
||||
},
|
||||
"browser": {
|
||||
"./dist/node/extend.js": false,
|
||||
"./dist/node/self.js": false,
|
||||
"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
|
||||
"source-map-support": false
|
||||
},
|
||||
"devDependencies": {
|
||||
"acorn": "~0.5.0",
|
||||
|
@ -56,8 +59,8 @@
|
|||
"canvas": "^2.6.1",
|
||||
"del": "^5.1.0",
|
||||
"fancy-log": "^1.3.3",
|
||||
"gulp-cached": "^1.1.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-cached": "^1.1.1",
|
||||
"gulp-git-streamed": "^2.10.1",
|
||||
"gulp-jshint": "^2.1.0",
|
||||
"gulp-json-editor": "^2.5.4",
|
||||
|
@ -78,7 +81,6 @@
|
|||
"merge-stream": "^2.0.0",
|
||||
"minimist": "^1.2.5",
|
||||
"mustache": "^4.0.1",
|
||||
"npm-force-resolutions": "^0.0.3",
|
||||
"prepro": "^2.4.0",
|
||||
"qunitjs": "^1.23.0",
|
||||
"require-dir": "^1.2.0",
|
||||
|
|
Loading…
Reference in a new issue