forked from Gitlink/forgeplus-react
添加css
This commit is contained in:
parent
ff8b5896f9
commit
5fc39aa117
|
|
@ -6,6 +6,8 @@ import axios from "axios";
|
|||
const { JSDOM } = jsdom;
|
||||
|
||||
const html = fs.readFileSync(path.join(path.resolve('./build'),'index.html'),'utf-8');
|
||||
// 压缩的项目详情页需要的css
|
||||
const css = fs.readFileSync(path.join(path.resolve('./build/css'),'detail.css'),'utf-8');
|
||||
const { window } = new JSDOM(html);
|
||||
|
||||
const $ = require( "jquery" )( window )
|
||||
|
|
@ -14,6 +16,8 @@ global.window = window;
|
|||
global.document = window.document;
|
||||
global.navigator = window.navigator;
|
||||
global.localStorage = {}
|
||||
// 全局缓存css
|
||||
global.detailCss = css
|
||||
|
||||
export const getDomObj = () => {
|
||||
return new JSDOM(html)
|
||||
|
|
|
|||
Loading…
Reference in New Issue