example-package-02

1.4.0 • Public • Published

Example-package-02

This repo contains components/utils which are shared for Corva ui apps.

Things to know:

  1. yarn start will open ExampleApp.js in your browser. That's a playground for building components.

  2. To link this repo with your app, you should:

    Mac

    1. Run yarn build or yarn build-watch in @corva/ui repo (only first time)
    2. Run npm link dist in @corva/ui repo root (only first time)
    3. Run npm link @corva/ui in your app folder

    Windows

    1. Run npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
    2. Run yarn build or yarn build-watch in @corva/ui repo (only first time)
    3. Run npm link dist in @corva/ui repo root (only first time)
    4. Run npm link @corva/ui in your app folder

    Note: npm link will not install @corva/ui dependencies in your node modules folder. If you want to debug a change in @corva/ui dependencies, you should use yarn add file:../corva-web-repo/dist, this will install new dependencies.

In case of issues with build

You may have a problem with Invalid Hook Call Warning when you link library to app/another project;

In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react from mylib. This should make the library use the application’s React copy.

/example-package-02/

    Package Sidebar

    Install

    npm i example-package-02

    Weekly Downloads

    14

    Version

    1.4.0

    License

    none

    Unpacked Size

    1.42 MB

    Total Files

    292

    Last publish

    Collaborators

    • m1ndful