mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Backports the following commits to 7.x: - [plugin-generator] choose between .scss and .css file at startup (#34134)
This commit is contained in:
parent
cbf9034f6a
commit
d577e6fcf9
1 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
<% if (generateScss) { -%>
|
||||
import { resolve } from 'path';
|
||||
import { existsSync } from 'fs';
|
||||
|
||||
<% } -%>
|
||||
<% if (generateApi) { -%>
|
||||
import exampleRoute from './server/routes/example';
|
||||
|
||||
|
@ -20,7 +25,7 @@ export default function (kibana) {
|
|||
],
|
||||
<%_ } -%>
|
||||
<%_ if (generateScss) { -%>
|
||||
styleSheetPaths: require('path').resolve(__dirname, 'public/app.scss'),
|
||||
styleSheetPaths: [resolve(__dirname, 'public/app.scss'), resolve(__dirname, 'public/app.css')].find(p => existsSync(p)),
|
||||
<%_ } -%>
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue