Typi 开源项目使用教程

Typi 开源项目使用教程

typiA sass mixin to make responsive typography easy项目地址:https://gitcode.com/gh_mirrors/ty/typi

1. 项目的目录结构及介绍

Typi 项目的目录结构如下:

typi/
├── css/
│   ├── _base.scss
│   ├── _grid.scss
│   ├── _mixins.scss
│   ├── _reset.scss
│   ├── _settings.scss
│   ├── _typography.scss
│   └── main.scss
├── js/
│   └── main.js
├── index.html
├── package.json
└── README.md

目录介绍

  • css/:包含项目的所有样式文件,使用 SCSS 编写。
    • _base.scss:基础样式文件。
    • _grid.scss:网格系统样式文件。
    • _mixins.scss:混合器样式文件。
    • _reset.scss:重置样式文件。
    • _settings.scss:设置样式文件。
    • _typography.scss:排版样式文件。
    • main.scss:主样式文件,导入其他 SCSS 文件。
  • js/:包含项目的 JavaScript 文件。
    • main.js:主 JavaScript 文件。
  • index.html:项目的主 HTML 文件。
  • package.json:项目的依赖管理文件。
  • README.md:项目的说明文档。

2. 项目的启动文件介绍

项目的启动文件是 index.html。这个文件包含了项目的 HTML 结构,并且引入了 css/main.scssjs/main.js 文件。

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Typi</title>
  <link rel="stylesheet" href="css/main.scss">
</head>
<body>
  <script src="js/main.js"></script>
</body>
</html>

3. 项目的配置文件介绍

项目的配置文件是 package.json。这个文件包含了项目的依赖信息、脚本命令和其他元数据。

{
  "name": "typi",
  "version": "3.0.0",
  "description": "Sass mixins and settings for typography.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/zellwk/typi.git"
  },
  "keywords": [
    "typography",
    "sass",
    "scss"
  ],
  "author": "Zell Liew",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/zellwk/typi/issues"
  },
  "homepage": "https://github.com/zellwk/typi#readme"
}

配置文件介绍

  • name:项目名称。
  • version:项目版本。
  • description:项目描述。
  • main:主入口文件。
  • scripts:脚本命令。
  • repository:代码仓库信息。
  • keywords:项目关键词。
  • author:作者信息。
  • license:许可证信息。
  • bugs:问题追踪链接。
  • homepage:项目主页链接。

typiA sass mixin to make responsive typography easy项目地址:https://gitcode.com/gh_mirrors/ty/typi

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夏庭彭Maxine

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值