diff --git a/README.md b/README.md index 05de5c7..3f44c6c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TPLV -> Nano(~170b), High performance string template library, based on ES6 String template syntax. +> Nano(~170 bytes), High performance string template library, based on ES6 String template syntax. [![npm Version](https://img.shields.io/npm/v/tplv.svg)](https://www.npmjs.com/package/tplv) [![Build Status](https://github.com/hustcc/tplv/workflows/build/badge.svg)](https://github.com/hustcc/tplv/actions) @@ -68,10 +68,9 @@ Run performance test with [rendering-test](https://aui.github.io/art-template/re The core code and principles are as follows: ```ts - -function render(template: string, data: object): string { +function render(template, data) { const ks = Object.keys(data); - const vs = ks.map((k: any) => data[k]); + const vs = ks.map((k) => data[k]); const t = `return \`${template}\``; const f = new Function(...ks, t); diff --git a/package.json b/package.json index 8ff757b..3d8970c 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "tplv", "version": "1.0.0", - "description": "Nano(~170), high performance string template library, based on ES6 String template syntax.", + "description": "Nano(~170 bytes), high performance string template library, based on ES6 String template syntax.", "license": "MIT", "main": "lib/index.js", "module": "esm/index.js", - "browser": "dist/tplv.min.js", + "unpkg": "dist/tplv.min.js", "types": "lib/index.d.ts", "files": [ "lib", diff --git a/rollup.config.js b/rollup.config.js index 19d6071..607d9c6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -9,7 +9,7 @@ module.exports = [{ file: 'dist/tplv.min.js', name: 'tplv', format: 'umd', - sourcemap: true, + sourcemap: false, }, plugins: [ resolve(), diff --git a/tsconfig.json b/tsconfig.json index d61bc11..f5d8a43 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,13 +7,12 @@ "moduleResolution": "node", "experimentalDecorators": true, "declaration": true, - "sourceMap": true, + "sourceMap": false, "allowSyntheticDefaultImports": true, "esModuleInterop": true, "pretty": true, "lib": ["dom", "esnext"], "skipLibCheck": true, - "sourceRoot": "src", "baseUrl": "src" }, "include": ["src/**/*"],