gaea-editor icon indicating copy to clipboard operation
gaea-editor copied to clipboard

[教程-图文] 关于在Window里面使用WSL(Liunx子系统)来开发gaea-editor

Open jhoneybee opened this issue 6 years ago • 2 comments
trafficstars

环境要求

  • 操作系统 Window 10 19H1或更高版本

开启Window中的liunx子系统功能

  1. 在控制面板-> 程序和功能中开启-子系统功能

image

  1. 在Window商城中下载对应的liunx镜像 - (我这边直接使用的Debian进行开发)

image

安装环境

git 安装命令

sudo apt-get install git 

nodejs 安装

# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
  • https://github.com/nodesource/distributions/blob/master/README.md

下载源码&运行

以上默认已经安装好运行环境

# /mnt/d/ 表示是window下的d盘

cd  /mnt/d/dev/code/github
git clone https://github.com/ascoders/gaea-editor.git
cd gaea-editor 
npm install # 等待下载完成
npm run docs  # window浏览器会自动打开http://127.0.0.1:8000/地址提供预览

用vscode 或者其他编辑器打开d盘的gaea-editor 目录下的文件进行编辑保存即可

jhoneybee avatar Jun 26 '19 09:06 jhoneybee

emmm..
因为我的win系统是ltsb版本 , 没有window store , 装好之后 系统太低 又不让装子系统 .. 所以无奈之下只能去看下 pri 的运行逻辑了 .. SO :

在window下 提供一种更快捷的办法 :

(The second method) :

step 1:
Comment out this line :

image

step 2:
npm run docs

step 3: Repair path parameters ( Beacuse the generated file path is error.)

const DocsWrapper = require('D:\\CodePro\\JS\\gaea-editor\\node_modules\\pri\\built\\built-in-plugins\\command-docs\\plugin\\docs-wrapper')
  .default;

import * as Doc0 from '..\\docs\\basic';
const Doc0Text = require('-!raw-loader!..\\docs\\basic');

image

625781186 avatar Jan 11 '20 19:01 625781186

emmm.. 因为我的win系统是ltsb版本 , 没有window store , 装好之后 系统太低 又不让装子系统 .. 所以无奈之下只能去看下 pri 的运行逻辑了 .. SO :

在window下 提供一种更快捷的办法 :

(The second method) :

step 1: Comment out this line :

image

step 2: npm run docs

step 3: Repair path parameters ( Beacuse the generated file path is error.)

const DocsWrapper = require('D:\\CodePro\\JS\\gaea-editor\\node_modules\\pri\\built\\built-in-plugins\\command-docs\\plugin\\docs-wrapper')
  .default;

import * as Doc0 from '..\\docs\\basic';
const Doc0Text = require('-!raw-loader!..\\docs\\basic');

image

神奇,能不能转成其它的,用这样偏门的,很头疼啊。

GitChenM avatar Mar 16 '21 07:03 GitChenM