Skip to content

Commit

Permalink
add babel setup for jest, update script of all packages, finish remov…
Browse files Browse the repository at this point in the history
…ing tsdx
  • Loading branch information
framini committed Apr 27, 2021
1 parent 2221e53 commit e7c9f65
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 70 deletions.
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
}
5 changes: 5 additions & 0 deletions packages/core/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
transform: {
'\\.[jt]sx?$': ['babel-jest', { configFile: './../../babel.config.js' }],
},
}
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"scripts": {
"start": "microbundle watch -f modern --tsconfig tsconfig.build.json",
"build": "microbundle --external none -f modern,es,cjs --define process.env.NODE_ENV=production --tsconfig ./tsconfig.build.json --target node",
"test": "tsdx test",
"lint": "tsdx lint",
"test": "NODE_ENV=test jest",
"prepare": "npm run build"
},
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions packages/node/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
transform: {
'\\.[jt]sx?$': ['babel-jest', { configFile: './../../babel.config.js' }],
},
}
3 changes: 1 addition & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"scripts": {
"start": "microbundle watch -f modern --tsconfig tsconfig.build.json",
"build": "microbundle --external none -f modern,es,cjs --define process.env.NODE_ENV=production --tsconfig ./tsconfig.build.json --target node",
"test": "tsdx test",
"lint": "tsdx lint",
"test": "NODE_ENV=test jest",
"prepare": "npm run build"
},
"dependencies": {
Expand Down
7 changes: 0 additions & 7 deletions packages/node/tsdx.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions packages/react-native/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
transform: {
'\\.[jt]sx?$': ['babel-jest', { configFile: './../../babel.config.js' }],
},
}
3 changes: 1 addition & 2 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"scripts": {
"start": "microbundle watch -f modern --tsconfig tsconfig.build.json",
"build": "microbundle --external none -f modern,es,cjs --define process.env.NODE_ENV=production --tsconfig ./tsconfig.build.json --target node",
"test": "tsdx test",
"lint": "tsdx lint",
"test": "NODE_ENV=test jest",
"prepare": "npm run build"
},
"dependencies": {
Expand Down
7 changes: 0 additions & 7 deletions packages/react-native/tsdx.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions packages/web/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
transform: {
'\\.[jt]sx?$': ['babel-jest', { configFile: './../../babel.config.js' }],
},
}
3 changes: 1 addition & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"scripts": {
"start": "microbundle watch --external none -f modern --tsconfig tsconfig.build.json",
"build": "microbundle --external none --define process.env.NODE_ENV=production --name VideoSDK --tsconfig ./tsconfig.build.json",
"test": "tsdx test",
"lint": "tsdx lint",
"test": "NODE_ENV=test jest",
"prepare": "npm run build",
"example": "(cd examples && npm run dev)"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/webrtc/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
transform: {
'\\.[jt]sx?$': ['babel-jest', { configFile: './../../babel.config.js' }],
},
setupFiles: ['./src/setupTests.ts'],
}
3 changes: 1 addition & 2 deletions packages/webrtc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"scripts": {
"start": "microbundle watch -f modern --tsconfig tsconfig.build.json",
"build": "microbundle --external none -f modern,es,cjs --define process.env.NODE_ENV=production --tsconfig ./tsconfig.build.json --target node",
"test": "tsdx test",
"lint": "tsdx lint",
"test": "NODE_ENV=test jest",
"prepare": "npm run build build"
},
"dependencies": {
Expand Down
7 changes: 0 additions & 7 deletions packages/webrtc/tsdx.config.js

This file was deleted.

39 changes: 0 additions & 39 deletions tsdx.base.js

This file was deleted.

0 comments on commit e7c9f65

Please sign in to comment.