Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add script to install packages locally in a DXP checkout
This is a crude script that will almost certainly have to be evolved as the shape and structure of the monorepo evolves, but it works for now with the set of packages that we currently have. It addresses a bunch of "gotchas" that come with trying to test out packages with local changes in a liferay-portal checkout. Depending on which packages you want to test and the dependency graph between them, you may find that `yarn link` (or even `yarn add`) doesn't do what you want. Even if you manually copy files (`cp`), things still might not work because Gradle may decide to re-run a task that ends up blowing away any changes you make locally under `node_modules`. At least for the simple case, this script was good enough to allow me to test: #97 even though it involved changes to both `eslint-config` and `npm-scripts`. As you can see, it does three things: - Blows away nested `node_modules` folders inside the monorepo, because `yarn add` can end up copying these over in ways that cause confusion (broken `bin` links and so on). - Cleans out the existing versions of the dependencies (in my testing, removing and then re-adding seemed to produce a cleaner result than just overwriting). - Adds the modules to be tested. Like I said at the start, this is a hack (and not even trying to make it work on Windows), but it's a useful hack.
- Loading branch information