@advanced-rest-client/markdown-styles

中文文档
3.1.5发布于 2021/04/20Apache-2.0ESM + CJS近 30 天下载 3255

Element that displays response documentation for RAML

此软件包已被标记为弃用

This project is deprecated. Migrate to @advanced-rest-client/highlight

原始使用文档
文档目录5 节
  1. Usage
  2. Installation
  3. In a LitElement
  4. In a Polymer 3 element
  5. Development

Markdown styles set for API components

The styles are applied to the element with [slot="markdown-html"] attribute.

Published on NPM

Usage

Installation

npm install --save @advanced-rest-client/markdown-styles

In a LitElement

import { LitElement, html, css } from 'lit-element';
import markdownStyles from '@advanced-rest-client/markdown-styles/markdown-styles.js';

class MarkdownImpl extends LitElement {
  static get styles() {
    return [
      css`
        :host {
          ...
        }`
      ,
      markdownStyles
    ],
  }

  render() {
    return html`
    <marked-element markdown="....">
      <div slot="markdown-html"></div>
    </marked-element>`;
  }
}

In a Polymer 3 element

Note, Polymer styles are deprecated and will be removed.

import {PolymerElement, html} from '@polymer/polymer';
import '@advanced-rest-client/markdown-styles/markdown-styles-polymer.js';

class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <style include="markdown-styles"></style>
    <marked-element markdown="...">
      <div slot="markdown-html"></div>
    </marked-element>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Note, the element does not include Polymer library.

Development

git clone https://github.com/advanced-rest-client/markdown-styles
cd markdown-styles
npm install

版本与发布记录

@advanced-rest-client/markdown-styles 共发布 9 个版本,首次发布于 2019/02/19;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.1.5latest2021/04/205 年前
3.1.42021/03/085 年前
3.1.32020/10/026 年前
3.1.22020/03/266 年前
3.1.12019/12/036 年前
3.1.02019/06/157 年前

关于 @advanced-rest-client/markdown-styles 的常见问题

@advanced-rest-client/markdown-styles 是什么?

Element that displays response documentation for RAML注意:该包已被作者标记为弃用——This project is deprecated. Migrate to @advanced-rest-client/highlight

如何安装 @advanced-rest-client/markdown-styles?

在项目目录运行 npm install @advanced-rest-client/markdown-styles,或使用 pnpm add / yarn add / bun add。

@advanced-rest-client/markdown-styles 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/advanced-rest-client__markdown-styles 是否存在。

@advanced-rest-client/markdown-styles 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@advanced-rest-client/markdown-styles 可以商用吗?

@advanced-rest-client/markdown-styles 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@advanced-rest-client/markdown-styles 的下载量有多少?

根据 npm 官方下载统计,@advanced-rest-client/markdown-styles 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,255 次,日均约 109 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@advanced-rest-client/markdown-styles 还在维护吗?

最新版本 3.1.5 发布于 2021/04/20(5 年前);至今共发布 9 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/02/19。作者已将其标记为弃用,新项目建议寻找替代方案。