Markdown Table 项目使用文档
markdown-tableGenerate a markdown (GFM) table项目地址:https://gitcode.com/gh_mirrors/ma/markdown-table
1. 项目的目录结构及介绍
Markdown Table 项目的目录结构相对简单,主要包含以下几个部分:
markdown-table/
├── index.js
├── LICENSE
├── package.json
├── readme.md
└── test/
├── index.js
└── util.js
目录结构介绍
index.js
: 项目的主入口文件。LICENSE
: 项目的许可证文件。package.json
: 项目的配置文件,包含依赖、脚本等信息。readme.md
: 项目的说明文档。test/
: 包含项目的测试文件。index.js
: 测试主文件。util.js
: 测试辅助文件。
2. 项目的启动文件介绍
项目的启动文件是 index.js
,该文件主要负责导出 Markdown Table 的核心功能。以下是 index.js
的主要内容:
module.exports = require('./lib/markdown-table')
该文件通过 require
引入了 lib/markdown-table
模块,并将其导出,以便其他模块可以使用。
3. 项目的配置文件介绍
项目的配置文件是 package.json
,该文件包含了项目的基本信息、依赖、脚本等重要配置。以下是 package.json
的部分内容:
{
"name": "markdown-table",
"version": "2.0.0",
"description": "Generate a markdown (GFM) table",
"license": "MIT",
"repository": "wooorm/markdown-table",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"main": "index.js",
"files": [
"lib/"
],
"keywords": [
"unified",
"remark",
"markdown",
"mdast",
"mdast-util",
"util",
"utility",
"markdown",
"table",
"gfm",
"generate",
"create"
],
"dependencies": {
"repeat-string": "^1.0.0"
},
"devDependencies": {
"browserify": "^16.0.0",
"nyc": "^15.0.0",
"prettier": "^2.0.0",
"remark-cli": "^8.0.0",
"remark-preset-wooorm": "^7.0.0",
"tape": "^5.0.0",
"tinyify": "^3.0.0",
"xo": "^0.33.0"
},
"scripts": {
"build": "npm run build-bundle && npm run build-mangle",
"build-bundle": "browserify index.js --global-transform tinyify --plugin tinyify --outfile markdown-table.js",
"build-mangle": "browserify index.js --global-transform tinyify --plugin tinyify --plugin [esmangle esmangle-plugin] --outfile markdown-table.min.js",
"format": "remark . -qfo && prettier . --write && xo --fix",
"test": "npm run test-coverage && npm run test-types",
"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"
},
"remarkConfig": {
"plugins": [
"preset-wooorm"
]
},
markdown-tableGenerate a markdown (GFM) table项目地址:https://gitcode.com/gh_mirrors/ma/markdown-table