[PathKit] Remove experimental- from package names
On the demo page, we use the skia-cdn bucket to hopefully
have better performance than unpkg.
Additionally, on the demo page, we default to using the
WASM version if supported by the browser.
Docs-Preview: https://skia.org/?cl=150904
Bug: skia:8216
Change-Id: I901016e95b8d66803053680691aac4d314821d18
Reviewed-on: https://skia-review.googlesource.com/150904
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
diff --git a/modules/pathkit/npm-wasm/README.md b/modules/pathkit/npm-wasm/README.md
index 89374da..571bcfa 100644
--- a/modules/pathkit/npm-wasm/README.md
+++ b/modules/pathkit/npm-wasm/README.md
@@ -1,10 +1,10 @@
A WASM version of Skia's PathOps toolkit.
-To use the library, run `npm install experimental-pathkit-wasm` and then simply include it:
+To use the library, run `npm install pathkit-wasm` and then simply include it:
- <script src="/node_modules/experimental-pathkit-wasm/bin/pathkit.js"></script>
+ <script src="/node_modules/pathkit-wasm/bin/pathkit.js"></script>
PathKitInit({
- locateFile: (file) => '/node_modules/experimental-pathkit-wasm/bin/'+file,
+ locateFile: (file) => '/node_modules/pathkit-wasm/bin/'+file,
}).then((PathKit) => {
// Code goes here using PathKit
});
@@ -28,7 +28,7 @@
In the JS code, use require():
- const PathKitInit = require('experimental-pathkit-wasm/bin/pathkit.js')
+ const PathKitInit = require('pathkit-wasm/bin/pathkit.js')
PathKitInit().then((PathKit) => {
// Code goes here using PathKit
})
@@ -40,13 +40,13 @@
config.plugins.push(
new CopyWebpackPlugin([
- { from: 'node_modules/experimental-pathkit-wasm/bin/pathkit.wasm' }
+ { from: 'node_modules/pathkit-wasm/bin/pathkit.wasm' }
])
);
If webpack gives an error similar to:
- ERROR in ./node_modules/experimental-pathkit-wasm/bin/pathkit.js
+ ERROR in ./node_modules/pathkit-wasm/bin/pathkit.js
Module not found: Error: Can't resolve 'fs' in '...'
Then, add the following configuration change to the node section of the config:
diff --git a/modules/pathkit/npm-wasm/example.html b/modules/pathkit/npm-wasm/example.html
index a6c8cca..063454f 100644
--- a/modules/pathkit/npm-wasm/example.html
+++ b/modules/pathkit/npm-wasm/example.html
@@ -44,12 +44,12 @@
<svg id=svg2 xmlns='http://www.w3.org/2000/svg' width=200 height=200></svg>
<svg id=svg3 xmlns='http://www.w3.org/2000/svg' width=200 height=200></svg>
-<script type="text/javascript" src="/node_modules/experimental-pathkit-wasm/bin/pathkit.js"></script>
+<script type="text/javascript" src="/node_modules/pathkit-wasm/bin/pathkit.js"></script>
<script type="text/javascript" charset="utf-8">
PathKitInit({
- locateFile: (file) => '/node_modules/experimental-pathkit-wasm/bin/'+file,
+ locateFile: (file) => '/node_modules/pathkit-wasm/bin/'+file,
}).then((PathKit) => {
window.PathKit = PathKit;
OutputsExample(PathKit);
diff --git a/modules/pathkit/npm-wasm/package.json b/modules/pathkit/npm-wasm/package.json
index 2999478..f501a89 100644
--- a/modules/pathkit/npm-wasm/package.json
+++ b/modules/pathkit/npm-wasm/package.json
@@ -1,6 +1,6 @@
{
- "name": "experimental-pathkit-wasm",
- "version": "0.3.1",
+ "name": "pathkit-wasm",
+ "version": "0.4.0",
"description": "A WASM version of Skia's PathOps toolkit",
"main": "bin/pathkit.js",
"homepage": "https://github.com/google/skia/tree/master/modules/pathkit",