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

takin

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

takin - npm Package Compare versions

Comparing version 1.0.19 to 1.0.54

CHANGELOG.md

4

lib/generator.d.ts

@@ -150,2 +150,6 @@ import glob from 'fast-glob';

* 拷贝模版文件
*
* 基于 lodash.template 方法来解析模版,并增加了对
* 1. <%_ _%> 的支持,可用于移除前后的空格或 Tab 符号
* 2. 增加了对 -%> 的支持,可用于移除控制语句引入的换行符
* @param opts - 拷贝选项

@@ -152,0 +156,0 @@ */

25

lib/generator.js

@@ -231,8 +231,11 @@ "use strict";

async prompting() {
this.answers = await (0, prompts_1.default)(this.questions, {
onCancel() {
// 用户取消时自动退出
process.exit(0);
}
});
var _a;
if ((_a = this.questions) === null || _a === void 0 ? void 0 : _a.length) {
this.answers = await (0, prompts_1.default)(this.questions, {
onCancel() {
// 用户取消时自动退出
process.exit(0);
}
});
}
}

@@ -272,6 +275,14 @@ /**

* 拷贝模版文件
*
* 基于 lodash.template 方法来解析模版,并增加了对
* 1. <%_ _%> 的支持,可用于移除前后的空格或 Tab 符号
* 2. 增加了对 -%> 的支持,可用于移除控制语句引入的换行符
* @param opts - 拷贝选项
*/
async copyTemplate(opts) {
const tpl = await fs_extra_1.default.readFile(opts.path, 'utf-8');
let tpl = await fs_extra_1.default.readFile(opts.path, 'utf-8');
// 移除控制语句前 <%_ _%> 后的空格或 Tab 符号
tpl = tpl.replace(/[ \t]*<%_/gm, '<%').replace(/_%>[ \t]*/gm, '%>');
// 移除控制语句结尾引入的换行符
tpl = tpl.replace(/-%>(?:\r\n|\r|\n)?/gm, '%>');
const content = (0, lodash_1.template)(tpl)(opts.context);

@@ -278,0 +289,0 @@ await fs_extra_1.default.mkdirp((0, path_1.dirname)(opts.to));

{
"name": "takin",
"version": "1.0.19",
"version": "1.0.54",
"description": "Front end engineering base toolchain and scaffold",

@@ -70,3 +70,3 @@ "main": "lib/index.js",

},
"gitHead": "8c63c604fe1562b099e193929444ad30316e4da6"
"gitHead": "9b7f54480b0bc4cb2d63cac036abac6c9fed2394"
}

Sorry, the diff of this file is not supported yet

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