mirror of
https://github.com/troisjs/trois.git
synced 2024-11-23 20:02:32 +08:00
Merge pull request #51 from troisjs/rollup-plugin-dts
Rollup plugin dts
This commit is contained in:
commit
7cb758f2d1
@ -3,6 +3,7 @@
|
|||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
"types": "tsc",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
"rollup": "rollup -c"
|
"rollup": "rollup -c"
|
||||||
},
|
},
|
||||||
@ -25,6 +26,7 @@
|
|||||||
"eslint-plugin-standard": "^4.0.1",
|
"eslint-plugin-standard": "^4.0.1",
|
||||||
"eslint-plugin-vue": "^7.9.0",
|
"eslint-plugin-vue": "^7.9.0",
|
||||||
"gsap": "^3.5.1",
|
"gsap": "^3.5.1",
|
||||||
|
"rollup-plugin-dts": "^3.0.1",
|
||||||
"rollup-plugin-esbuild": "^4.1.0",
|
"rollup-plugin-esbuild": "^4.1.0",
|
||||||
"stats.js": "0.17.0",
|
"stats.js": "0.17.0",
|
||||||
"three": "^0.127",
|
"three": "^0.127",
|
||||||
@ -37,7 +39,7 @@
|
|||||||
},
|
},
|
||||||
"main": "build/trois.js",
|
"main": "build/trois.js",
|
||||||
"module": "build/trois.module.js",
|
"module": "build/trois.module.js",
|
||||||
"typings": "build/trois.d.ts",
|
"types": "build/trois.d.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/troisjs/trois.git"
|
"url": "git+https://github.com/troisjs/trois.git"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// import vue from 'rollup-plugin-vue'
|
// import vue from 'rollup-plugin-vue'
|
||||||
import esbuild from 'rollup-plugin-esbuild'
|
import esbuild from 'rollup-plugin-esbuild'
|
||||||
import replace from '@rollup/plugin-replace'
|
import replace from '@rollup/plugin-replace'
|
||||||
|
import dts from "rollup-plugin-dts"
|
||||||
|
|
||||||
const input = 'src/export.ts'
|
const input = 'src/export.ts'
|
||||||
|
|
||||||
@ -65,4 +66,13 @@ export default [
|
|||||||
createConfig('es', { file: 'build/trois.module.js' }),
|
createConfig('es', { file: 'build/trois.module.js' }),
|
||||||
createConfig('es', { file: 'build/trois.module.min.js' }, [], true),
|
createConfig('es', { file: 'build/trois.module.min.js' }, [], true),
|
||||||
createConfig('cjs', { file: 'build/trois.js' }),
|
createConfig('cjs', { file: 'build/trois.js' }),
|
||||||
|
{
|
||||||
|
input: 'types/export.d.ts',
|
||||||
|
external,
|
||||||
|
plugins: [dts()],
|
||||||
|
output: {
|
||||||
|
format: 'es',
|
||||||
|
file: 'build/trois.d.ts',
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
"outDir": "types",
|
"outDir": "types",
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.vue"],
|
"include": ["src/**/*.ts", "src/**/*.vue"],
|
||||||
|
"exclude": ["src/components/**/*.ts"],
|
||||||
// "include": ["src/export.ts"],
|
// "include": ["src/export.ts"],
|
||||||
// "exclude": ["src/App.vue", "src/main.ts"],
|
// "exclude": ["src/App.vue", "src/main.ts"],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user