wscode-prettify

为 Web Studio Cdoe 提供的通用代码着色插件


Keywords
web stuido code, prettify
License
MIT
Install
npm install wscode-prettify@0.1.0

Documentation

prettify - 为 Web Studio Cdoe 提供的通用代码着色插件

downloads install size CDN Version License

如何引入

首先,需要引入,你可以选择使用script标签引入:

<script src="https://cdn.jsdelivr.net/npm/wscode-prettify"></script>

上面的方式引入以后,通过prettify即可使用。当然,你也可以通过npm的方式引入:

npm install --save wscode-prettify

安装好了以后,在需要的地方引入即可:

import prettify from 'wscode-prettify';

如何使用

当然是给Web Studio Code使用:

new WSCode({

    // 编辑器挂载点
    el: document.getElementById('wscode'),

    // 着色方法
    shader: prettify

});

开源协议

MIT

Copyright (c) 2020 走一步 再走一步