mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
修复 gh-pages 编译问题 (#1176)
This commit is contained in:
parent
20651471a5
commit
4dded17304
14
fis-conf.js
14
fis-conf.js
@ -710,7 +710,6 @@ if (fis.project.currentMedia() === 'publish') {
|
|||||||
'!/examples/style.scss',
|
'!/examples/style.scss',
|
||||||
'!monaco-editor/**',
|
'!monaco-editor/**',
|
||||||
'!/scss/utilities.scss',
|
'!/scss/utilities.scss',
|
||||||
'/scss/utilities.scss',
|
|
||||||
'/examples/style.scss' // 让它在最下面
|
'/examples/style.scss' // 让它在最下面
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
@ -724,12 +723,14 @@ if (fis.project.currentMedia() === 'publish') {
|
|||||||
const indexHtml = ret.src['/examples/index.html'];
|
const indexHtml = ret.src['/examples/index.html'];
|
||||||
const appJs = ret.src['/examples/components/App.tsx'];
|
const appJs = ret.src['/examples/components/App.tsx'];
|
||||||
const DocJs = ret.src['/examples/components/Doc.tsx'];
|
const DocJs = ret.src['/examples/components/Doc.tsx'];
|
||||||
|
const DocCSS = ret.src['/examples/components/CssDocs.tsx'];
|
||||||
const ExampleJs = ret.src['/examples/components/Example.tsx'];
|
const ExampleJs = ret.src['/examples/components/Example.tsx'];
|
||||||
|
|
||||||
const pages = [];
|
const pages = [];
|
||||||
const source = [
|
const source = [
|
||||||
appJs.getContent(),
|
appJs.getContent(),
|
||||||
DocJs.getContent(),
|
DocJs.getContent(),
|
||||||
|
DocCSS.getContent(),
|
||||||
ExampleJs.getContent()
|
ExampleJs.getContent()
|
||||||
].join('\n');
|
].join('\n');
|
||||||
source.replace(
|
source.replace(
|
||||||
@ -758,7 +759,16 @@ if (fis.project.currentMedia() === 'publish') {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ghPages.match('*.{css,less,scss}', {
|
ghPages.match('*.{css,less,scss}', {
|
||||||
optimizer: fis.plugin('clean-css'),
|
optimizer: [
|
||||||
|
function(contents) {
|
||||||
|
if (typeof contents === 'string') {
|
||||||
|
contents = contents.replace(/\/\*\!markdown[\s\S]*?\*\//g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
return contents;
|
||||||
|
},
|
||||||
|
fis.plugin('clean-css')
|
||||||
|
],
|
||||||
useHash: true
|
useHash: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user