How to npm publish specific folder but as package root

后端 未结 10 1263
后悔当初
后悔当初 2020-12-13 01:10

I have a project that include a gulp task for building and packaging the sources and release in a directory called dist. My goal is publish it as a npm package,

10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 01:58

    Just create a .npmignore file and add the following to it :

    *.*
    !dist/*
    

提交回复
热议问题