generated from JS-DevTools/template-node-typescript
-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
I've been working my way through the code in the main branch, and I'm starting to have a few thoughts about the existing `package` and proposed `package-spec` inputs:
- I'm not sure overriding the working directory is important or useful, compared to exposing the
package-specarg (or aworkspaceoption, in the future), so we can probably drop the idea ofworking-directoryfor now - If the
package-specis a pre-packed tarball, then we still need something to point us to package.json so we can read the package name / current version.- Or maybe we extract package.json from the archive?
- If
package-specis a directory, we should use the package.json in the directory, I think
What do you think of these points? To brainstorm something:
- Keep the
packagearg - If
packageunspecified, default to regular npm behavior: use the cwd as the current package - If
packageis a package.json file, use the directory of that file as the package_spec argument to npm - If
packageis a directory, look for apackage.jsonin that directory and use the directory as the package_spec arg to npm - If
packageis an archive, I'm not sure- Extract package.json from the archive?
- Require a separate
package-manifestinput?
Originally posted by @mcous in #69 (comment)
What do you think of these points? To brainstorm something:...
That looks like the right logic to me. And yes, we should extract the package.json file from the tar file, not require another argument. I don't think we need to extract it to the file system though, we should just be able to read it into memory.
mcous
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request