Selaa lähdekoodia

update package.json and readme

Raanan Weber 7 vuotta sitten
vanhempi
commit
76631a3971

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1183
dist/preview release/viewer/babylon.viewer.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1367 - 5
dist/preview release/viewer/babylon.viewer.module.d.ts


+ 0 - 1
dist/preview release/viewer/package.json

@@ -12,7 +12,6 @@
     "main": "babylon.viewer.js",
     "files": [
         "babylon.viewer.js",
-        "babylon.viewer.d.ts",
         "babylon.viewer.module.d.ts",
         "babylon.d.ts",
         "readme.md",

+ 4 - 11
dist/preview release/viewer/readme.md

@@ -48,7 +48,9 @@ npm install --save babylonjs-viewer
 Afterwards it can be imported to the project using:
 
 ```javascript
-import from 'babylonjs-viewer';
+import * as BabylonViewer from 'babylonjs-viewer';
+
+BabylonViewer.InitTags("my-tag");
 ```
 
 This will enable the BabylonViewer namespace.
@@ -57,13 +59,4 @@ Using webpack to package your project will use the minified js file.
 
 ## TypeScript
 
-If you use the npm package, starting 3.2.0-alpha8 the babylon viewer has a module declaration file that also includes the BABYLON namespace.
-
-Using TypeScript and NPM you could do the following:
-
-```javascript
-import from 'babylonjs-viewer';
-
-// both namespaces are now available
-console.log(BabylonViewer, BABYLON)
-```
+If you use the npm package, starting 3.2.0-alpha8 the babylon viewer has a fully documented declaration file.