Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vap-builder

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vap-builder - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "vap-builder",
"version": "0.0.6",
"version": "0.0.7",
"description": "Fast VAP framework buider",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,2 +6,4 @@ import { Config, Page } from '../define';

constructor(config: Config);
getPath(data: any): string;
writeContext(path: any, context: any): void;
writeAdmin(data: Page): void;

@@ -8,0 +10,0 @@ writeDisplay(data: Page): void;

@@ -31,26 +31,32 @@ "use strict";

}
default_1.prototype.writeAdmin = function (data) {
default_1.prototype.getPath = function (data) {
var writePath = this.outputDir + data.path + '/index.html';
console.log("\u5F00\u59CB\u5199\u5165 " + writePath);
return writePath;
};
default_1.prototype.writeContext = function (path, context) {
fsPath.writeFile(path, context, function (err) {
if (err) {
console.error(err);
throw new Error("\u5199\u5165 " + path + " \u5931\u8D25");
}
});
};
default_1.prototype.writeAdmin = function (data) {
var writePath = this.getPath(data);
var str = ejs.render(Templete_1.ADMIN, data);
fsPath.writeFile(writePath, str);
// fs.writeFileSync(writePath, str);
this.writeContext(writePath, str);
};
default_1.prototype.writeDisplay = function (data) {
var writePath = this.outputDir + data.path + '/index.html';
console.log("\u5F00\u59CB\u5199\u5165 " + writePath);
var writePath = this.getPath(data);
var str = ejs.render(Templete_1.DISPLAY, data);
fsPath.writeFile(writePath, str);
// fs.writeFileSync(writePath, str);
this.writeContext(writePath, str);
};
default_1.prototype.writeScreen = function (data) {
var writePath = this.outputDir + data.path + '/index.html';
console.log("\u5F00\u59CB\u5199\u5165 " + writePath);
var writePath = this.getPath(data);
var str = ejs.render(Templete_1.SCREEN, data);
fsPath.writeFile(writePath, str);
// fs.writeFileSync(writePath, str);
this.writeContext(writePath, str);
};
default_1.prototype.writePortal = function (data) {
var writePath = this.outputDir + data.path + '/index.html';
console.log("\u5F00\u59CB\u5199\u5165 " + writePath);
var writePath = this.getPath(data);
// @ts-ignore

@@ -60,8 +66,7 @@ var tempPath = this.templateDir + '/' + data.page + '.ejs';

var str = ejs.render(template, data);
fsPath.writeFile(writePath, str);
this.writeContext(writePath, str);
// fs.writeFileSync(writePath, str);
};
default_1.prototype.writeLogin = function (data) {
var writePath = this.outputDir + data.path + '/index.html';
console.log("\u5F00\u59CB\u5199\u5165 " + writePath);
var writePath = this.getPath(data);
// @ts-ignore

@@ -76,4 +81,3 @@ var tempPath = this.templateDir + '/' + data.page + '.ejs';

var e_1, _a;
var writePath = this.outputDir + data.path + '/index.html';
console.log("\u5F00\u59CB\u5199\u5165 " + writePath);
var writePath = this.getPath(data);
var readPath = '';

@@ -103,3 +107,3 @@ try {

var str = ejs.render(template, data);
fsPath.writeFile(writePath, str);
this.writeContext(writePath, str);
};

@@ -106,0 +110,0 @@ default_1.prototype.write = function (data) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc