feat: 使用 express 作为本地静态服务器,简化编译过程,预览更舒服#216
Merged
EryouHao merged 4 commits intogetgridea:masterfrom Jul 26, 2019
gaoliang:feature/local_static_server
Merged
feat: 使用 express 作为本地静态服务器,简化编译过程,预览更舒服#216EryouHao merged 4 commits intogetgridea:masterfrom gaoliang:feature/local_static_server
EryouHao merged 4 commits intogetgridea:masterfrom
gaoliang:feature/local_static_server
Conversation
Member
|
使用了一下,感觉体验确实提升了很多。 在想基于此,做一下应用内的预览和文章编辑时的博客文章详情页的实时预览显示,如果你有好的实现思路也欢迎 PR 或找我讨论。 我会等待你的回复,若无进一步开发计划,我将合并 |
Contributor
Author
|
下面几个点我想实现的还没开始做,你可以评估下要不要做 1. 端口问题现在端口是直接硬编码的,可能会有端口冲突,应该改成自动寻找未被占用的端口,或者支持用户修改预览端口。 2. 菜单路由问题菜单路由在配置过域名之后,会保存带部署域名的绝对路径,导致现在预览时发生跳转错误
3. 预览按钮的作用在 app 内的不同页面点击预览,应该跳转到对应的预览页面, 比如在编辑文章时,点击预览,应该跳转到对应的文章的界面。在标签页面,点击时,应该跳转到对应的标签页面 @EryouHao |
Member
我记得之前加过你来着,加我 wx 沟通吧 |
Member
|
好像还是更改源文件夹后再次预览并没有更新 |
Contributor
Author
现在应该可以了 |
Contributor
Author
|
更改源文件夹不会把原来文件夹里的内容复制到新的文件夹吗? |
Member
是的,这个并不会带过去,更改源文件夹相当于切换到一个新的博客 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

使用 express 在 localhost 起一个静态的 http 服务器,替代之前的 file 协议预览
作用
${mode === 'preview' ? 'index.html' : ''}希望能采纳。