New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@codeday/topo

Package Overview
Dependencies
Maintainers
4
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codeday/topo

The CodeDay design system.

  • 9.2.10
  • latest
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@codeday/topo

The CodeDay design system.

to use with NextJs wrap your Next config with useTopo

const { withTopo } = require('@codeday/topo/Next');

/**
 * @type {import('next').NextConfig}
 */
const nextConfig = withTopo({
  /* config options here */
})

module.exports = nextConfig

this will replace default links with NextJs links wherever possible

Docs

To run the docs run

docker build -t topo .
docker run -p 3000:3000 topo

Upgrading

To bulk-update most of the imports from a project using the old version of topo the new import structure, here are a few helpful regular expressions:

Replace things like import Box from '@codeday/topo/Atom/Box'; with import { Box } from '@codeday/topo/Atom';:

find: import (.*) from '@codeday/topo/(Atom|Molecule|Organism)/(\1)';?
replace: import { $1 } from '@codeday/topo/$2';

Replace things like import { Heading } from '@codeday/topo/Atom/Text'; with import { Heading } from '@codeday/topo/Atom';

find: import { ?(.*?) ?} from '@codeday/topo/(Atom|Molecule|Organism)/\w+';?
replace: import { $1 } from '@codeday/topo/$2';

There are a few edge cases these expressions don't cover, notably things like import Text, { Heading } from '@codeday/topo/Atom/Text';

Find uncovered statements in need of manual review:

import .* from '@codeday/topo/(Atom|Molecule|Organism)/

It is still reccomended to test all pages and components after executing these expressions, as there are bound to be edge cases in which these generic statements do not apply.

FAQs

Package last updated on 07 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc