-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert: revert async config loading as Babel cannot support it proper…
…ly yet
- Loading branch information
Viktor Vincze
committed
Jun 8, 2020
1 parent
6d47e9c
commit cefd74d
Showing
34 changed files
with
242 additions
and
280 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import mhyConfig from '@/configs/mhy' | ||
import { loadConfig } from '@/utils' | ||
|
||
const gitignore = loadConfig('gitignore', async () => ['/dist', '/build', ...(await mhyConfig).defaultIgnoreList]) | ||
const gitignore = loadConfig('gitignore', ['/dist', '/build', ...mhyConfig.defaultIgnoreList]) | ||
|
||
export default gitignore |
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 |
---|---|---|
@@ -1,37 +1,34 @@ | ||
import path from 'path' | ||
|
||
import { loadConfig } from '@/utils' | ||
import _mhyConfig from '@/configs/mhy' | ||
import mhyConfig from '@/configs/mhy' | ||
|
||
const jestConfig = loadConfig('jest', async () => { | ||
const mhyConfig = await _mhyConfig | ||
return { | ||
setupFilesAfterEnv: [path.resolve(__dirname, './setup.js')], | ||
rootDir: process.cwd(), | ||
roots: [path.resolve(process.cwd(), mhyConfig.srcFolder)], | ||
watchPathIgnorePatterns: ['__.*__'], | ||
moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx'], | ||
modulePaths: [ | ||
path.resolve(process.cwd(), mhyConfig.srcFolder), | ||
path.resolve(process.cwd(), 'node_modules'), | ||
path.resolve(__dirname, '../../../node_modules') | ||
], | ||
transform: { | ||
'^.+\\.[jt]sx?$': require.resolve('./preprocess') | ||
}, | ||
transformIgnorePatterns: [], | ||
bail: true, | ||
testRegex: '\\.?(test|tests|spec|integration)\\.[jt]sx?$', | ||
collectCoverage: false, | ||
verbose: true, | ||
moduleNameMapper: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'identity-obj-proxy', | ||
'\\.(s?css|less)$': 'identity-obj-proxy', | ||
'\\.(svgx?)$': path.resolve(__dirname, 'mocks/react-null.js') | ||
}, | ||
collectCoverageFrom: ['**/*.js'], | ||
watchPlugins: process.env.MHY_ENV === 'ui' ? [path.resolve(__dirname, 'mhyWatchPlugin')] : [] | ||
} | ||
const jestConfig = loadConfig('jest', { | ||
setupFilesAfterEnv: [path.resolve(__dirname, './setup.js')], | ||
rootDir: process.cwd(), | ||
roots: [path.resolve(process.cwd(), mhyConfig.srcFolder)], | ||
watchPathIgnorePatterns: ['__.*__'], | ||
moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx'], | ||
modulePaths: [ | ||
path.resolve(process.cwd(), mhyConfig.srcFolder), | ||
path.resolve(process.cwd(), 'node_modules'), | ||
path.resolve(__dirname, '../../../node_modules') | ||
], | ||
transform: { | ||
'^.+\\.[jt]sx?$': require.resolve('./preprocess') | ||
}, | ||
transformIgnorePatterns: [], | ||
bail: true, | ||
testRegex: '\\.?(test|tests|spec|integration)\\.[jt]sx?$', | ||
collectCoverage: false, | ||
verbose: true, | ||
moduleNameMapper: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'identity-obj-proxy', | ||
'\\.(s?css|less)$': 'identity-obj-proxy', | ||
'\\.(svgx?)$': path.resolve(__dirname, 'mocks/react-null.js') | ||
}, | ||
collectCoverageFrom: ['**/*.js'], | ||
watchPlugins: process.env.MHY_ENV === 'ui' ? [path.resolve(__dirname, 'mhyWatchPlugin')] : [] | ||
}) | ||
|
||
export default jestConfig |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import mhyConfig from '@/configs/mhy' | ||
import { loadConfig } from '@/utils' | ||
|
||
const npmignore = loadConfig('npmignore', async () => ([ | ||
const npmignore = loadConfig('npmignore', [ | ||
'.circleci', | ||
'/docker', | ||
'/src', | ||
'/build', | ||
'/docs', | ||
'book.json', | ||
...(await mhyConfig).defaultIgnoreList | ||
])) | ||
...mhyConfig.defaultIgnoreList | ||
]) | ||
|
||
export default npmignore |
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
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
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
Oops, something went wrong.