-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6934842
commit 73cf47a
Showing
37 changed files
with
3,092 additions
and
234 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
recursive: true, | ||
reporter: 'dot', | ||
require: [require.resolve('./test/utils/setup')], | ||
}; |
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,81 @@ | ||
const path = require('path'); | ||
|
||
const errorCodesPath = path.resolve(__dirname, './docs/public/static/error-codes.json'); | ||
const missingError = process.env.MUI_EXTRACT_ERROR_CODES === 'true' ? 'write' : 'annotate'; | ||
|
||
let defaultPresets; | ||
|
||
// We release a ES version of Material-UI. | ||
// It's something that matches the latest official supported features of JavaScript. | ||
// Nothing more (stage-1, etc), nothing less (require, etc). | ||
if (process.env.BABEL_ENV === 'es') { | ||
defaultPresets = []; | ||
} else { | ||
defaultPresets = [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
bugfixes: true, | ||
modules: ['esm', 'production-umd'].includes(process.env.BABEL_ENV) ? false : 'commonjs', | ||
}, | ||
], | ||
]; | ||
} | ||
|
||
const defaultAlias = { | ||
'@material-ui/x-grid': './packages/grid/x-grid/src', | ||
'@material-ui/x-grid-modules': './packages/grid/x-grid-modules/src', | ||
'@material-ui/x-license': './packages/license/src', | ||
'@material-ui/data-grid': './packages/grid/data-grid/src', | ||
}; | ||
|
||
module.exports = { | ||
presets: defaultPresets.concat(['@babel/preset-react', '@babel/preset-typescript']), | ||
plugins: [ | ||
[ | ||
'babel-plugin-macros', | ||
{ | ||
muiError: { | ||
errorCodesPath, | ||
missingError, | ||
}, | ||
}, | ||
], | ||
'babel-plugin-optimize-clsx', | ||
['@babel/plugin-proposal-class-properties', { loose: true }], | ||
['@babel/plugin-proposal-object-rest-spread', { loose: true }], | ||
// any package needs to declare 7.4.4 as a runtime dependency. default is ^7.0.0 | ||
['@babel/plugin-transform-runtime', { version: '^7.4.4' }], | ||
// for IE 11 support | ||
'@babel/plugin-transform-object-assign', | ||
], | ||
ignore: [/@babel[\\|/]runtime/], // Fix a Windows issue. | ||
env: { | ||
coverage: { | ||
plugins: [ | ||
'babel-plugin-istanbul', | ||
[ | ||
'babel-plugin-module-resolver', | ||
{ | ||
root: ['./'], | ||
extensions: ['.js', '.ts', '.tsx'], | ||
alias: defaultAlias, | ||
}, | ||
], | ||
], | ||
}, | ||
test: { | ||
sourceMaps: 'both', | ||
plugins: [ | ||
[ | ||
'babel-plugin-module-resolver', | ||
{ | ||
root: ['./'], | ||
extensions: ['.js', '.ts', '.tsx'], | ||
alias: defaultAlias, | ||
}, | ||
], | ||
], | ||
}, | ||
}, | ||
}; |
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.