File tree 3 files changed +17
-21
lines changed
3 files changed +17
-21
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @helptheweb/helper" ,
3
- "version" : " 1.3.0" ,
4
- "description" : " Accessibility helper for websites by helptheweb.org" ,
3
+ "version" : " 1.3.1" ,
5
4
"type" : " module" ,
6
5
"main" : " ./dist/index.cjs.js" ,
7
6
"module" : " ./dist/index.esm.js" ,
8
7
"types" : " ./dist/index.d.ts" ,
9
- "browser" : " ./dist/index.min.js" ,
8
+ "unpkg" : " ./dist/index.min.js" ,
9
+ "jsdelivr" : " ./dist/index.min.js" ,
10
10
"exports" : {
11
11
"." : {
12
12
"types" : " ./dist/index.d.ts" ,
13
- "browser" : " ./dist/index.min.js" ,
14
13
"import" : " ./dist/index.esm.js" ,
15
14
"require" : " ./dist/index.cjs.js" ,
16
- "default" : " ./dist/index.js"
15
+ "default" : " ./dist/index.esm. js"
17
16
}
18
17
},
19
18
"files" : [
20
- " dist"
19
+ " dist" ,
20
+ " README.md"
21
21
],
22
+ "sideEffects" : false ,
22
23
"scripts" : {
23
24
"build" : " tsup" ,
24
25
"watch" : " tsup --watch" ,
Original file line number Diff line number Diff line change 1
- interface HelperOptions {
1
+ export interface HelperOptions {
2
2
defaultFontSize ?: number ;
3
3
buttonColor ?: string ;
4
4
}
@@ -285,9 +285,3 @@ export class Helper {
285
285
document . body . appendChild ( container ) ;
286
286
}
287
287
}
288
-
289
- if ( typeof window !== 'undefined' ) {
290
- ( window as any ) . Helper = { Helper } ;
291
- }
292
-
293
- export default Helper ;
Original file line number Diff line number Diff line change 1
- import { defineConfig } from 'tsup'
1
+ import { defineConfig } from 'tsup' ;
2
2
3
3
export default defineConfig ( {
4
4
entry : [ 'src/index.ts' ] ,
5
5
format : [ 'cjs' , 'esm' , 'iife' ] ,
6
6
dts : true ,
7
- minify : true ,
8
7
clean : true ,
8
+ minify : true ,
9
+ sourcemap : true ,
10
+ splitting : false ,
9
11
globalName : 'AccessibilityHelper' ,
10
- platform : 'browser' ,
11
- target : 'es2015' ,
12
- outDir : 'dist' ,
13
12
outExtension ( { format } ) {
14
13
return {
15
- js : format === 'iife' ? `.min.js` : `.${ format } .js`
14
+ js : `.${ format } .js`
16
15
}
17
- }
18
- } )
16
+ } ,
17
+ platform : 'browser' ,
18
+ target : [ 'es2015' ]
19
+ } ) ;
You can’t perform that action at this time.
0 commit comments