mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* improve test stability * add a tsconfig file and useDefaultBehaviors Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
1ba3dbcfcf
commit
ba3a97dc37
4 changed files with 26 additions and 1 deletions
|
@ -120,6 +120,11 @@ module.exports = function ({ name, targetPath }) {
|
|||
return !customPath;
|
||||
},
|
||||
},
|
||||
generateTsconfig: {
|
||||
type: 'confirm',
|
||||
message: 'Would you like to use a custom tsconfig file?',
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
'public/**/index.scss': 'generateScss',
|
||||
|
@ -128,6 +133,7 @@ module.exports = function ({ name, targetPath }) {
|
|||
'translations/**/*': 'generateTranslations',
|
||||
'i18nrc.json': 'generateTranslations',
|
||||
'eslintrc.js': 'generateEslint',
|
||||
'tsconfig.json': 'generateTsconfig',
|
||||
},
|
||||
move: {
|
||||
'eslintrc.js': '.eslintrc.js',
|
||||
|
|
|
@ -80,12 +80,14 @@ describe('plugin generator sao integration', () => {
|
|||
generateApi: true,
|
||||
generateScss: false,
|
||||
generateEslint: false,
|
||||
generateTsconfig: false,
|
||||
});
|
||||
|
||||
// check output files
|
||||
expect(res.fileList).toContain('public/plugin.ts');
|
||||
expect(res.fileList).not.toContain('public/index.scss');
|
||||
expect(res.fileList).not.toContain('.eslintrc.js');
|
||||
expect(res.fileList).not.toContain('tsconfig.json');
|
||||
});
|
||||
|
||||
it('plugin package has correct title', async () => {
|
||||
|
@ -136,6 +138,7 @@ describe('plugin generator sao integration', () => {
|
|||
|
||||
it('includes dotfiles', async () => {
|
||||
const res = await sao.mockPrompt(template);
|
||||
expect(res.files['tsconfig.json']).toBeTruthy();
|
||||
expect(res.files['.eslintrc.js']).toBeTruthy();
|
||||
expect(res.files['.i18nrc.json']).toBeTruthy();
|
||||
});
|
||||
|
|
|
@ -73,7 +73,7 @@ export const <%= upperCamelCaseName %>App = ({ basename, notifications, http, na
|
|||
<Router basename={basename}>
|
||||
<I18nProvider>
|
||||
<>
|
||||
<navigation.ui.TopNavMenu appName={ PLUGIN_ID } showSearchBar={true} />
|
||||
<navigation.ui.TopNavMenu appName={ PLUGIN_ID } showSearchBar={true} useDefaultBehaviors={true}/>
|
||||
<EuiPage restrictWidth="1000px">
|
||||
<EuiPageBody>
|
||||
<EuiPageHeader>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./target",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": [
|
||||
"index.ts",
|
||||
"common/**/*.ts",
|
||||
"public/**/*.ts",
|
||||
"public/**/*.tsx",
|
||||
"server/**/*.ts",
|
||||
"../../typings/**/*",
|
||||
],
|
||||
"exclude": []
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue