xhs-mp-compiler-utils 1.0.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/dist/constants/constants.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +42 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const COMPILE_CALL_RUNTIME = "$__t";
|
|
2
|
+
declare enum CompileCallRuntimeMethodsNames {
|
|
3
|
+
ExecExpWithContext = "x0",
|
|
4
|
+
CalcClass = "x1",
|
|
5
|
+
Rpx2vw = "x2",
|
|
6
|
+
RunModuleUpdater = "x3"
|
|
7
|
+
}
|
|
8
|
+
declare enum CompileAddedAttrs {
|
|
9
|
+
OwnerId = "xhs__i",
|
|
10
|
+
EventMap = "xhs__p",
|
|
11
|
+
ComponentIndex = "xhs__c"
|
|
12
|
+
}
|
|
13
|
+
export { COMPILE_CALL_RUNTIME, CompileCallRuntimeMethodsNames, CompileAddedAttrs };
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t;exports.CompileCallRuntimeMethodsNames=void 0,(e=exports.CompileCallRuntimeMethodsNames||(exports.CompileCallRuntimeMethodsNames={})).ExecExpWithContext="x0",e.CalcClass="x1",e.Rpx2vw="x2",e.RunModuleUpdater="x3",exports.CompileAddedAttrs=void 0,(t=exports.CompileAddedAttrs||(exports.CompileAddedAttrs={})).OwnerId="xhs__i",t.EventMap="xhs__p",t.ComponentIndex="xhs__c";const o=(e,t)=>{const o=10**(t+1),s=Math.floor(e*o);return 10*Math.round(s/10)/o};exports.COMPILE_CALL_RUNTIME="$__t",exports.rpx2vwll=function(e){return e.replace(/([\d.]+)rpx/g,((e,t)=>`${o(t/750*100,5)}vw`))},exports.toFixed=o;
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xhs-mp-compiler-utils",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/",
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"author": "",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"chokidar": "^3.6.0",
|
|
18
|
+
"cos-nodejs-sdk-v5": "^2.13.4",
|
|
19
|
+
"fs-extra": "^11.2.0",
|
|
20
|
+
"lodash": "^4.17.21",
|
|
21
|
+
"query-string": "^8.1.0",
|
|
22
|
+
"chalk": "^4.1.2"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
26
|
+
"@types/node": "14",
|
|
27
|
+
"rimraf": "^5.0.5",
|
|
28
|
+
"rollup": "^4.9.6",
|
|
29
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
30
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
31
|
+
"typescript": "^5.4.3"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"clean": "rimraf -rf ./dist",
|
|
35
|
+
"watch": "npm run clean && rollup -c -w --sourcemap true",
|
|
36
|
+
"build": "npm run clean && rollup -c",
|
|
37
|
+
"lint": "eslint --cache --ext .js,.jsx,.ts,.tsx,.vue,svelte ./src",
|
|
38
|
+
"lint:fix": "npm run lint -- --quiet --fix",
|
|
39
|
+
"test": "echo \"todo\"",
|
|
40
|
+
"version:beta": "npm version prerelease --no-git-tag-version"
|
|
41
|
+
}
|
|
42
|
+
}
|