Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

从仓库Issues区提炼出来的跑demo步骤【2024613版】: #140

Open
unarelax opened this issue Jun 13, 2024 · 5 comments
Open

从仓库Issues区提炼出来的跑demo步骤【2024613版】: #140

unarelax opened this issue Jun 13, 2024 · 5 comments

Comments

@unarelax
Copy link

1、本地必须安装:git,npm

2、git clone https://github.com/wechat-miniprogram/miniprogram-demo.git

注:默认根目录为:miniprogram-demo,后续操作全部在根目录执行,miniprogram那个子目录看起来很诱惑,但不需要在这个或其他任何子目录做任何操作或执行命令;

3、微信开发者工具 小程序->导入,导入目录为根目录 ,appID使用测试号,导入后不出意外必定报错,先不管

4、打开根目录下的package.json,将"@tencent/eslint-config-wxapp": "^0.5.2" 改为 "eslint-config-wxapp": "^1.0.0"

5、打开根目录下的.gitmodules,将[submodule "miniprogram/packageSkylineExamples"]项的 url=xxx 那行改为 url = https://github.com/wechat-miniprogram/awesome-skyline.git

6、根目录下执行命令 npm install --legacy-peer-deps

7、根目录下执行命令 npm run init --legacy-peer-dep

8、开发者工具 工具->构建npm

@ewwerpm
Copy link

ewwerpm commented Jun 19, 2024

这么好的操作指南,为什么不放到主页呢?另外,还要加一句:如果 第7步(npm run init --legacy-peer-dep)报错的话,修改 .git文件夹下的config文件,类似这样:
[submodule "miniprogram/packageSkylineExamples"]
active = true
url = https://github.com/wechat-miniprogram/awesome-skyline.git
参考:https://blog.csdn.net/Gherbirthday0916/article/details/124391918

@halegreen
Copy link

npm install --legacy-peer-deps 这一步执行了很久是正常的么

@zzwwaq
Copy link

zzwwaq commented Oct 1, 2024

npm install --legacy-peer-deps 这一步执行了很久是正常的么

npm config set registry https://registry.npmmirror.com

切换至国内镜像源

@Johnwjl
Copy link

Johnwjl commented Oct 14, 2024

参考您的第4点 package.json 修改 eslint-config-wxapp,我已经提交了PR,
https://github.com/wechat-miniprogram/miniprogram-demo/pull/152/files
@unarelax

@SuperBaBa
Copy link

答疑解惑之良方,太赞了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants