Npm scripts#8823
Closed
farfromrefug wants to merge 15 commits into
Closed
Conversation
npm config set nativescript:npm_alias pnpm
npm config set @nativescript/webpack:npm_alias yarn
NathanaelA
reviewed
Sep 7, 2020
Contributor
NathanaelA
left a comment
There was a problem hiding this comment.
- What happens when you do a "npm start" do the commands still work from the npm menus?
- What happens when you do a "npm run core:build" does it create the output .tgz file properly?
| "rootDir": "./", | ||
| "types": ["node"], | ||
| "plugins": [ | ||
| { "transform": "../../../packages/webpack/transformers/ns-transform-native-classes.ts", "type": "raw" } |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Collaborator
Author
There was a problem hiding this comment.
That what I asked. Now that I know why nx did not work I can try
Collaborator
Author
|
core:build does not generate the tgz, core:build.npm does and it does with npm scripts |
Collaborator
Author
|
BTW some scripts actually works better now with npm scripts (could be ported to nx). For example types build commands clear dist package before building it to avoid issues |
# Conflicts: # package.json
…m_scripts # Conflicts: # package.json
8753605 to
86395da
Compare
d4ced42 to
53488b5
Compare
Collaborator
Author
|
any news on this? the more ways to build you add the easier you make it for people to contribute |
…m_scripts # Conflicts: # CHANGELOG.md # apps/automated/package.json # apps/toolbox/package.json # apps/ui/package.json # package.json # packages/core/globals/index.ts # packages/core/package.json # packages/core/tsconfig.lib.json # packages/webpack/package.json
# Conflicts: # package.json
Contributor
|
Closing in favor of this simplified approach which is now on master: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR brings back npm scripts for people not wanting to use
nx.It also brings a nice change in the sense that it allows you to use npm/pnpm/yarn as your package manager.
for nativescript(root)
npm config set nativescript:npm_alias pnpmfor webpack
npm config set @nativescript/webpack:npm_alias yarnI needed to change the transformer path for the core for it to build.
I am not sure how it could work with
nxbefore.nxsimply does not work here for me so i cant really test that the core still builds.I did not port the nx test commands as they dont work anymore ( jest config files removed).
Also to point out(so that it can be found later) that
nxdoes not work with pnpm or yarn. It seems not to work with their node_modules structure.PS: Maybe we should now change the nx commands to simply run
npm run ...now? That way people usingnxwould also benefit from choosing npm/pnpm/yarn. And it would "unify" commands among tools.