Skip to content

Commit 4b046a5

Browse files
Remove Nutrient assets copy requirement from examples. (#25)
* Remove unnecessary skipLibCheck. * Remove copy assets step from Electron example. * Remove unused dependencies in Electron. * Remove copying from GatsbyJS example. * Update Laravel example, remove copy assets step. * Make copy assets strategy part of the integration. * Remove unused arg (NextJS). * Remove copy assets strategy from NuxtJS example (via CDN). * Update Svelte example. * Use local updated document in Svelte-Kit example. * Update Typescript example.
1 parent 0918692 commit 4b046a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+27129
-1887
lines changed

examples/angular/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"noPropertyAccessFromIndexSignature": true,
88
"noImplicitReturns": true,
99
"noFallthroughCasesInSwitch": true,
10-
"skipLibCheck": true,
1110
"isolatedModules": true,
1211
"esModuleInterop": true,
1312
"sourceMap": true,

examples/electron/package-lock.json

Lines changed: 1 addition & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/electron/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"package-mac-intel": "electron-packager . --no-prune --overwrite --platform=darwin --arch=x64 --out=release-builds --icon=icons/mac/application.icns",
1010
"package-mac-apple": "electron-packager . --no-prune --overwrite --platform=darwin --arch=arm64 --out=release-builds --icon=icons/mac/application.icns",
1111
"package-win": "electron-packager . --no-prune --overwrite --platform=win32 --arch=x64 --out=release-builds --icon=icons/win/application.ico",
12-
"package-linux": "electron-packager . --no-prune --overwrite --platform=linux --arch=x64 --out=release-builds --icon=icons/png/application.png",
13-
"postinstall": "node scripts/copy-nutrient-files.js"
12+
"package-linux": "electron-packager . --no-prune --overwrite --platform=linux --arch=x64 --out=release-builds --icon=icons/png/application.png"
1413
},
1514
"author": "Nutrient (https://www.nutrient.io)",
1615
"homepage": "https://www.nutrient.io/web",
@@ -26,8 +25,7 @@
2625
],
2726
"devDependencies": {
2827
"@electron/packager": "^18.3.6",
29-
"electron": "^33.2.0",
30-
"ncp": "^2.0.0"
28+
"electron": "^33.2.0"
3129
},
3230
"dependencies": {
3331
"@nutrient-sdk/viewer": "1.3.0"

examples/electron/scripts/copy-nutrient-files.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

examples/electron/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<header></header>
4848
<div id="root"></div>
4949

50-
<script src="./nutrient-viewer.js"></script>
50+
<script src="../node_modules/@nutrient-sdk/viewer/dist/nutrient-viewer.js"></script>
5151

5252
<script type="module">
5353
import { dragAndDrop } from "./lib/drag-and-drop.js";

examples/gatsbyjs/package-lock.json

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/gatsbyjs/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"start": "npm run develop",
1515
"serve": "gatsby serve",
1616
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing \"",
17-
"postinstall": "node scripts/copy-nutrient-files",
1817
"start:e2e": "npm run start"
1918
},
2019
"dependencies": {
@@ -25,7 +24,6 @@
2524
"react-dom": "^18.0.0"
2625
},
2726
"devDependencies": {
28-
"ncp": "^2.0.0",
2927
"prettier": "^3.3.2"
3028
},
3129
"overrides": {

examples/gatsbyjs/scripts/copy-nutrient-files.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/laravel/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,12 @@ cd nutrient-web-examples/examples/laravel
4141
npm install
4242
```
4343

44-
6. Run `npm run dev` to copy the Nutrient artifacts to your `public/assets/nutrient/` folder.
45-
46-
Make sure your `/public/assets/nutrient/` folder contains the file `nutrient-viewer.js` and a `nutrient-viewer-lib` directory with library assets.
47-
4844
## Running the Example
4945

5046
We are ready to launch the app! 🎉
5147

5248
```bash
49+
npm run dev
5350
php artisan serve
5451
```
5552

examples/laravel/package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)