@3wks/sargon-api-node-client 中文文档教程
@3wks/sargon-api-node-client@0.1.13
此生成器创建使用 Fetch API 的 TypeScript/JavaScript 客户端。 生成的 Node 模块可以在以下环境中使用:
Environment
- Node.js
- Webpack
- Browserify
Language level
- ES5 - you must have a Promises/A+ library installed
- ES6
Module system
- CommonJS
- ES6 module system
它可以在 TypeScript 和 JavaScript 中使用。 在 TypeScript 中,定义应该通过 package.json
自动解析。 (参考)
Building
要构建 typescript 源并将其编译为 javascript 使用:
npm install
npm run build
Publishing
首先构建该包然后运行 npm publish
Consuming
导航到您的消费项目的文件夹并运行以下命令之一。
已发布:
npm install @3wks/sargon-api-node-client@0.1.13 --save
未发布(不推荐):
``` npm 安装 PATHTOGENERATED_PACKAGE --save
@3wks/sargon-api-node-client@0.1.13
This generator creates TypeScript/JavaScript client that utilizes Fetch API. The generated Node module can be used in the following environments:
Environment
- Node.js
- Webpack
- Browserify
Language level
- ES5 - you must have a Promises/A+ library installed
- ES6
Module system
- CommonJS
- ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via package.json
. (Reference)
Building
To build and compile the typescript sources to javascript use:
npm install
npm run build
Publishing
First build the package then run npm publish
Consuming
navigate to the folder of your consuming project and run one of the following commands.
published:
npm install @3wks/sargon-api-node-client@0.1.13 --save
unPublished (not recommended):
``` npm install PATHTOGENERATED_PACKAGE --save