开源项目 emphasize 使用教程

开源项目 emphasize 使用教程

emphasizeANSI syntax highlighting for the terminal项目地址:https://gitcode.com/gh_mirrors/em/emphasize

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

emphasize/
├── LICENSE
├── README.md
├── bin/
│   └── emphasize.js
├── index.js
├── package.json
└── test/
    └── index.js
  • LICENSE: 项目许可证文件。
  • README.md: 项目说明文档。
  • bin/: 包含可执行文件的目录。
    • emphasize.js: 项目的启动文件。
  • index.js: 项目的主入口文件。
  • package.json: 项目的配置文件。
  • test/: 包含测试文件的目录。
    • index.js: 测试文件。

2. 项目的启动文件介绍

项目的启动文件位于 bin/emphasize.js。该文件是项目的可执行文件,负责启动和运行项目。

3. 项目的配置文件介绍

项目的配置文件是 package.json。该文件包含了项目的基本信息、依赖项、脚本命令等配置。

{
  "name": "emphasize",
  "version": "4.0.0",
  "description": "Safe high-level text highlighting",
  "license": "MIT",
  "keywords": [
    "text",
    "highlight",
    "highlighting",
    "emphasis",
    "emphasize"
  ],
  "repository": "wooorm/emphasize",
  "bugs": "https://github.com/wooorm/emphasize/issues",
  "funding": {
    "type": "github",
    "url": "https://github.com/sponsors/wooorm"
  },
  "author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
  "contributors": [
    "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
  ],
  "files": [
    "bin/emphasize.js",
    "index.js"
  ],
  "bin": {
    "emphasize": "bin/emphasize.js"
  },
  "dependencies": {
    "escape-string-regexp": "^1.0.0",
    "meow": "^5.0.0"
  },
  "devDependencies": {
    "browserify": "^16.0.0",
    "nyc": "^14.0.0",
    "prettier": "^1.0.0",
    "remark-cli": "^7.0.0",
    "remark-preset-wooorm": "^6.0.0",
    "tape": "^4.0.0",
    "tinyify": "^2.0.0",
    "xo": "^0.25.0"
  },
  "scripts": {
    "build-bundle": "browserify index.js -s emphasize -o emphasize.js",
    "build-mangle": "browserify index.js -s emphasize -p tinyify -o emphasize.min.js",
    "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
    "test-api": "node test",
    "test-coverage": "nyc --reporter lcov tape test.js"
  },
  "nyc": {
    "check-coverage": true,
    "lines": 100,
    "functions": 100,
    "branches": 100
  },
  "prettier": {
    "tabWidth": 2,
    "useTabs": false,
    "singleQuote": true,
    "bracketSpacing": false,
    "semi": false,
    "trailingComma": "none"
  },
  "xo": {
    "prettier": true,
    "esnext": false,
    "rules": {
      "unicorn/prefer-module": "off"
    },
    "ignores": [
      "emphasize.js",
      "emphasize.min.js"
    ]
  },
  "remarkConfig": {
    "plugins": [
      "preset-wooorm"
    ]
  }
}

emphasizeANSI syntax highlighting for the terminal项目地址:https://gitcode.com/gh_mirrors/em/emphasize

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

褚铃尤Kerwin

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

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

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

打赏作者

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

抵扣说明:

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

余额充值