1.2.4 • Published 1 year ago

@psweb/lib v1.2.4

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

学习库的发布

   1. 将你要发布的内容和文件放入lib中
   2. 库中文件类型 .ts .vue .scss .img

1. 创建vue3项目

   1. vue create publish
    - a.route b.typescript c.sass
   2. 创建/lib目录
   3. 将需要发布的文件和目录放入/lib中
    

2. 创建.pnmignore屏蔽

    #屏蔽不需发布的文件和目录
    #loac files and directories
    /dist
    /public
    /src
    *.config.js
    .*
    ....

3. 调整、修改 package.json

    "name": "@psweb/lib",
    "version": "0.1.0",
    "private": false,
    "description": "学习库的发布和使用",
    ...

4. 测试

   npm install
   yarn install
   yarn serve
   yarn build

5. 发布

    npm login
    name:xxx
    password:xxxxx
    email:xxxxx
    npm publish --access public

6. 修改

    npm upinstall
    npm uppublish
    npm info psweb-header
    ...

7. 下载、使用

    npm i psweb-header
    yarn add psweb-header
   import headre from 'psweb-header'
   const header = requir('psweb-header')

参考

  1. 参考 github Reference
  2. 参考 gitcode Reference
  3. 实例图片npm Reference