1.0.3 • Published 3 years ago

03test-array-map v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

package.json 配置

package name: (03test-array-map)
version: (1.0.0)
description: array map function use ts
entry point: (index.js) ./dist/test-array-map.js
{
  "name": "03test-array-map",
  "version": "1.0.0",
  "description": "array map function use ts",
  // 下載這個包的使用者會到 "./dist/test-array-map.js" 這個路徑下引入文件
  "main": "./dist/test-array-map.js"
}

初始化 tsconfig.json 配置
終端機輸入

tsc --init

.npmignore 配置檔
npm 發包的忽略檔案配置, 預設 node_modules 是被忽略的

// 忽略 example 資料夾下的所有檔案
/example/

終端機輸入指令

npm login

輸入在 npm 註冊的帳號
npm 帳號要有 email 驗證, 否則會報錯
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
登入帳號後, 執行指令將包發布到 NPM 上

npm publish
// 出現下面訊息就代表成功
npm notice
+ 03test-array-map@1.0.0
1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago