@2600hz/sds-native-theme 中文文档教程
2600Hz - Commio
Native Theme Library
包含所有可共享实用程序和配置文件的库,用 Javascript 编写
Installation
yarn add @2600hz/sds-native-theme
Usage
import { darkTheme, lightTheme } from '@2600hz/sds-native-theme';
// ...
<ThemeProvider theme={darkTheme}>{children}</ThemeProvider>
Development
此项目需要 Node.js v14+ 才能运行。
使用 .nvmrc 文件有助于规范所有维护者使用的节点版本。 如果您需要使用此文件中指定的版本,请运行这些命令。
nvm use
nvm install
使用包管理器 yarn v1+ 安装依赖项和 devDependencies。
yarn install
yarn
创建符号链接 在包根文件夹上运行以下命令,以便您可以在本地使用应用
yarn link
观看项目 每当有变化时构建包
yarn watch
使用包 两个项目必须放在同一个文件夹中,否则将无法工作
yarn link @2600hz/sds-native-theme
构建包 将自动构建项目
yarn build
Utilities
使用 Eslint
yarn run lint:fix
格式化代码 使用 Prettier
yarn run format
yarn run prettify
检查文件上的 Typescript
yarn run typescript
运行全面检查
yarn run full-check
Tech
Components 库使用了一些开源项目来正常工作:
- Typescript - Strongly typed programming language which builds on JavaScript
- NodeJs - Allows execute javascript scripts on the terminal
- Styled-Components - Library to style react components
Contributing
欢迎请求请求。 对于重大更改,请先打开一个问题来讨论您想要更改的内容。
请参阅贡献指南,了解如何为存储库和开发工作流程做出贡献。
承诺 提交必须遵循常规提交格式 确保您的消息看起来像以下示例
feat: Adding new badge component
fix: Touchable component not being exported correctly
fix!: Drop support for Typescript
请注意,最后一个将生成主要提交。 它与添加重大更改页脚具有相同的结果
按照Semantic Versioning 2.0.0 更新项目版本。
Release-It 将负责版本控制,您只需提供正确的类型即可提交:
- fix - to indicate a bug fix (PATCH) ex . v0.0.1
- feat - to indicate a new feature (MINOR) ex. v0.1.0
- chore - for updates that do not require a version bump (.gitignore, comments, etc.)
- docs - for updates to the documentation
- BREAKING CHANGE - regardless of type, indicates a Major release (MAJOR) ex. v1.0.0
访问 常规提交 获取更多示例。
发布 在上次提交/修改后运行以下命令。 然后用 Y/N 回答提示
yarn release
License
MIT
2600Hz - Commio
Native Theme Library
Library that contains all sharable utilities and configuration files, written in Javascript
Installation
yarn add @2600hz/sds-native-theme
Usage
import { darkTheme, lightTheme } from '@2600hz/sds-native-theme';
// ...
<ThemeProvider theme={darkTheme}>{children}</ThemeProvider>
Development
This project requires Node.js v14+ to run.
Using .nvmrc file helps to normalize node version used by all maintainers. If you are required to use version specified in this file, run these commands.
nvm use
nvm install
Use the package manager yarn v1+ to install dependencies and devDependencies.
yarn install
yarn
Create symlink Run the following command on package root folder, so you can consume on an app locally
yarn link
Watch project Build package whenever there is a change
yarn watch
Consume the package Both projects must be placed on same folder, otherwise won't work
yarn link @2600hz/sds-native-theme
Build the package Automatically will build the project
yarn build
Utilities
Format code using Eslint
yarn run lint:fix
Format code using Prettier
yarn run format
Format code using Prettier and Eslint
yarn run prettify
Check Typescript on files
yarn run typescript
Run full check
yarn run full-check
Tech
Components library uses a number of open source projects to work properly:
- Typescript - Strongly typed programming language which builds on JavaScript
- NodeJs - Allows execute javascript scripts on the terminal
- Styled-Components - Library to style react components
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
See the contributing guide to learn how to contribute to the repository and the development workflow.
Commits Commits must follow conventional commit format Make sure your messages look like the following examples
feat: Adding new badge component
fix: Touchable component not being exported correctly
fix!: Drop support for Typescript
Note that the last one will generate a Major commit. It has the same result as adding a breaking change footer
Follow Semantic Versioning 2.0.0 to update project version.
Release-It will take care of versioning, you just have to give the correct type to commit:
- fix - to indicate a bug fix (PATCH) ex . v0.0.1
- feat - to indicate a new feature (MINOR) ex. v0.1.0
- chore - for updates that do not require a version bump (.gitignore, comments, etc.)
- docs - for updates to the documentation
- BREAKING CHANGE - regardless of type, indicates a Major release (MAJOR) ex. v1.0.0
Visit Conventional Commits for more examples.
Make a release Run following command after your last commit/amend. Then answer with Y/N the prompt
yarn release
License
MIT
你可能也喜欢
- @2players/dollar1-unistroke-recognizer 中文文档教程
- @44north/toggle-tailwindcss-darkmode 中文文档教程
- @64robots/vue-cli-plugin-tailwind 中文文档教程
- @6river/pubcap 中文文档教程
- @aaronshaf/bs-js 中文文档教程
- @abakermi/towords 中文文档教程
- @abcnews/generator-aunty 中文文档教程
- @abdulghani/release-tag 中文文档教程
- @abovesky/vue-sku-form 中文文档教程
- @absolunet/git-remote-semver 中文文档教程