-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make compact config and script (#172)
* fix unit test code * adjust package script * adjust webpack config file * adjust babel config * adjust jest config file * adjust electron build config
- Loading branch information
Showing
24 changed files
with
906 additions
and
530 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { APP_PATH } = require('../path'); | ||
|
||
module.exports = { | ||
presets: ['@babel/env', '@babel/react'], | ||
plugins: [ | ||
'@babel/plugin-proposal-object-rest-spread', | ||
'@babel/plugin-proposal-class-properties', | ||
['module-resolver', { | ||
root: [APP_PATH], | ||
alias: { | ||
actions: `${APP_PATH}/actions`, | ||
assets: `${APP_PATH}/assets`, | ||
config: `${APP_PATH}/config`, | ||
constants: `${APP_PATH}/constants`, | ||
components: `${APP_PATH}/components`, | ||
main: `${APP_PATH}/main`, | ||
renderer: `${APP_PATH}/renderer`, | ||
process: `${APP_PATH}/process`, | ||
setting: `${APP_PATH}/renderer/pages/setting`, | ||
widget: `${APP_PATH}/renderer/pages/widget`, | ||
scss: `${APP_PATH}/renderer/scss`, | ||
utils: `${APP_PATH}/utils`, | ||
store: `${APP_PATH}/store`, | ||
}, | ||
extensions: ['.js', '.jsx'], | ||
}], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = require('babel-jest').createTransformer( | ||
require('./babel.config.js'), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const { CONFIG_PATH } = require('../path'); | ||
|
||
require('@babel/register')({ | ||
configFile: `${CONFIG_PATH}/babel/babel.config.js`, | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const { configure } = require('enzyme/build'); | ||
const Adapter = require('enzyme-adapter-react-16/build'); | ||
|
||
configure({ adapter: new Adapter() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
linters: { | ||
'**/*.{js,jsx}': 'eslint', | ||
}, | ||
ignore: ['**/*.config.js'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const path = require('path'); | ||
|
||
const ROOT_PATH = path.join(__dirname, '..'); | ||
|
||
module.exports = { | ||
ROOT_PATH, | ||
APP_PATH: path.join(ROOT_PATH, 'app'), | ||
BUILD_PATH: path.join(ROOT_PATH, 'build'), | ||
CONFIG_PATH: path.join(ROOT_PATH, 'config'), | ||
TEST_PATH: path.join(ROOT_PATH, 'test'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.