mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
Revert "📚 Minor fix to plugin docs"
This commit is contained in:
parent
052b39d833
commit
ea48c43a5f
1 changed files with 8 additions and 9 deletions
|
@ -60,10 +60,10 @@ npm install @penpot/plugin-types
|
||||||
|
|
||||||
If you're using typescript, don't forget to add <code class="language-js">@penpot/plugin-types</code> to your typings in your <code class="language-js">tsconfig.json</code>.
|
If you're using typescript, don't forget to add <code class="language-js">@penpot/plugin-types</code> to your typings in your <code class="language-js">tsconfig.json</code>.
|
||||||
|
|
||||||
```js
|
```json
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// ...
|
[...]
|
||||||
"typeRoots": ["./node_modules/@types", "./node_modules/@penpot"],
|
"typeRoots": ["./node_modules/@types", "./node_modules/@penpot"],
|
||||||
"types": ["plugin-types"],
|
"types": ["plugin-types"],
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ If you're using Vite you can simply edit the configuration file and add the buil
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// ...
|
[...]
|
||||||
build: {
|
build: {
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input: {
|
||||||
|
@ -168,12 +168,11 @@ export default defineConfig({
|
||||||
|
|
||||||
And then add the following scripts to your <code class="language-js">package.json</code>:
|
And then add the following scripts to your <code class="language-js">package.json</code>:
|
||||||
|
|
||||||
```js
|
```json
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite build --watch & vite preview",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"preview": "npm run build && vite preview",
|
[...]
|
||||||
// ...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -191,11 +190,11 @@ esbuild your-folder/plugin.ts --minify --outfile=your-folder/public/plugin.js
|
||||||
|
|
||||||
You can add it to your <code class="language-js">package.json</code> scripts so you don't need to manually re-run the build:
|
You can add it to your <code class="language-js">package.json</code> scripts so you don't need to manually re-run the build:
|
||||||
|
|
||||||
```js
|
```json
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npm run build:plugin && ng serve",
|
"start": "npm run build:plugin && ng serve",
|
||||||
"build:plugin": "esbuild your-folder/plugin.ts --minify --outfile=your-folder/public/plugin.js"
|
"build:plugin": "esbuild your-folder/plugin.ts --minify --outfile=your-folder/public/plugin.js"
|
||||||
// ...
|
[...]
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue