Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

vnscriptkid/Lerna-StoryBook-Typescript-Boilerplate

Repository files navigation

Add a new Component

  • lerna create package-name
  • Mimic config from the Button componentpackage

└─── lib/ : Keep code that has been built

└─── src/ : Keep all the code in development

└───────── │ *.story.tsx : File used by StoryBook

└───────── │ ...

└─── README.md

└─── tsconfig.json : Copy from Button example

└─── package.json : Add "scripts": { "tsc": "tsc" }"main" field points to entry point (Run when we call require('lib-name'))"name": is 'lib-name' above. Use pattern: @vmodev/button

  • Add a new dependency to package

    • Move to the package
    • Case 1: Install local dependency

    lerna add @vmodev/button --scope=@vmodev/formExplain: Create a symlink fromform package tobutton package inside our monorepoimport Button from '@vmodev/button'

    • Case 2: Install external dependency:

    lerna add @react-google-maps/api --scope=@vmodev/googlemap

    • Case 3: A common dependency like React (used by all packages)

    yarn add React --dev -W

  • lerna run tsc : Runtsc in all packages and Build code from /src to /lib

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp