Code Monkey home page Code Monkey logo

nexus's Introduction

Nexus

Uplift's frontend core library.

Docs

View docs nexus.uplift.ltd.

Contributing

Semantic Versioning

We use conventional commits to manage version updates. The title of your PR needs to have a valid prefix.

Note that changing the PR title won't re-run the job so you have to re-run the workflow jobs yourself.

Quick reference:

fix: Correct typo.
feat: Add support for Node 12.
feat(apollo): Add useEnhancedQuery hook.
refactor!: Drop support for Node 6.
feat!: Breaking change feature.

Note that since PR titles only have a single line, you have to use the ! syntax for breaking changes.

What are the files in each package?

babel.config.js   <== extends root babelrc, needed for jest
jest.config.js    <== extends root jest.config.js, needed for jest to find config
package.json
README.md         <== package readme, should match in `website/docs`
tsconfig.json     <== if the package supports typescript it needs to configure include

Publishing a new version

Run the publish workflow.

Select the branch you want to publish from and enter latest or prerelease as the distTag.

For production release use main branch and latest.

For prereleases use any branch and the prerelease dist tag.

The versioning is based on conventional commit history (see the Contributing section).

Adding a new package

See the documentation for create-nexus-package. To summarize:

Create a new folder and cd to it.

mkdir packages/my-package && cd packages/my-package

Initialize a new package using the @uplit-ltd/create-nexus-package initializer.

npm init @uplift-ltd/nexus-package

Working with local packages

There's some weirdness with yarn link. The most reliable way seems to be to use npm link. Also if the package depends on react you may have to alias that to the app react to avoid duplicate react versions (and hooks failing).

cd packages/formik
npm link
cd ../..
npm link ../../../myapp/node_modules/react
cd myapp
npm link @uplift-ltd/formik

Additionally you may need to alias @apollo/client and its own react version to the app.

cd packages/apollo
npm link
cd ../..
npm link ../myapp/node_modules/react
npm link ../myapp/node_modules/@apollo/client
cd node_modules/@apollo/client
npm link ../../../myapp/node_modules/react

Don't forget to run npm run build after every change.

You might have to wipe node_modules/.cache in your app if you ran into duplicate react issue.

See react docs for more details.

Sponsor

This project proudly sponsored by ๐Ÿš€ Uplift.ltd.

nexus's People

Contributors

mariusc23 avatar camflan avatar dependabot[bot] avatar marcelkooi avatar iuliancrudu avatar mihaianton avatar jmerrifield avatar github-actions[bot] avatar nakleiderer avatar pcraciunoiu avatar devcharli 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.