File tree Expand file tree Collapse file tree 5 files changed +452
-24
lines changed Expand file tree Collapse file tree 5 files changed +452
-24
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " @ftrack/api" ,
3
3
"description" : " JavaScript API for ftrack." ,
4
4
"scripts" : {
5
- "lint" : " eslint . && prettier -c ." ,
5
+ "lint" : " tsc && eslint . && prettier -c ." ,
6
6
"test" : " vitest --run test && yarn lint" ,
7
7
"build" : " vite build" ,
8
8
"prepack" : " yarn build" ,
32
32
"prettier" : " ^2.8.3" ,
33
33
"typescript" : " ^4.9.5" ,
34
34
"vite" : " ^4.1.1" ,
35
+ "vite-plugin-dts" : " ^1.7.2" ,
35
36
"vitest" : " ^0.28.4"
36
37
},
37
38
"repository" : {
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "target" : " ESNext" ,
4
+ "useDefineForClassFields" : true ,
5
+ "module" : " ESNext" ,
6
+ "lib" : [" ESNext" , " DOM" ],
7
+ "moduleResolution" : " Node" ,
8
+ "strict" : true ,
9
+ "resolveJsonModule" : true ,
10
+ "isolatedModules" : true ,
11
+ "esModuleInterop" : true ,
12
+ "noEmit" : true ,
13
+ "noUnusedLocals" : true ,
14
+ "noUnusedParameters" : true ,
15
+ "noImplicitReturns" : true ,
16
+ "skipLibCheck" : true ,
17
+ "allowJs" : true
18
+ },
19
+ "include" : [" source" ],
20
+ "exclude" : [" source/socket.io-websocket-only.cjs" ]
21
+ }
Original file line number Diff line number Diff line change 1
- const path = require ( "path" ) ;
2
- const { defineConfig } = require ( "vite" ) ;
3
- const commonjs = require ( "@rollup/plugin-commonjs" ) ;
1
+ import { defineConfig , UserConfig } from "vite" ;
2
+ import { InlineConfig } from "vitest" ;
3
+ import path from "path" ;
4
+ import dts from "vite-plugin-dts" ;
5
+ import commonjs from "@rollup/plugin-commonjs" ;
4
6
5
- module . exports = defineConfig ( {
7
+ interface VitestConfigExport extends UserConfig {
8
+ test : InlineConfig ;
9
+ }
10
+
11
+ export default defineConfig ( {
12
+ test : {
13
+ environment : "jsdom" ,
14
+ globals : true ,
15
+ setupFiles : [ "./vitest.setup.js" ] ,
16
+ deps : {
17
+ fallbackCJS : true ,
18
+ } ,
19
+ } ,
6
20
build : {
7
21
minify : false ,
8
22
sourcemap : true ,
9
23
lib : {
10
- entry : path . resolve ( __dirname , "source/index.js " ) ,
24
+ entry : path . resolve ( __dirname , "source/index.ts " ) ,
11
25
name : "ftrack-javascript-api" ,
12
26
fileName : ( format ) => `ftrack-javascript-api.${ format } .js` ,
13
27
} ,
@@ -26,12 +40,5 @@ module.exports = defineConfig({
26
40
plugins : [ commonjs ( { include : "./source/socket.io-websocket-only.cjs" } ) ] ,
27
41
} ,
28
42
} ,
29
- test : {
30
- environment : "jsdom" ,
31
- globals : true ,
32
- setupFiles : [ "./vitest.setup.js" ] ,
33
- deps : {
34
- fallbackCJS : true ,
35
- } ,
36
- } ,
37
- } ) ;
43
+ plugins : [ dts ( ) ] ,
44
+ } as VitestConfigExport ) ;
You can’t perform that action at this time.
0 commit comments