create-full-stack icon indicating copy to clipboard operation
create-full-stack copied to clipboard

npm publish from build/

Open tiagob opened this issue 5 years ago • 2 comments

Right now it's including everything in npm pack under packages/create-full-stack. It only needs to include what tsc compiles into build/ and any templates.

It needs to copy over the templates directory or make templates packages (https://github.com/tiagob/create-full-stack/issues/49)

Using files in npm package.json like CRA does is confusing because it's in packages/create-full-stack and packages/create-full-stack/build so the filter gets applied twice (ex. if templates is in files it doesn't get included in npm pack) https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/package.json#L22-L23 (this isn't needed because they moved them to packages)

Is there a way to always publish from build/? Could lerna handle this? Trying to overwrite the publish script in package.json with yarn --cwd build/ publish doesn't work

tiagob avatar May 27 '20 18:05 tiagob

https://github.com/lerna/lerna/tree/master/commands/publish#--contents-dir

tiagob avatar May 30 '20 19:05 tiagob

Didn't work. --contents requires that all packages use a dist/build model but only create-full-stack has this. Could copy all the contents into a build folder in the other packages in a "prepare" script

tiagob avatar May 30 '20 23:05 tiagob