16.43.0 • Published 4 days ago

@ircsignpost/signpost-base v16.43.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

signpost-base

A collection of sharable components for Signpost sites.

This README.md is meant for developers and maintainers.

Usage

This is the source code repository for @ircsignpost/signpost-base Node package.

The package exports two kinds of artifacts:

  • Transpiled TypeScript modules that live in the dist directory.
  • CSS and Less stylesheets that live in styles. If you want to use React component defined by this package, you need to include its corresponding stylesheet in pages/_app.js.

The components in this package are meant to be used on Signpost sites only and assume that those sites are built with the following technologies:

  • Next.js
  • React
  • Ant Design
  • Tailwind

Development environment setup

This section explains how to set up your development environment.

  1. Install Node.js dependencies

    yarn install
  2. Install Git hooks

    yarn prepare

Developing a new feature

This section gives tips on developing a new sharable feature. This package is not directly connected to an end-user site, so it requires a few more steps to set up a development loop.

Building your changes in signpost-base

Building your changes:

yarn run build

It will create a /dist directory with updated components from /src.

Connecting this package to a local site

To test a component from the version of this package that's on your drive, add it to a site's dependencies:

# e.g., cd /Users/greg/beporsed-ma-ra
cd PATH_TO_A_SITE_REPO
# e.g., yarn add /Users/greg/signpost-base
yarn add PATH_TO_THIS_PACKAGE/signpost-base

It will update @ircsignpost/signpost-base dependency in package.json file to something like: "@ircsignpost/signpost-base": "/Users/greg/signpost-base",

Now the site will use the package from your local drive and not from NPM. To use a new component, just import it. See example at beporsed-ma-ra.

If you want to use hot-reload, change next config to refresh based on node_modules.

Modifying and importing styles

When you add a new file to /styles, it needs to be explicitly imported in your local site, e.g., see example of importing a .less file.

Deployment


Before deploying your changes, create a PR with your changes on a separate branch, get it reviewed and approved, then merged into the main branch.


Release and publish a new version

Release is the process of marking the source code repository with a new version. This package uses release-please to automate the release process.

Deployment (AKA publishing) is the process of pushing the newest package release to NPM, so that it is accessible to its clients. This package is hosted at NPM, @ircsignpost/signpost-base.

Releasing and publishing are two required steps for making a new version available to its clients. First release, then publish:

  1. Create a new release:

    1. Merge your changes into main branch, wait for several minutes for release-please to create a release PR. See example of an automatically created release PR.

    2. Merge the release PR on GitHub as described in the action's documentation.

  2. Publish on NPM. To deploy a new version to the registry, do the following on main branch:

    1. Build the new version of the package.

      yarn run build
    2. Publish the new package. When prompted to enter a version, enter the one created in the release step. Usually, that means to retype the version shown in the prompt

      yarn publish

      You might get code ENEEDAUTH error on yarn publish but the package still gets published.

NOTE

  • Use ! to indicate the change (commit) is breaking: https://github.com/google-github-actions/release-please-action#how-should-i-write-my-commits
  • As a rule of thumb, do release and pulish cycle after each merge into the main branch to keep the changeset small
  • You can create releases without publishing
  • To unpublish a version of the package, you can use the npm unpublish <package-name>@<version> command. For example, to unpublish version 3.7.0 of this project, you would run npm unpublish @ircsignpost/signpost-base@3.7.0 in your terminal.

Package's design

This section documents some of the package's design decisions.

Architecture

Signpost Website Infrastructure Design Doc describes the overall architecture of the Signpost ecosystem including this package, signpost-template, and individual Signpost instances.

Styles

The components in this package use either Vanilla CSS or static Less stylesheets.

We do not use CSS modules, because Next.js doesn't allow dependencies to use CSS modules.

We allow for Less, because Signpost website use Ant, which uses Less.

Website's design

This section documents some of the website's design decisions and mechanisms.

Preview

To understand how to use the preview mode on Signpost instances, read "Preview mode in unitedforukraine.org".

Article post-processing

Articles are hosted as plain HTML files on Zendesk. To enable content writers to add modern and consistent elements, the article content component post-processes the HTML content from Zendesk.

Article writers may use custom content elements to add meta tags or link buttons.

16.43.0

4 days ago

16.41.0

12 days ago

16.40.0

12 days ago

16.42.0

12 days ago

16.39.0

16 days ago

16.38.0

17 days ago

16.37.0

29 days ago

16.36.0

2 months ago

16.35.0

2 months ago

16.34.0

2 months ago

16.33.0

2 months ago

16.32.0

3 months ago

16.31.0

3 months ago

16.30.0

3 months ago

16.29.0

3 months ago

16.28.0

3 months ago

16.27.0

3 months ago

16.26.0

3 months ago

16.25.0

3 months ago

16.23.0

3 months ago

16.22.0

3 months ago

16.21.0

3 months ago

16.20.0

3 months ago

16.19.0

4 months ago

16.18.0

4 months ago

16.17.0

4 months ago

16.16.0

4 months ago

16.15.0

4 months ago

16.14.0

4 months ago

16.13.0

4 months ago

16.12.0

4 months ago

16.11.0

4 months ago

16.10.0

4 months ago

16.9.0

4 months ago

16.7.0

5 months ago

16.8.0

5 months ago

16.6.0

5 months ago

15.25.0

8 months ago

15.40.0

6 months ago

15.13.0

