xgy-utils-js
v1.0.2
Published
1. `yarn init` 2. 创建入口文件`index.js` ```js // 导出 export const a = 1 export const plus = (x,y) => x+y export const minus = (x,y) => x-y ```
Downloads
4
Readme
css package
yarn init
- 创建入口文件
index.js
// 导出
export const a = 1
export const plus = (x,y) => x+y
export const minus = (x,y) => x-y
// 入口配置
{
"main": "index.js"
}
- npm login
- npm publish
- 项目调用
yarn add <package-name>
// 引入
import {fnName} from `<packagename>`