Git Product home page Git Product logo

dev-tools's Introduction

worx-dev-tools

  1. Install yarn add @worx-to/worx-dev-tools --save-dev
  2. 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

Copy package tool

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

Copy package configuration

Add section to worx-dev-tools.json

{
  "copyPackages": {
    // Absolute paths to projects roots
    "paths": ["~/Projects/worx-app"]
  }
}

Linker tool

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 */

Clean types

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

Clean types configuration

Add section to worx-dev-tools.json

{
  "trashTypes": ["hoist-non-react-statics", "react-redux"]
}

Dependency

npx dev-dependencies

Dependency configuration

Add section dependencies section to worx-dev-tools.json

One dependency config

  • type of installation

    • local means that you want to copy dependency from you folder as normal npm package
    • git means that you want to install dependency from repository
    • link 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"
    }
  }
}

dev-tools's People

Contributors

konstantin24121 avatar

Watchers

Mike Burton avatar Alexey R. avatar Vasilyev Maksim avatar Mark avatar  avatar Boris avatar Paul Kotov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.