File tree 3 files changed +24
-2
lines changed 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "presets": [
3
+ [
4
+ "@babel/preset-env",
5
+ {
6
+ "modules": false,
7
+ "targets": {
8
+ "esmodules": true
9
+ }
10
+ }
11
+ ],
12
+ "@babel/preset-react"
13
+ ],
14
+ "plugins": [
15
+ "@babel/plugin-proposal-object-rest-spread",
16
+ "@babel/plugin-proposal-class-properties"
17
+ ]
18
+ }
Original file line number Diff line number Diff line change 1
1
node_modules
2
2
coverage
3
3
lib
4
+ esm
4
5
npm-debug.log. *
5
6
.DS_Store
Original file line number Diff line number Diff line change 3
3
"version" : " 0.7.1" ,
4
4
"description" : " Intro.js React Wrapper" ,
5
5
"main" : " lib/index.js" ,
6
+ "module" : " esm/index.js" ,
6
7
"types" : " index.d.ts" ,
7
8
"scripts" : {
8
- "prebuild" : " rimraf lib/*" ,
9
+ "prebuild" : " rimraf lib/* && rimraf esm/* " ,
9
10
"build" : " babel --ignore '**/*.test.js' --out-dir lib src" ,
11
+ "build:esm" : " babel --ignore '**/*.test.js' --out-dir esm --config-file ./.babelrc-esm --no-babelrc src" ,
10
12
"build:watch" : " npm run build -- --watch" ,
11
13
"lint" : " eslint src" ,
12
14
"test" : " jest" ,
13
15
"test:watch" : " jest --watch" ,
14
16
"test:coverage" : " jest --coverage && open coverage/index.html" ,
15
17
"test:ci" : " jest --coverage" ,
16
18
"precommit" : " lint-staged" ,
17
- "prepublish" : " npm run build"
19
+ "prepublish" : " npm run build && npm run build:esm "
18
20
},
19
21
"devDependencies" : {
20
22
"@babel/cli" : " 7.8.4" ,
80
82
},
81
83
"files" : [
82
84
" lib" ,
85
+ " esm" ,
83
86
" src" ,
84
87
" index.d.ts"
85
88
]
You can’t perform that action at this time.
0 commit comments