New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ide-model-tree

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ide-model-tree

tree mst model

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

概览

ide-model-tree

安装使用

npm 包方式:

npm install --save ide-model-tree

web 方式:

<script src="https://unpkg.com/ide-model-tree@0.1.2/dist/index.umd.js"></script>

引入之后将会暴露全局变量 ideModelTree.

如果你想要在 webpack 中 external 该库,可以使用以下配置:

{
    externals: {
        "ide-model-tree": {
            "commonjs": "ide-model-tree",
            "commonjs2": "ide-model-tree",
            "amd": "ide-model-tree",
            "root": "ideModelTree"
        }
    }
}

如何本地开发?

本地调试

首先从 git 仓库拉取代码,安装依赖项:

git clone https://github.com/one-gourd/ide-model-tree.git

npm install

## 安装 peerDependencies 依赖包
npm run install:all

运行以下命令后,访问 demo 地址: http://localhost:9000

npm run dev

如果遇到无法启动、报错的情况,将 ide.config.js 中的 proxyLibs 字段注释掉(这字段是方便本地不同组件之间联调的)

也可访问 storybook 参考具体的使用案例:http://localhost:9001/

npm run storybook

[EDITOR_START] P.S. 由于需要依赖 ide-code-editor 仓库比较特别,需要:

  • ide-code-editor 仓库下载到本地
  • 本地运行 npm run build 打出其 dist 目录
  • 开启本地服务器的 9005 端口,推荐使用 http-server

http server [EDITOR_END]

运行测试用例

使用 jest 进行测试,执行:

npm test

打包发布

普通的 npm 发布即可,记得发布前需要手动打包:

npm run build && npm publish

FAQs

Package last updated on 03 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts