vap-builder
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -0,3 +1,13 @@ | ||
/** | ||
* 页面定义 | ||
*/ | ||
export declare type Page = { | ||
/** | ||
* 页面路径 | ||
* 说明:为了统一兼容各种部署场景,VAP下的前端页面建议统一使用 斜杠 "/" 结尾,比如 `/admin/` 不要使用 `/admin` | ||
*/ | ||
path: string; | ||
/** | ||
* 真实页面路径,如果路径与文件名不一致时,传此参数停止偏差 | ||
*/ | ||
realPath?: string; | ||
@@ -7,12 +17,23 @@ /*** | ||
* | ||
* display 为展示风格页面模板模式(默认) | ||
* admin 为管理风格页面模板模式 | ||
* display 为展示风格页面模板模式 | ||
* admin 为管理风格页面模板模式(默认) | ||
* screen 为大屏风格页面模式 | ||
* custom 为自定义风格模式,比如仪表盘等自定义页面可用。 | ||
* | ||
* */ | ||
template: 'display' | 'admin' | 'screen' | 'custom'; | ||
template?: 'display' | 'admin' | 'screen' | 'custom'; | ||
/** | ||
* Display 模板中,自定义头 | ||
*/ | ||
customHeader?: string; | ||
/** | ||
* 页面标题 | ||
*/ | ||
title?: string; | ||
/** | ||
* 页面引入的 CSS | ||
*/ | ||
links?: string | string[]; | ||
/** | ||
* 页面引入的 JavaScript | ||
*/ | ||
scripts?: string | string[]; | ||
@@ -30,2 +51,12 @@ }; | ||
/** | ||
* 自定义参数 | ||
*/ | ||
global?: { | ||
[props: string]: any; | ||
}; | ||
/** | ||
* 页面 | ||
*/ | ||
pages: Page[]; | ||
/** | ||
* 站点配置项 | ||
@@ -37,10 +68,6 @@ */ | ||
* 为 true 时,会输出 <meta http-equiv="pragma" content="no-cache"> | ||
* 默认false | ||
*/ | ||
nocache?: boolean; | ||
/** | ||
* 使用时间戳,release 时间 | ||
* 为 true 时,会输出 ?xxxxxx | ||
*/ | ||
release?: boolean; | ||
/** | ||
* 使用CDN | ||
@@ -58,4 +85,21 @@ * 有值时,会使在js/css 前加上地址 | ||
displayTheme?: string; | ||
/** | ||
* 启动压缩 默认FALSE | ||
*/ | ||
compress?: boolean; | ||
/** | ||
* 开发模式 | ||
*/ | ||
devMode?: boolean; | ||
/** | ||
* Admin 页面使用固定 theme | ||
* 说明传入后,会锁定皮肤,修改皮肤无效,需要配合 tb_conf 表一起使用 | ||
*/ | ||
adminTheme?: string; | ||
/** | ||
* @deprecated | ||
* 无效,已废弃 | ||
*/ | ||
release?: boolean; | ||
}; | ||
pages: Page[]; | ||
}; |
110
index.js
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var template_loader_1 = require("./template-loader"); | ||
var _ = require("lodash"); | ||
exports.build = void 0; | ||
const template_loader_1 = require("./template-loader"); | ||
const _ = require("lodash"); | ||
function build(config) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var templateLoader, param_1; | ||
return __generator(this, function (_a) { | ||
templateLoader = new template_loader_1.default(config); | ||
try { | ||
param_1 = { | ||
nocache: (config.site && config.site.nocache) ? true : false, | ||
CDN: (config.site && config.site.cdn) || '', | ||
timestamp: (config.site && config.site.release) ? "?" + _.now() : '', | ||
customHeader: (config.site && config.site.customHeader) ? config.site.customHeader : '/js/header.js', | ||
displayTheme: (config.site && config.site.displayTheme) ? config.site.displayTheme : '', | ||
// 废弃,兼容,不具意义 | ||
VAP_RELEASE: '', | ||
GLOBAL_VERSION: '', | ||
VAP_VERSION: '', | ||
}; | ||
// console.log(param) | ||
config.pages.map(function (page) { | ||
var imports = {}; | ||
if (_.isString(page.links)) { | ||
imports.links = [page.links]; | ||
} | ||
else if (_.isEmpty(page.links)) { | ||
imports.links = []; | ||
} | ||
if (_.isString(page.scripts)) { | ||
imports.scripts = [page.scripts]; | ||
} | ||
else if (_.isEmpty(page.scripts)) { | ||
imports.scripts = []; | ||
} | ||
var data = _.assign({}, param_1, page, imports); | ||
templateLoader.write(data); | ||
}); | ||
} | ||
catch (e) { | ||
console.error(e); | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var templateLoader = new template_loader_1.default(config); | ||
try { | ||
const param = _.assign({}, { | ||
nocache: (config.site && config.site.nocache) ? true : false, | ||
CDN: (config.site && config.site.cdn) || '', | ||
timestamp: (config.site && config.site.release) ? `?${_.now()}` : '', | ||
devMode: config.site && config.site.devMode, | ||
customHeader: (config.site && config.site.customHeader) ? config.site.customHeader : '/js/header.js', | ||
displayTheme: (config.site && config.site.displayTheme) ? config.site.displayTheme : undefined, | ||
adminTheme: (config.site && config.site.adminTheme) ? config.site.adminTheme : undefined, | ||
// 废弃,兼容,不具意义 | ||
VAP_RELEASE: '', GLOBAL_VERSION: '', VAP_VERSION: '', | ||
}, config.global); | ||
config.pages.map(page => { | ||
var imports = {}; | ||
if (_.isString(page.links)) { | ||
imports.links = [page.links]; | ||
} | ||
else if (_.isEmpty(page.links)) { | ||
imports.links = []; | ||
} | ||
if (_.isString(page.scripts)) { | ||
imports.scripts = [page.scripts]; | ||
} | ||
else if (_.isEmpty(page.scripts)) { | ||
imports.scripts = []; | ||
} | ||
var data = _.assign({}, param, page, imports); | ||
templateLoader.write(data); | ||
}); | ||
} | ||
catch (e) { | ||
console.error(e); | ||
} | ||
}); | ||
} | ||
exports.build = build; |
{ | ||
"name": "vap-builder", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Fast VAP framework buider", | ||
@@ -15,9 +15,3 @@ "main": "index.js", | ||
"lodash": "^4.17.15" | ||
}, | ||
"devDependencies": { | ||
"@types/lodash": "^4.14.149", | ||
"@types/node": "^12.12.14", | ||
"ts-loader": "^6.2.1", | ||
"typescript": "3.5.3" | ||
} | ||
} |
@@ -5,2 +5,3 @@ import { Config, Page } from '../define'; | ||
private outputDir; | ||
private useCompress; | ||
constructor(config: Config); | ||
@@ -16,2 +17,3 @@ /** | ||
writeContext(path: any, context: any): void; | ||
compress(html: any): any; | ||
writeAdmin(data: Page): void; | ||
@@ -18,0 +20,0 @@ writeDisplay(data: Page): void; |
"use strict"; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var ejs = require("ejs"); | ||
var fsPath = require("fs-path"); | ||
var _ = require("lodash"); | ||
var path = require("path"); | ||
var fs = require("fs"); | ||
var Templete_1 = require("./Templete"); | ||
var default_1 = /** @class */ (function () { | ||
function default_1(config) { | ||
const ejs = require("ejs"); | ||
const fsPath = require("fs-path"); | ||
const _ = require("lodash"); | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
const Templete_1 = require("./Templete"); | ||
class default_1 { | ||
constructor(config) { | ||
this.templateDir = ''; | ||
this.outputDir = ''; | ||
this.useCompress = false; | ||
var templateDir = config.input || './html'; | ||
@@ -29,3 +20,6 @@ var outputDir = config.output || '../dist'; | ||
this.outputDir = path.resolve(outputDir); | ||
console.log("\u5F00\u59CB\u751F\u6210html\u6587\u4EF6 \u8F93\u51FA\u6587\u4EF6\u5939" + this.outputDir + " \u6A21\u677F\u6587\u4EF6\u5939\uFF1A" + this.templateDir + " "); | ||
if (config.site.compress) { | ||
this.useCompress = true; | ||
} | ||
console.log(`开始生成html文件 输出文件夹${this.outputDir} 模板文件夹:${this.templateDir} `); | ||
} | ||
@@ -35,63 +29,58 @@ /** | ||
*/ | ||
default_1.prototype.readPath = function (root) { | ||
var e_1, _a; | ||
try { | ||
for (var _b = __values(['.ejs', '.html', '.htm']), _c = _b.next(); !_c.done; _c = _b.next()) { | ||
var sufx = _c.value; | ||
var url = path.resolve(this.templateDir, "." + (root.endsWith('/') ? root.substr(0, root.length - 1) : root) + sufx); | ||
if (fs.existsSync(url)) { | ||
return url; | ||
} | ||
readPath(root) { | ||
for (let sufx of ['.ejs', '.html', '.htm']) { | ||
let url = path.resolve(this.templateDir, `.${root.endsWith('/') ? root.substr(0, root.length - 1) : root}${sufx}`); | ||
if (fs.existsSync(url)) { | ||
return url; | ||
} | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
finally { | ||
try { | ||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
} | ||
return ''; | ||
}; | ||
} | ||
/** | ||
* 写入路径 (dist目录) | ||
*/ | ||
default_1.prototype.writePath = function (data) { | ||
return path.resolve(this.outputDir, "." + data.path + (data.path.endsWith('/') ? '' : '/') + "index.html"); | ||
}; | ||
default_1.prototype.writeContext = function (path, context) { | ||
console.log("\u5F00\u59CB\u5199\u5165 : " + path); | ||
fsPath.writeFile(path, context, function (err) { | ||
writePath(data) { | ||
return path.resolve(this.outputDir, `.${data.path}${data.path.endsWith('/') ? '' : '/'}index.html`); | ||
} | ||
writeContext(path, context) { | ||
console.log(`开始写入 : ${path}`); | ||
fsPath.writeFile(path, context, err => { | ||
if (err) { | ||
console.error(err); | ||
throw new Error("\u5199\u5165 " + path + " \u5931\u8D25"); | ||
throw new Error(`写入 ${path} 失败`); | ||
} | ||
}); | ||
}; | ||
default_1.prototype.writeAdmin = function (data) { | ||
var writePath = this.writePath(data); | ||
} | ||
compress(html) { | ||
if (this.useCompress) { | ||
return html.replace(/\n[\s]*/g, ''); | ||
} | ||
return html; | ||
} | ||
writeAdmin(data) { | ||
let writePath = this.writePath(data); | ||
var readPath = this.readPath('/admin'); | ||
var template = readPath ? fs.readFileSync(readPath).toString() : Templete_1.ADMIN; | ||
let template = readPath ? fs.readFileSync(readPath).toString() : Templete_1.ADMIN; | ||
var str = ejs.render(template, data); | ||
this.writeContext(writePath, str); | ||
}; | ||
default_1.prototype.writeDisplay = function (data) { | ||
var writePath = this.writePath(data); | ||
this.writeContext(writePath, this.compress(str)); | ||
} | ||
writeDisplay(data) { | ||
let writePath = this.writePath(data); | ||
var readPath = this.readPath('/display'); | ||
var template = readPath ? fs.readFileSync(readPath).toString() : Templete_1.DISPLAY; | ||
let template = readPath ? fs.readFileSync(readPath).toString() : Templete_1.DISPLAY; | ||
var str = ejs.render(template, data); | ||
this.writeContext(writePath, str); | ||
}; | ||
default_1.prototype.writeScreen = function (data) { | ||
var writePath = this.writePath(data); | ||
this.writeContext(writePath, this.compress(str)); | ||
} | ||
writeScreen(data) { | ||
let writePath = this.writePath(data); | ||
var readPath = this.readPath('/screen'); | ||
var template = readPath ? fs.readFileSync(readPath).toString() : Templete_1.SCREEN; | ||
let template = readPath ? fs.readFileSync(readPath).toString() : Templete_1.SCREEN; | ||
var str = ejs.render(template, data); | ||
this.writeContext(writePath, str); | ||
}; | ||
default_1.prototype.writeCustom = function (data) { | ||
var readPath = this.readPath(data.realPath ? data.realPath : data.path); | ||
this.writeContext(writePath, this.compress(str)); | ||
} | ||
writeCustom(data) { | ||
let readPath = this.readPath(data.realPath ? data.realPath : data.path); | ||
if (readPath) { | ||
var writePath = this.writePath(data); | ||
var template = fs.readFileSync(readPath).toString(); | ||
let writePath = this.writePath(data); | ||
let template = fs.readFileSync(readPath).toString(); | ||
var str = ejs.render(template, data); | ||
@@ -101,5 +90,5 @@ this.writeContext(writePath, str); | ||
} | ||
console.error(data.path + " \u5BF9\u5E94\u7684\u6A21\u677F\u4E0D\u5B58\u5728\uFF01"); | ||
}; | ||
default_1.prototype.write = function (data) { | ||
console.error(`${data.path} 对应的模板不存在!`); | ||
} | ||
write(data) { | ||
switch (data.template) { | ||
@@ -119,5 +108,4 @@ case 'admin': | ||
} | ||
}; | ||
return default_1; | ||
}()); | ||
} | ||
} | ||
exports.default = default_1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DISPLAY = "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\">\n <% if(nocache){ %>\n <meta http-equiv=\"pragma\" content=\"no-cache\">\n <% } %>\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title></title>\n <link href=\"<%=CDN %>/css/iconfont.css<%=timestamp %>\" rel=\"stylesheet\" />\n</head>\n<body>\n<div id=\"__header\"></div><div id=\"root\"></div>\n<script src=\"<%=CDN %>/js/references.display.js<%=timestamp %>\"></script>\n<% if(displayTheme){ %>\n <link href=\"<%=CDN %>/css/theme-display-<%=displayTheme %>.css<%=timestamp %>\" rel=\"stylesheet\" />\n<% } else{ %>\n <script src=\"<%=CDN %>/js/theme-display.js<%=timestamp %>\"></script>\n<% } %>\n<% links.forEach(function(link){%><link href=\"<%=CDN %><%=link %><%=timestamp %>\" rel=\"stylesheet\" /><%})%>\n<script src=\"<%=CDN %><%=customHeader %><%=timestamp %>\"></script>\n<% scripts.forEach(function(script){%><script src=\"<%=CDN %><%=script %><%=timestamp %>\"></script><%})%>\n</body>\n</html>"; | ||
exports.ADMIN = "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\">\n<meta http-equiv=\"X-UA-Compatible\" wecontent=\"ie=edge\">\n<% if(nocache){ %>\n<meta http-equiv=\"pragma\" content=\"no-cache\">\n<% } %>\n<title></title>\n<link href=\"<%=CDN %>/css/iconfont.css<%=timestamp %>\" rel=\"stylesheet\">\n<script src=\"<%=CDN %>/js/references.admin.js<%=timestamp %>\"></script>\n</head>\n<body>\n<div id=\"root\"></div>\n<script src=\"<%=CDN %>/js/theme-admin.js<%=timestamp %>\"></script>\n<script src=\"<%=CDN %>/js/admin.js<%=timestamp %>\"></script>\n</body>\n</html>"; | ||
exports.SCREEN = "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\">\n <% if(nocache){ %>\n <meta http-equiv=\"pragma\" content=\"no-cache\">\n <% } %>\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title><%=(locals.title?title:'')%></title>\n <link href=\"<%=CDN %>/css/theme-screen-default.css<%=timestamp %>\" rel=\"stylesheet\">\n <link href=\"<%=CDN %>/css/iconfont.css<%=timestamp %>\" rel=\"stylesheet\">\n <% links.forEach(function(link){%><link href=\"<%=CDN %><%=link %><%=timestamp %>\" rel=\"stylesheet\" /><%})%>\n <script src=\"<%=CDN %>/js/references.screen.js<%=timestamp %>\"></script>\n</head>\n<body>\n<div id=\"root\"></div> \n</body>\n<% scripts.forEach(function(script){%><script src=\"<%=CDN %><%=script %><%=timestamp %>\"></script><%})%>\n</html>"; | ||
exports.SCREEN = exports.ADMIN = exports.DISPLAY = void 0; | ||
exports.DISPLAY = `<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<% if(nocache){ %> | ||
<meta http-equiv="pragma" content="no-cache"> | ||
<% } %> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title></title> | ||
<link href="<%=CDN %>/css/iconfont.css<%=timestamp %>" rel="stylesheet" /> | ||
<% if(typeof locals.displayTheme == 'string' && locals.displayTheme.length>0 ){ %> | ||
<link href="<%=CDN %>/css/theme-display-<%=locals.adminTheme %>.css<%=timestamp %>" rel="stylesheet"> | ||
<% } %> | ||
</head> | ||
<body> | ||
<div id="__header"></div><div id="root"></div> | ||
<% if(devMode){ %> | ||
<script src="<%=CDN %>/js/react.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/react-dom.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/lodash.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/moment.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/moment-zh-cn.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/antd.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/nprogress.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/d3.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/jquery.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/echarts.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/echarts-wordcloud.min.js<%=timestamp %>"></script> | ||
<% } else{ %> | ||
<script src="<%=CDN %>/js/references.display.js<%=timestamp %>"></script> | ||
<% } %> | ||
<% if(typeof locals.adminTheme == 'undefined' || locals.adminTheme.length==0){ %> | ||
<link href="<%=CDN %>/css/theme-display-<%=displayTheme %>.css<%=timestamp %>" rel="stylesheet" /> | ||
<% } else{ %> | ||
<script src="<%=CDN %>/js/theme-display.js<%=timestamp %>"></script> | ||
<% } %> | ||
<% links.forEach(function(link){%><link href="<%=CDN %><%=link %><%=timestamp %>" rel="stylesheet" /><%})%> | ||
<script src="<%=CDN %><%=customHeader %><%=timestamp %>"></script> | ||
<% scripts.forEach(function(script){%><script src="<%=CDN %><%=script %><%=timestamp %>"></script><%})%> | ||
</body> | ||
</html> | ||
`; | ||
exports.ADMIN = `<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" wecontent="ie=edge"> | ||
<% if(nocache){ %> | ||
<meta http-equiv="pragma" content="no-cache"> | ||
<% } %> | ||
<title></title> | ||
<link href="<%=CDN %>/css/iconfont.css<%=timestamp %>" rel="stylesheet"> | ||
<% if(typeof locals.adminTheme == 'string' && locals.adminTheme.length>0 ){ %> | ||
<link href="<%=CDN %>/css/theme-admin-<%=locals.adminTheme %>.css<%=timestamp %>" rel="stylesheet"> | ||
<% } %> | ||
<% if(locals.devMode){ %> | ||
<script src="<%=CDN %>/js/react.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/react-dom.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/redux.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/react-redux.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/dva.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/lodash.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/moment.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/moment-zh-cn.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/antd.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/nprogress.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/jquery.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/d3.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/echarts.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/echarts-wordcloud.min.js<%=timestamp %>"></script> | ||
<% } else{ %> | ||
<script src="<%=CDN %>/js/references.admin.js<%=timestamp %>"></script> | ||
<% } %> | ||
<% links.forEach(function(link){%><link href="<%=CDN %><%=link %><%=timestamp %>" rel="stylesheet" /><%})%> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<% if(typeof locals.adminTheme == 'undefined' || locals.adminTheme.length==0){ %> | ||
<script src="<%=CDN %>/js/theme-admin.js<%=timestamp %>"></script> | ||
<% } %> | ||
<script src="<%=CDN %>/js/admin.js<%=timestamp %>"></script> | ||
<% scripts.forEach(function(script){%><script src="<%=CDN %><%=script %><%=timestamp %>"></script><%})%> | ||
</body> | ||
</html>`; | ||
exports.SCREEN = `<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<% if(nocache){ %> | ||
<meta http-equiv="pragma" content="no-cache"> | ||
<% } %> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title><%=(locals.title?title:'')%></title> | ||
<link href="<%=CDN %>/css/theme-screen-default.css<%=timestamp %>" rel="stylesheet"> | ||
<link href="<%=CDN %>/css/iconfont.css<%=timestamp %>" rel="stylesheet"> | ||
<% links.forEach(function(link){%><link href="<%=CDN %><%=link %><%=timestamp %>" rel="stylesheet" /><%})%> | ||
<% if(locals.devMode){ %> | ||
<script src="<%=CDN %>/js/react.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/react-dom.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/lodash.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/moment.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/moment-zh-cn.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/antd.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/nprogress.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/d3.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/jquery.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/three.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/echarts.min.js<%=timestamp %>"></script> | ||
<script src="<%=CDN %>/js/echarts-wordcloud.min.js<%=timestamp %>"></script> | ||
<% } else{ %> | ||
<script src="<%=CDN %>/js/references.screen.js<%=timestamp %>"></script> | ||
<% } %> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
<% scripts.forEach(function(script){%><script src="<%=CDN %><%=script %><%=timestamp %>"></script><%})%> | ||
</html> | ||
`; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16835
0
415
1