JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q27009F
  • License ISC

a code text component for react!

Package Exports

  • @saber2pr/react-code

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@saber2pr/react-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@saber2pr/react-code

npm

a code text component for react!

# from npm
npm install @saber2pr/react-code

# from github
git clone https://github.com/Saber2pr/saber-react-code.git
const code = `
下面是代码
\`\`\`ts
// 注释
export type ColorWord = {
  word: string // 注释
  color: string
}
/**
 * 多行
 *
 */
export type KeyWords = ColorWord[]
\`\`\`
上面是代码`

<Code content={code} />

start

npm install
npm start

npm run dev

Author: saber2pr


develope and test

you should write ts in /src

you should make test in /src/test

export your core in /src/index.ts!