xhs-mp-sketch-loader 1.9.12-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/collector.d.ts +19 -0
- package/dist/consts.d.ts +19 -0
- package/dist/consts.js +1 -0
- package/dist/generator.d.ts +19 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/screenshot/index.d.ts +6 -0
- package/dist/screenshot/style.d.ts +1 -0
- package/dist/screenshot.js +1 -0
- package/dist/utils.d.ts +2 -0
- package/dist/validator.d.ts +8 -0
- package/package.json +81 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# 构建工具
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HELPERS } from "./consts";
|
|
2
|
+
type Expr = {
|
|
3
|
+
value: string;
|
|
4
|
+
loopContext: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare class Hoisting {
|
|
7
|
+
private static _list;
|
|
8
|
+
static addExpr(exp: Expr): string;
|
|
9
|
+
static renderExpr(): string;
|
|
10
|
+
static addHelper(key: HELPERS): void;
|
|
11
|
+
static renderListHelper(): string;
|
|
12
|
+
static renderElementHelper(): "" | "const _renderElement$_ = (tagName, attributes, childNodes) => ({ type: 2, tagName, attributes, childNodes })";
|
|
13
|
+
static renderTextHelper(): "" | "const _renderText$_ = (textContent) => ({ type: 3 , textContent })";
|
|
14
|
+
static renderCommentHelper(): "" | "const _renderComment$_ = (textContent) => ({ type: 5 , textContent })";
|
|
15
|
+
static startHoisting(): void;
|
|
16
|
+
static popHoisting(): string;
|
|
17
|
+
static clear(): void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
package/dist/consts.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const SKETCH_CTX = "_ctx$_";
|
|
2
|
+
export declare const EXPR_TRY_CATCH = "_etc$_";
|
|
3
|
+
export declare const EXPR_TRY_CATCH_INDEX = "_etci$_";
|
|
4
|
+
export declare const EXPR_TRY_CATCH_CTX = "_etcc$_";
|
|
5
|
+
export declare enum NodeType {
|
|
6
|
+
Document = 0,
|
|
7
|
+
DocumentType = 1,
|
|
8
|
+
Element = 2,
|
|
9
|
+
Text = 3,
|
|
10
|
+
CDATA = 4,
|
|
11
|
+
Comment = 5,
|
|
12
|
+
Root = 6
|
|
13
|
+
}
|
|
14
|
+
export declare enum HELPERS {
|
|
15
|
+
RENDER_LIST = "_renderList$_",
|
|
16
|
+
RENDER_ELEMENT = "_renderElement$_",
|
|
17
|
+
RENDER_TEXT = "_renderText$_",
|
|
18
|
+
RENDER_COMMENT = "_renderComment$_"
|
|
19
|
+
}
|
package/dist/consts.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";"function"==typeof SuppressedError&&SuppressedError;var e,t;exports.NodeType=void 0,(e=exports.NodeType||(exports.NodeType={}))[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e[e.Root=6]="Root",exports.HELPERS=void 0,(t=exports.HELPERS||(exports.HELPERS={})).RENDER_LIST="_renderList$_",t.RENDER_ELEMENT="_renderElement$_",t.RENDER_TEXT="_renderText$_",t.RENDER_COMMENT="_renderComment$_",exports.EXPR_TRY_CATCH="_etc$_",exports.EXPR_TRY_CATCH_CTX="_etcc$_",exports.EXPR_TRY_CATCH_INDEX="_etci$_",exports.SKETCH_CTX="_ctx$_",exports.__awaiter=function(e,t,o,n){return new(o||(o=Promise))((function(r,_){function E(e){try{p(n.next(e))}catch(e){_(e)}}function T(e){try{p(n.throw(e))}catch(e){_(e)}}function p(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(E,T)}p((n=n.apply(e,t||[])).next())}))};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { XhsDocument, XhsElement } from 'xhs-mp-ml-parser';
|
|
2
|
+
export declare class Generator {
|
|
3
|
+
private filePath;
|
|
4
|
+
private shortPath;
|
|
5
|
+
private removeComentNode;
|
|
6
|
+
private ast;
|
|
7
|
+
constructor(options: {
|
|
8
|
+
shortPath: string;
|
|
9
|
+
filePath: string;
|
|
10
|
+
removeComentNode?: boolean;
|
|
11
|
+
ast: XhsDocument;
|
|
12
|
+
});
|
|
13
|
+
handleAttr(node: XhsElement): string;
|
|
14
|
+
private renderFor;
|
|
15
|
+
private renderIf;
|
|
16
|
+
private renderElement;
|
|
17
|
+
private renderNode;
|
|
18
|
+
renderSketch(): string;
|
|
19
|
+
}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./consts.js"),t=require("xhs-mp-pack"),r=require("xhs-mp-compiler-utils"),n=require("xhs-mp-ml-parser"),o=require("lodash");class s{constructor(e,t){this.source=e,this.filePath=t}validateBase(e){if(n.isImport(e)||n.isTemplateConsume(e)||n.isTemplateDefine(e))throw new t.ParserError(e.start,"骨架文件:不支持 template、import 标签");if(n.isInclude(e))throw new t.ParserError(e.start,"骨架文件:不支持 include 标签");if(n.isSlotGet(e)||n.isSlotPass(e))throw new t.ParserError(e.start,"骨架文件:不支持 插槽 语法");if(n.isSJS(e))throw new t.ParserError(e.start,"骨架文件:不支持 sjs 标签")}validate(e){if(this.validateBase(e),n.isLoopNode(e))throw new t.ParserError(e.start,"骨架文件:暂不支持 循环控制 语法");if(n.isConditionNode(e))throw new t.ParserError(e.start,"骨架文件:暂不支持 条件控制 语法");e.children.length&&e.children.forEach((e=>{this.validate(e)}))}}class i{static addExpr(t){const r=o.last(i._list);if(r){r.exprs.push(t);const n=r.exprs.length-1;return t.loopContext.length?`${e.EXPR_TRY_CATCH}(${n}, { ${t.loopContext.join(",")}} )`:`${e.EXPR_TRY_CATCH}(${n})`}return""}static renderExpr(){var t;const r=o.last(i._list);if(!(null===(t=null==r?void 0:r.exprs)||void 0===t?void 0:t.length))return"";const n=r.exprs.map(((t,r)=>{let n="";return n=t.loopContext.length?`{\n const { ${t.loopContext.join(",")} } = ${e.EXPR_TRY_CATCH_CTX}\n return ${t.value};\n }\n `:`{ return ${t.value}; }`,{code:n,idx:r}})),s=o.groupBy(n,"code"),l=Object.keys(s).map((e=>`${s[e].map((({idx:e})=>`case ${e}:`)).join("")}${e}`)).join("\n");return`\n const ${e.EXPR_TRY_CATCH} = (${e.EXPR_TRY_CATCH_INDEX}, ${e.EXPR_TRY_CATCH_CTX}) => {\n try{\n switch(${e.EXPR_TRY_CATCH_INDEX}) {\n ${l} \n }\n }catch(error){\n // console.warn(\`[xhs warning]: \${error.message}\`)\n }\n }\n `}static addHelper(t){const r=o.last(i._list);if(r)switch(t){case e.HELPERS.RENDER_LIST:r.renderList=!0;break;case e.HELPERS.RENDER_COMMENT:r.renderComment;break;case e.HELPERS.RENDER_ELEMENT:r.renderElement=!0;break;case e.HELPERS.RENDER_TEXT:r.renderText=!0}}static renderListHelper(){const e=o.last(i._list);return null==e||e.renderList,""}static renderElementHelper(){const t=o.last(i._list);return e.NodeType.Element,(null==t?void 0:t.renderElement)?`const ${e.HELPERS.RENDER_ELEMENT} = (tagName, attributes, childNodes) => ({ type: ${e.NodeType.Element}, tagName, attributes, childNodes })`:""}static renderTextHelper(){const t=o.last(i._list);return(null==t?void 0:t.renderText)?`const ${e.HELPERS.RENDER_TEXT} = (textContent) => ({ type: ${e.NodeType.Text} , textContent })`:""}static renderCommentHelper(){const t=o.last(i._list);return(null==t?void 0:t.renderComment)?`const ${e.HELPERS.RENDER_COMMENT} = (textContent) => ({ type: ${e.NodeType.Comment} , textContent })`:""}static startHoisting(){i._list.push({exprs:[],renderComment:!1,renderElement:!1,renderList:!1,renderText:!1})}static popHoisting(){const e=[i.renderExpr(),i.renderCommentHelper(),i.renderTextHelper(),i.renderElementHelper(),i.renderListHelper()].filter(Boolean).join("\n");return i._list.pop(),e}static clear(){i._list=[]}}i._list=[];const l=["null","undefined","false","true","NaN","Number","Boolean","String","JSON"],a=["window","self","globalThis","this"],d=(r,o,s,d)=>{try{if("expression"===s||"text"===s){return("expression"===s?r.trim():r).split(/({{.*?}})/).filter(Boolean).map((t=>{var r,d;if(null===(r=n.matchMustache(t))||void 0===r?void 0:r.length){const r=t.replace(/{{(.*?)}}/g,((t,r)=>((t,r)=>{let o=!1;const s=new Set,d=n.parseExpression(t).map((t=>{var n,i;if("string"==typeof t)return t;const d=null===(n=t.source)||void 0===n?void 0:n.trim();return l.includes(d)?d:a.includes(d)?(o=!0,"({})"):(null===(i=r.loopContext)||void 0===i?void 0:i.includes(d))?(o=!0,s.add(d),d):(o=!0,`${e.SKETCH_CTX}.${d}`)})).join("");return o?i.addExpr({value:d,loopContext:[...s].sort()}):d})(r,o)));return`(${r})`}return"expression"===s?JSON.stringify(t):(d=t).includes("&")?JSON.stringify(n.decodeHtmlEntity(d,!1)):JSON.stringify(d)})).join("+")}}catch(e){const s=d instanceof n.XhsAttr?d.name:"";let i=e.message+`: \`${r}\``;throw s?(i=`${i} at attribute \`${s}\``,o instanceof n.XhsElement&&(i=`${i} in tag \`${o.name}\``)):d instanceof n.XhsText&&(i=`${i} at text block`),new t.ParserError((null==d?void 0:d.start)||(null==o?void 0:o.start)||0,i)}throw new Error(`${r} 未实现模式${s}`)};function E(e,t,r,o="expression"){var s;return(null===(s=n.matchMustache(t))||void 0===s?void 0:s.length)?d(t,e,o,r)||"":JSON.stringify(t)}class c{constructor(e){var t;this.filePath="",this.shortPath="",this.removeComentNode=!0,this.filePath=e.filePath,this.removeComentNode=null===(t=e.removeComentNode)||void 0===t||t,this.ast=e.ast}handleAttr(e){const t=[];return Object.values(e.attrsMap).forEach((r=>{const{name:n,value:o}=r;"boolean"!=typeof o?t.push(`${JSON.stringify(n)}: ${E(e,o,r)}`):t.push(`${JSON.stringify(n)}: ${o}`)})),`{ ${t.filter(Boolean).join(",")} }`}renderFor(t){const{forBody:r,forItem:o,forIndex:s,forKey:l,forBodyAttr:a,forKeyAttr:d}=n.getLoop(t),c=E(t,r,a),p=o||"item",h=s||"index";if(n.isDefined(l)){let e="";e=l===p?p:l===h?h:(null==l?void 0:l.startsWith(`${p}.`))?l:["*this","*item",void 0].includes(l)?p:n.matchMustache(l)?l||'""':`${p}["${l}"]`,d&&(d.value=e)}return t.loopContext=[...t.loopContext,p,h],n.broadcastContext({nodes:t.children,loopContext:[p,h]}),i.addHelper(e.HELPERS.RENDER_LIST),`${e.HELPERS.RENDER_LIST}(\n ${c},\n (${p}, ${h}) => ${t.operation["xhs:if"]?this.renderIf(t):this.renderElement(t)}\n)`}renderIf(e){var t,r,o;const s=[e],i=null===(r=null===(t=e.parent)||void 0===t?void 0:t.children)||void 0===r?void 0:r.findIndex((t=>t===e));if(void 0!==i){const t=null===(o=e.parent)||void 0===o?void 0:o.children;if(t)for(let e=i+1;e<t.length;e++){const r=t[e];if(r.operation["xhs:elif"])s.push(r);else if(!r.is(n.ElementType.COMMENT)){if(r.operation["xhs:else"]){s.push(r);break}break}}}const l=!s.find((e=>e.operation["xhs:else"]));let a="";return s.forEach((t=>{const{ifState:r,elifState:o,elseState:s}=n.getCondition(t);if(n.isDefined(r)||n.isDefined(o)){const n=E(e,`${r||o}`,e.operation["xhs:if"]||e.operation["xhs:elif"]);a+=`${n} ? ${this.renderElement(t)} :`}else s&&(a+=this.renderElement(t))})),l&&(a+="null"),a}renderElement(t){const r=t.children.map((e=>this.renderNode(e))).filter(Boolean).join(",");let o=n.tagTransformMap[t.name]?`xhs-${t.name}`:t.name;return i.addHelper(e.HELPERS.RENDER_ELEMENT),`${e.HELPERS.RENDER_ELEMENT}('${o}', ${this.handleAttr(t)}, [${r}])`}renderNode(t){if(t.is(n.ElementType.COMMENT)&&!this.removeComentNode)return i.addHelper(e.HELPERS.RENDER_COMMENT),`${e.HELPERS.RENDER_COMMENT}(${JSON.stringify(t.content)})`;if(t.is(n.ElementType.Element)){if(o.isEmpty(t.operation))return this.renderElement(t)}else if(t.is(n.ElementType.TEXT)){const r=E(t,t.content,t,"text");return i.addHelper(e.HELPERS.RENDER_TEXT),`${e.HELPERS.RENDER_TEXT}(${r})`}return""}renderSketch(){i.startHoisting();const e=this.ast.children.map((e=>this.renderNode(e))).filter(Boolean);return`{\n ${i.popHoisting()}\n return ([${e.join(",")}])\n }`}}module.exports=function(o){return e.__awaiter(this,void 0,void 0,(function*(){const l=this.async();try{const{resourcePath:a,_compiler:d,resourceQuery:E}=this,{miniprogramDir:p,appJSON:h={}}=(null==d?void 0:d.project)||{},u=r.getShortPath(p,a);t.initErrorContext(o,a),i.clear();const m=n.parseML(o,a);new s(o,a).validate(m);const f=new c({ast:m,filePath:a,shortPath:u}).renderSketch();l(null,`export default (${e.SKETCH_CTX}) => ${f}`)}catch(e){l(e)}}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseStringStyle(styleText: string): {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./consts.js"),t=require("xml2js"),r=require("postcss"),n=require("postcss-prefix-selector"),s=require("prettier");function o(e){const t={};return Object.keys(e).forEach((r=>{if(!r.startsWith("xhs_")&&"is"!==r)return t[r]="class"===r?[...new Set(e[r].replace(/xhs_\d+_/g,"").trim().split(/\s/))].join(" "):"style"===r?function(e){if(!e.includes("--ide-"))return e;const t=function(e){const t={};return e&&(e=(e=e.replace(/ /g," ").replace(/ /g," ").replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")).replace(/url\([^)]+\)/gi,(e=>e.replace(/;/gi,":#||#:")))).split(";").forEach((e=>{if(!(e=e.trim()))return;const r=e.indexOf(":");if(-1===r)return;const n=e.substr(0,r).trim();t[n]=e.substr(r+1).replace(/:#\|\|#:/gi,";").trim()})),t}(e),r={},n={};Object.keys(t).forEach((e=>{e.startsWith("--ide-")?n[e.replace(/^--ide-/g,"")]=t[e]:r[e]=t[e]})),Object.assign(r,n);let s="";return Object.keys(r).forEach((e=>{s+=`${e}:${r[e]};`})),s}(e[r]):e[r]})),t}function i(e){return"div"===e?"view":e.replace(/^xhs-/g,"")}const a=["input","textarea","image","video","map","audio","canvas","camera"];function c(t,r={}){var n;const s={$:o(t.attributes)};return t.tagName&&(t.tagName=i(t.tagName)),a.includes(t.tagName)||null===(n=t.childNodes)||void 0===n||n.forEach((t=>{if(t.type===e.NodeType.Text)s._=t.textContent;else if(t.type===e.NodeType.Element){if(!t.tagName)return;const e=i(t.tagName);s[e]||(s[e]=[]),s[e].push(c(t)[e])}})),{[t.tagName]:s}}function l(r){if(r.type===e.NodeType.Text)return r.textContent;let n=new t.Builder({headless:!0,xmldec:{version:"1.0",encoding:"UTF-8"},attrkey:"$"}),s=c(r);return n.buildObject(s)}function p(){return{postcssPlugin:"postcss-revert-rpx",Root(e){e.walkRules((e=>{const t={};[".xhs_inner-loading","xhs-template","#xhs_inner_app","xhs-page"].includes(e.selector)?e.remove():(e.walkDecls((e=>{if(e.prop.startsWith("--ide-")){const r=e.prop.replace("--ide-","");t[r]={prop:r,value:e.value},e.remove()}})),e.walkDecls((e=>{t[e.prop]&&e.remove()})),Object.keys(t).forEach((r=>{e.append(t[r])})))}))}}}p.postcss=!0,exports.build=function(t){return e.__awaiter(this,void 0,void 0,(function*(){var o,i;try{const a=t.flatMap((e=>e));let c=null===(o=a.find((t=>t.type&&t.type===e.NodeType.Root)))||void 0===o?void 0:o.childNodes.filter(Boolean);c=((null===(i=null==c?void 0:c.find((e=>e.tagName&&"xhs-page"===e.tagName)))||void 0===i?void 0:i.childNodes)||c).filter(Boolean);const u=null==c?void 0:c.map(l).join("\n"),d=a.filter((t=>t.type&&t.type!==e.NodeType.Root&&t.textContent)).map((e=>e.textContent)).filter(Boolean).join("\n");return{ml:u,css:yield function(t){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=yield r([p(),n({prefix:"xhs",transform:(e,t)=>t.replace(/\.xhs_\d+_/g,".").replace(/(^|\\s)xhs-(.+)/g,"$1 $2")})]).process(t,{from:void 0});return yield s.format(e.css,{parser:"css",singleQuote:!0,trailingComma:"none"})}catch(e){return console.log(e),t}}))}(d)}}catch(e){return console.log(e),{error:e}}}))};
|
package/dist/utils.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xhs-mp-sketch-loader",
|
|
3
|
+
"version": "1.9.12-beta.0",
|
|
4
|
+
"description": "sketch loader",
|
|
5
|
+
"category": "esm",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"registry": "https://registry.npmjs.org/",
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/"
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"xhsml-loader"
|
|
17
|
+
],
|
|
18
|
+
"author": "zyu1 <fuzhu@xiaohongshu.com>",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"fs-extra": "10.0.0",
|
|
22
|
+
"lodash": "^4.17.21",
|
|
23
|
+
"querystring": "0.2.1",
|
|
24
|
+
"source-map": "^0.6.1",
|
|
25
|
+
"xml2js": "^0.6.2"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@swc/core": "^1.3.83",
|
|
29
|
+
"webpack": "^5.88.2",
|
|
30
|
+
"xhs-mp-pack": "2.0.4-beta.0",
|
|
31
|
+
"xhs-mp-compiler-utils": "2.0.4-beta.0",
|
|
32
|
+
"xhs-mp-shared": "2.0.4-beta.0",
|
|
33
|
+
"xhs-mp-ml-parser": "2.0.4-beta.0",
|
|
34
|
+
"postcss": "^8.2.15",
|
|
35
|
+
"postcss-import": "^14.1.0",
|
|
36
|
+
"postcss-prefix-selector": "^1.16.1",
|
|
37
|
+
"postcss-preset-env": "^6.7.2",
|
|
38
|
+
"prettier": "^3.0.3"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
42
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
43
|
+
"@swc/core": "^1.3.83",
|
|
44
|
+
"@types/fs-extra": "9.0.12",
|
|
45
|
+
"@types/node": "14",
|
|
46
|
+
"@xhs/eslint-plugin-xhs": "1.0.2",
|
|
47
|
+
"cpy-cli": "3.1.1",
|
|
48
|
+
"eslint": "7.27.0",
|
|
49
|
+
"eslint-config-prettier": "8.1.0",
|
|
50
|
+
"jest": "27.0.6",
|
|
51
|
+
"rimraf": "^5.0.5",
|
|
52
|
+
"rollup": "^4.9.6",
|
|
53
|
+
"rollup-plugin-alias": "^2.2.0",
|
|
54
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
55
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
56
|
+
"tslib": "^2.6.2",
|
|
57
|
+
"typescript": "^5.4.3",
|
|
58
|
+
"webpack": "^5.88.2",
|
|
59
|
+
"xhs-mp-pack": "2.0.4-beta.0",
|
|
60
|
+
"xhs-mp-compiler-utils": "2.0.4-beta.0",
|
|
61
|
+
"xhs-mp-shared": "2.0.4-beta.0",
|
|
62
|
+
"xhs-mp-ml-parser": "2.0.4-beta.0",
|
|
63
|
+
"postcss": "^8.2.15",
|
|
64
|
+
"postcss-import": "^14.1.0",
|
|
65
|
+
"postcss-prefix-selector": "^1.16.1",
|
|
66
|
+
"postcss-preset-env": "^6.7.2",
|
|
67
|
+
"prettier": "^3.0.3"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"watch": "npm run prebuild && rollup -c -w --sourcemap true",
|
|
71
|
+
"build": "npm run prebuild && rollup -c && tsc --emitDeclarationOnly --declaration",
|
|
72
|
+
"version": "formula changelog && git add .",
|
|
73
|
+
"clean": "rimraf ./dist",
|
|
74
|
+
"prebuild": "npm run clean",
|
|
75
|
+
"lint": "eslint . --fix",
|
|
76
|
+
"compile": "jest '(/tests/.*\\.spec)\\.ts$'",
|
|
77
|
+
"unit": "jest '(/tests/.*\\.test)\\.ts$' --collectCoverage=false",
|
|
78
|
+
"test": "echo skip test"
|
|
79
|
+
},
|
|
80
|
+
"readme": "# 构建工具\n"
|
|
81
|
+
}
|