How to publish a npm package with distribution files?

后端 未结 3 917
挽巷
挽巷 2020-12-02 07:32

I would like to publish a npm package that contains my source as well as distribution files. My Github repository contains src folder which contains JavaScript

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 08:29

    Take a look at the "files" field of package.json file https://docs.npmjs.com/files/package.json#files

    From the documentation:

    The "files" field is an array of files to include in your project. If you name a folder in the array, then it will also include the files inside that folder. (Unless they would be ignored by another rule.)

提交回复
热议问题