- Install
yarn add @worx-to/worx-dev-tools --save-dev
- Create configuration file
worx-dev-tools.json
and add into.gitignore
If you find some errors or grammatical stupidity (even in this block) please open an issue or if you need to help with setup
worx-dev-tools.json
please ask freely
Easy copy your package to local projects. This command copy all files you publish in npm package into
paths node_module/{packageName}/
directory.
npx copy-packages
Add section to worx-dev-tools.json
{
"copyPackages": {
// Absolute paths to projects roots
"paths": ["~/Projects/worx-app"]
}
}
Easy link local packages. This command is a enhancer for yarn link
.
npx linker --help /* check more options */
npx linker unlink @package/name /* unlink package */
npx linker unlink --all /* unlink all package */
npx linker unlink --skip-instal /* skip yarn install --force */
npx linker unlink --help /* check more options */
npx linker check /* check linked packages */
Some times you may have trash types into your /node_modules/@types
folder. It happens when
you use packages with different version of the same lib (e.g. react). To avoid typescript errors use clean-types
Good case to use it after install packages.
npx clean-types
Add section to worx-dev-tools.json
{
"trashTypes": ["hoist-non-react-statics", "react-redux"]
}
npx dev-dependencies
Add section dependencies
section to worx-dev-tools.json
-
type of installation
local
means that you want to copy dependency from you folder as normal npm packagegit
means that you want to install dependency from repositorylink
means that you want to install dependency as link using 'yarn link'npm
means that you want to install dependency normally. It just for skipping and saving your config for next use
-
path relative path to your local package. May effect only for
local
type -
origin git repository origin (with protocol). May effect only for
git
type -
head choose one of branch/commitHash/tag in repo. May effect only for
git
type
{
"dependencies": {
"@worx-to/shared": {
"type": "local",
"path": "../worx-shared"
},
"@worx-to/worx-dev-tools": {
"type": "git",
"origin": "git+ssh://[email protected]:worx-to/worx-dev-tools.git",
"head": "master"
},
"@worx-to/icons": {
"type": "link"
},
"@worx-to/ui": {
"type": "npm",
// you can save non-affect props for further use
"path": "../worx-ui",
"origin": "git+ssh://[email protected]:worx-to/worx-ui.git",
"head": "develop"
}
}
}