@fleet.co/tarmac

中文文档
3.16.14发布于 2026/07/02MITTypeScriptES Module近 30 天下载 4889

Tarmac : Fleet.co Design System

原始使用文档
文档目录8 节
  1. List of components
  2. Install
  3. Use local version in your project
  4. Use example
  5. Publish a new version
  6. Usage
  7. Troubleshooting
  8. License

Tarmac : Fleet Design System

NPM JavaScript Style Guide





Tarmac is fleet.co's Design System.
It is based on create-react-library, styled-components.



List of components

  • Modal ({Modal})
  • Confirmation Modal : yes or no modals ({ConfirmationModal})
  • Alert : alert message, mainly used in modals ({Alert})
  • Switch/Toggle ({Switch})
  • Label ({Label})
  • Line : grey line to separate items ({Line})
  • Title ({Title})

Ongoing development : Button ({Button}), , Input



Install

npm install @fleet.co/tarmac



Use local version in your project

First, make a local copy of this repo and reach to its folder with your IDE.
Run command

npm build

This will create a dist folder. Reach to it with your IDE and run command

npm link

Now reach to your project's folder and run

npm link @fleet.co/tarmac

In your project's folder, navigate to your node_modules/react folder then

npm link

Go back to the Design System folder and

npm link react

This will create 2 symlinks to use your local DS in your local project. Now launch your design system and your project

npm run start



Use example

To ease the new components creation, you will find an example project within the Design System itself.
To launch it, navigate to your DS folder/example and write

npm run start

In the App.js file in the example folder, call your newly created components as described in "Usage" section.



Publish a new version

To publish the new version of your DS to npm, run

npm run publish-package

This will create a new build, patch the current version, publish to npm and push changes to master.
If everything went smoothly, you will see the following message in your IDE : "Design System successfully updated to X.X.X"

Wait for the new version to be released on npm, then go back to your project's folder and install it

npm i @fleet.co/tarmac



Usage

import React from 'react'

import { MyComponent } from '@fleet.co/tarmac'

const myPage = () => {
  return <MyComponent />
}



Troubleshooting

In case you're facing issue at installing the DS locally, please make sure no process is currently running in both your project and the DS. If so, kill them all and try the "use locally" procedure again.
You may also have to delete your node_modules folders in both your project and the DS. Then reinstall all packages in both folders and try the "use locally" procedure again.
If you get an error related to React Hooks after launching your project, it is probably related to the fact you have two different instance of React running in your project and in the DS (ie your symlink didn't work). Kill all process, redo the react symlink and start again.



License

MIT © @fleet.co

版本与发布记录

@fleet.co/tarmac 共发布 443 个版本,首次发布于 2021/01/25;过去 12 个月发布了 11 个版本。

版本发布日期距今
3.16.14latest2026/07/024 个月前
3.16.132026/07/024 个月前
3.16.122026/07/024 个月前
3.16.102026/07/024 个月前
3.16.82026/07/014 个月前
3.16.62026/06/264 个月前

关于 @fleet.co/tarmac 的常见问题

@fleet.co/tarmac 是什么?

Tarmac : Fleet.co Design System

如何安装 @fleet.co/tarmac?

在项目目录运行 npm install @fleet.co/tarmac,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@emotion/react(^11.8.1)、@emotion/styled(^11.11.0)、@mui/material(^5.15.0)、@mui/system(^5.15.3)、@mui/x-date-pickers-pro(^6.18.5)、@mui/x-license-pro(^6.10.2)、react(18.3.1)、react-dom(18.3.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@fleet.co/tarmac 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fleet.co/tarmac 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@fleet.co/tarmac 可以商用吗?

@fleet.co/tarmac 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fleet.co/tarmac 的下载量有多少?

根据 npm 官方下载统计,@fleet.co/tarmac 在 2026/10/15 – 2026/11/13 这 30 天内被下载 4,889 次,日均约 163 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fleet.co/tarmac 还在维护吗?

最新版本 3.16.14 发布于 2026/07/02(4 个月前);至今共发布 443 个版本,其中过去 12 个月发布了 11 个;首次发布于 2021/01/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。