Np: Specifying Publish Folder/Directory

Created on 14 Jul 2017  路  9Comments  路  Source: sindresorhus/np

I compile my code into a dist folder and want to publish the contents of that folder to NPM. Is there a way to achieve this using np?

Most helpful comment

All 9 comments

cd dist && np? Does the dist directory contain everything, including package.json?

Yeah it does. The cd dist && np was what I was doing prior, but the problem with that is that the real package.json doesn't get bumped nor does Git get tagged.

Why not just set the main field in package.json to dist/index.js?

The application being developed is an Angular library and follows a sort of specific format. I'm the meantime I'm just doing a --no-publish and running npm publish dist

By the way, thanks for the help!

Sorry, this is not something I'm interested in supporting. We're targeting the common use-case.

@gonzofish Thanks for sharing your solution! I think that we will end up with the same one for Material-UI.

You're welcome @oliviertassinari

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doug-wade picture doug-wade  路  5Comments

bennycode picture bennycode  路  4Comments

bennycode picture bennycode  路  4Comments

ProfessorManhattan picture ProfessorManhattan  路  4Comments

koppor picture koppor  路  5Comments