Remove src from npm module? #8033
Replies: 2 comments
-
I've actually changed my mind on this point now that I am wrapping existing Views and see the value of being able to import from the |
Beta Was this translation helpful? Give feedback.
0 replies
-
We ship source to support source maps. An optional package without src would be a great idea though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a new application built on OpenMCT. To make updating to newer versions of OpenMCT as they are released, I am consuming it as a package through npm, and to help developers transfer skills from strictly and statically typed languages like C#, I am making the project in Typescript. However, the types that were inferred and output into
openmct/dist/types/index.d.ts
are not always accurate, so I'm trying to usepatch-package
to make the necessary changes toindex.d.ts
in a way that would be easily replicable for other developers. Because of the inclusion of thesrc
directory in the npm package, patch-package fails because of the length of file names (namely "node_modules/openmct/src/plugins/persistence/couch/node_modules/@ibm-cloud/cloudant/node_modules/ibm-cloud-sdk-core/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.authenticationtype.md").Because the parts of the module that should actually be used by consuming applications should be from
dist
, I wouldn't expect that removingsrc
would break applications, and if such applications need access to thesrc
folder they can follow the instructions for building from source, and would come with the added benefit of significantly reducing the time taken to install when runningnpm install openmct
and reducing bloat in thenode_modules
directory.What do other users think?
Beta Was this translation helpful? Give feedback.
All reactions