From a6c45b8a6100dd61ab251fd855b9fb0159621393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=96=E4=BA=96=E4=BC=8D?= Date: Mon, 8 Jun 2020 19:16:00 +0800 Subject: [PATCH 1/2] Update README.md add Quick Start --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index dd51bc0..a6e7f94 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,21 @@ It's very useful for showing a mind map on any web pages. Like a blog post, a bo XMind Viewer is an official project, made by XMind team, and written in TypeScript. +## Quick Start + +```bash +git clone https://github.com/xmindltd/xmind-viewer.git +cd xmind-viewer +# install project dependencies +npm install --registry=https://registry.npm.taobao.org +# install parcel +npm install -g parcel --registry=https://registry.npm.taobao.org +# run +parcel example\index.html +# build +# npm install cssnano --registry=https://registry.npm.taobao.org +# parcel build example\index.html +``` ## Usage and Getting Started From 8e3ade8654638075c3f1e57f67e8a5e7be2daf61 Mon Sep 17 00:00:00 2001 From: gsw945 Date: Thu, 6 May 2021 12:05:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A0=B9=E6=8D=AEXMind=E6=96=87=E4=BB=B6ur?= =?UTF-8?q?l=EF=BC=8C=E5=9C=A8=E7=BA=BF=E6=B5=8F=E8=A7=88=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .babelrc | 21 +++++++ README.md | 10 ++- example/index.html | 8 ++- example/index.ts | 149 +++++++++++++++++++++++++++++++++++++-------- package.json | 6 ++ tsconfig.json | 2 +- 6 files changed, 163 insertions(+), 33 deletions(-) create mode 100644 .babelrc diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..fe141a2 --- /dev/null +++ b/.babelrc @@ -0,0 +1,21 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "chrome": "53", + "ie": "11" + }, + "useBuiltIns": "entry", + "corejs": 3 + } + ] + ], + "ignore": [ + "dist/**" + ], + "plugins": [ + "@babel/plugin-transform-classes" + ] +} \ No newline at end of file diff --git a/README.md b/README.md index a6e7f94..4b9087e 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,16 @@ cd xmind-viewer # install project dependencies npm install --registry=https://registry.npm.taobao.org # install parcel -npm install -g parcel --registry=https://registry.npm.taobao.org +npm install --save-dev cssnano @babel/preset-env @babel/core --registry=https://registry.npm.taobao.org +npm install -g parcel --registry=https://registry.npm.taobao.org +npm install core-js@3 @babel/polyfill @babel/plugin-transform-classes --save --registry=https://registry.npm.taobao.org # run -parcel example\index.html +parcel --port 8989 --log-level 4 --target browser example\index.html # build -# npm install cssnano --registry=https://registry.npm.taobao.org # parcel build example\index.html +# parcel build --log-level 4 --target browser --public-url . example\index.html +# 参数解释 +# - --public-url .: 资源引用,使用相对路径 ``` ## Usage and Getting Started diff --git a/example/index.html b/example/index.html index a7c0f91..9aceb22 100644 --- a/example/index.html +++ b/example/index.html @@ -1,8 +1,9 @@ + - + XMind Viewer v1.0.0