Git Product home page Git Product logo

nrkno-sanity-libs's Introduction

NRK.no Sanity libraries

NRK.no Sanity libraries contains an assortment of plugins and libraries used by NRK.no to extend Sanity Studio and apps using Sanity as a datasource.

Principles of nrkno-sanity outlines a bit about how NRK.no has configured Sanity Studio to optimize for a multi-team environment, all shipping content to distributed frontend.

Many of the libraries are based around the idea of option driven design, and everything relies on typesafe-schemas.

Please note that NRK is not looking for contributions for this particular repo.

This monorepo uses Lerna for versioning & publishing to npm. Publishing is triggered manually by the nrk.no team using CI infrastructure.

It is recommended to skim through the Lerna documentation.

Getting started

Run npm install && npm run init.

This will:

  • install all dependencies needed for Lerna.
  • install and hoist all package dependencies, then build everything.
  • prepare husky commit hooks required for development.

Rerun npm run init after package dependencies have change, to hoist & link everything correctly.

Tests

npm run test

To test a package in another project, use npm link/yarn link.

Upgrading minor Sanity dependencies

npm run upgrade:sanity

Script will upgrade (minor) Sanity dependencies in the root and all packages, install, hoist and link everything.

Commits & Versioning

All commits on master should follow convential commit format:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

We use commitlint to enforce this with a git-hook.

Examples

fix: allow provided config object to extend other configs
feat: allow provided config object to extend other configs

BREAKING CHANGE: `extends` key in config file is now used for extending other config files

Determine release version for current branch

npm run version:dry-run

Approximate result:

Changes:

  • @nrk/nrkno-lib-1: 0.4.0 => 0.4.1
  • @nrk/sanity-plugin-nrkno-lib-2 1.4.0 => 1.5.0

? Are you sure you want to create these versions? No

Note: A yes answer will modify package.json files & update CHANGELOG.md, but nothing will be commited or pushed.

Publishing

Publishing is triggered by nrk.no team using CI infrastructure (nrkno-sanity-libs-releaser).

Create a new package

See packages documentation.

Note: Packages are private on npm by default. Add

  "publishConfig": {
    "access": "public"
  }

to package.json to make it public on npm.

nrkno-sanity-libs's People

Contributors

ajaco avatar artzag avatar dependabot[bot] avatar rosvoll avatar sjurlur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

snorrees

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.