10 months ago

15.13.1

10 months ago

15.36.0

7 months ago

16.5.0

5 months ago

15.26.0

7 months ago

15.8.0

11 months ago

15.41.0

6 months ago

15.37.0

6 months ago

15.14.0

9 months ago

15.27.0

7 months ago

15.42.0

6 months ago

15.38.0

6 months ago

15.15.0

9 months ago

15.30.0

7 months ago

16.3.0

6 months ago

15.28.0

7 months ago

15.20.0

8 months ago

15.43.0

6 months ago

15.39.0

6 months ago

15.16.0

9 months ago

15.31.0

7 months ago

16.4.0

6 months ago

15.29.0

7 months ago

15.44.0

6 months ago

15.21.0

8 months ago

15.17.0

9 months ago

15.32.0

7 months ago

16.1.0

6 months ago

15.45.0

6 months ago

15.22.0

8 months ago

15.18.0

9 months ago

15.33.0

7 months ago

15.10.0

10 months ago

16.2.0

6 months ago

15.9.0

10 months ago

15.23.0

8 months ago

15.19.0

9 months ago

15.34.0

7 months ago

15.11.0

10 months ago

15.24.0

8 months ago

15.35.0

7 months ago

15.12.0

10 months ago

16.0.0

6 months ago

15.7.0

11 months ago

15.6.0

11 months ago

15.3.0

11 months ago

14.50.0

12 months ago

14.42.0

1 year ago

14.46.0

12 months ago

15.0.0

11 months ago

15.4.0

11 months ago

14.49.0

12 months ago

14.45.0

12 months ago

15.1.0

11 months ago

15.5.0

11 months ago

14.52.0

11 months ago

14.48.0

12 months ago

14.44.0

12 months ago

15.2.0

11 months ago

14.51.0

12 months ago

14.47.0

12 months ago

14.43.0

1 year ago

14.39.0

1 year ago

14.35.0

1 year ago

14.38.0

1 year ago

14.41.0

1 year ago

14.37.0

1 year ago

14.40.0

1 year ago

14.36.0

1 year ago

14.31.0

1 year ago

14.27.0

1 year ago

14.30.0

1 year ago

14.34.0

1 year ago

14.26.0

1 year ago

14.33.0

1 year ago

14.29.0

1 year ago

14.32.0

1 year ago

14.28.0

1 year ago

14.16.0

1 year ago

14.23.0

1 year ago

14.15.0

1 year ago

14.19.0

1 year ago

14.22.0

1 year ago

14.14.0

1 year ago

14.18.0

1 year ago

14.25.0

1 year ago

14.21.0

1 year ago

14.17.0

1 year ago

14.13.0

2 years ago

14.20.0

1 year ago

14.24.0

1 year ago

14.1.0

2 years ago

14.5.0

2 years ago

14.12.0

2 years ago

14.5.1

2 years ago

14.9.0

2 years ago

14.2.0

2 years ago

14.6.0

2 years ago

14.11.0

2 years ago

14.3.0

2 years ago

14.3.1

2 years ago

14.7.0

2 years ago

14.10.0

2 years ago

14.0.0

2 years ago

14.0.1

2 years ago

14.0.2

2 years ago

14.0.3

2 years ago

14.4.0

2 years ago

14.0.4

2 years ago

14.4.1

2 years ago

14.0.5

2 years ago

14.8.0

2 years ago

10.4.1

2 years ago

5.1.0

2 years ago

6.1.0

2 years ago

10.0.0

2 years ago

6.3.0

2 years ago

10.2.0

2 years ago

6.5.0

2 years ago

13.1.0

2 years ago

3.9.0

2 years ago

3.7.2

2 years ago

7.3.0

2 years ago

7.1.0

2 years ago

3.4.0

2 years ago

3.2.0

2 years ago

3.8.0

2 years ago

3.6.2

2 years ago

3.10.0

2 years ago

3.6.1

2 years ago

3.6.0

2 years ago

3.12.0

2 years ago

12.0.0

2 years ago

12.0.1

2 years ago

6.4.3

2 years ago

6.6.0

2 years ago

6.4.2

2 years ago

6.8.0

2 years ago

4.0.0

2 years ago

4.2.0

2 years ago

9.1.1

2 years ago

9.1.0

2 years ago

11.2.0

2 years ago

11.0.0

2 years ago

5.2.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

6.0.0

2 years ago

10.1.0

2 years ago

10.1.1

2 years ago

6.2.0

2 years ago

10.3.0

2 years ago

6.4.1

2 years ago

6.4.0

2 years ago

13.2.0

2 years ago

13.2.1

2 years ago

13.0.0

2 years ago

7.0.0

2 years ago

3.8.1

2 years ago

3.6.3

2 years ago

7.2.0

2 years ago

7.0.1

2 years ago

3.3.0

2 years ago

3.11.0

2 years ago

3.7.1

2 years ago

3.7.0

2 years ago

3.11.2

2 years ago

3.11.1

2 years ago

8.0.0

2 years ago

12.1.0

2 years ago

6.7.0

2 years ago

6.9.0

2 years ago

6.9.2

2 years ago

4.1.0

2 years ago

6.9.1

2 years ago

9.0.1

2 years ago

9.0.0

2 years ago

11.1.1

2 years ago

11.3.0

2 years ago

11.1.0

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.1.0

2 years ago

0.1.3

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

1.0.0

2 years ago