`dist` not included in default publish experience
See original GitHub issueCurrent Behavior
Currently the scaffolded package.json looks like this:
{
"source": "src/index.ts",
"main": "index.js",
"umd:main": "dist/podcats.umd.production.js",
"module": "dist/podcats.es.production.js",
"typings": "dist/index.d.ts",
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test"
},
"devDependencies": {
// etc
}
}
when i publish to npm, nothing in the dist
folder gets included. this could partially be because of the .gitignore (in which case we should add an .npmignore?) but i think the "main": "index.js",
line is also a problem. I’m quite inexperienced at this so i’m not sure how to fix but i’m sure you can.
Expected behavior
i can just type ‘yarn publish’ at the root level and it “just works”
Suggested solution(s)
fix “main” field?
Your environment
Software | Version(s) |
---|---|
TSDX | 0.2.5 |
TypeScript | 3.2.4 |
Browser | chrome |
System:
OS: macOS High Sierra 10.13.4
CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
Memory: 127.70 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.0.0 - /usr/local/bin/node
Yarn: 1.12.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 71.0.3578.98
Safari: 11.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Link and publish not the package directory but it's child dist ...
The problem with this is that I need to publish not the package folders, but their dist folders instead, as well as using...
Read more >How to npm publish specific folder but as package root
You need to publish the dist folder · Specify the rootDir . This directory will have all the source code and it should...
Read more >Publish your app - Play Console Help
There are three types of publishing status: ... Every possible status for apps, updates, and items is described below. ... Your app has...
Read more >Usage of Angular libraries published to npm
Libraries are published as npm packages, usually together with schematics that ... If the package of your library does not include typings and...
Read more >Working With Files
The main convention is provided by the Base Plugin, which defaults to creating archives in the $buildDir/distributions directory and typically uses archive ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sw-yx try 0.3.0
That’s interesting about npx.