Coder Social home page Coder Social logo

dewfall123 / ruabick Goto Github PK

View Code? Open in Web Editor NEW
127.0 3.0 28.0 1.34 MB

Dumi like tool based on vitepress.

Home Page: https://dewfall123.github.io/ruabick/

JavaScript 13.72% Vue 10.86% TypeScript 68.13% CSS 5.07% Less 2.23%
dumi vitepress vitepress-demo document documentation-tool vue3

ruabick's People

Contributors

dewfall123 avatar haiweilian avatar liujinyang9527 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ruabick's Issues

demo 标签,不支持自定义 样式吗?

我传入 style 和 class 都没有在dom上生成,有时候,我想自定义渲染效果区域的背景颜色什么的。


<demo src="./demo/demo.vue" style="background-color: #F1F5F8;" class="test-class" title="Demo 演示1" desc="这是一个 Demo 渲染示例1"></demo>

在在线环境中使用时,无法使用复制

运行在本地复制功能可以正常使用,但是在在线环境中使用时复制功能就会报错,TypeError: Cannot read properties of undefined (reading 'writeText'),查了查应该是浏览器的相关安全协议。
这个可以修改下吗?

api生成文档能否支持tsx

demo

export const props = {
  text: {
    type: String as PropType<string>
  }
}

const Label = defineComponent({
  props: props,
  setup(props) {
    return () => {
      return (
        <div>{props.text}</div>
      )
    }
  }
})

image

copy 的代码是经过转码的

copy 出来的代码是 经过转码的 %3Ctemplate%3E%0A%20%20%3Cdiv%3E%0A%20%20%20%20%3CScTabs%20%3E%0A%20%20%20%20%20%20%3CTabPane%20key%3D%221%22%20tab%3D%22Tab%201%22%20style%3D%22height%3A%20200px%22%3EContent%20of%20Tab%20Pane%201%3C%2FTabPane%3E%0A%20%20%20%20%20%20%3CTabPane%20key%3D%222%22%20tab%3D%22Tab%202%22%20style%3D%22height%3A%20200px%22%3EContent%20of%20Tab%20Pane%202%3C%2FTabPane%3E%0A%20%20%20%20%3C%2FScTabs%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Ftemplate%3E%0A%0A%3Cscript%20setup%20lang%3D%22ts%22%3E%0Aimport%20%7B%20TabPane%20%7D%20from%20'ant-design-vue'%0Aimport%20%7B%20ScTabs%20%7D%20from%20'sc-ui'%0Aimport%20%22ant-design-vue%2Fdist%2Fantd.css%22%0A%3C%2Fscript%3E%0A%0A%3Cstyle%20lang%3D%22less%22%3E%0A%3C%2Fstyle%3E

yarn create @ruabick/vlib 打包问题

vite 配置文件 external: ['vue', ...(packageJson.dependencies || {}), ...(packageJson.peerDependencies || {})]
packageJson 下的这两个key值不存在 打包报错, 去掉的话 打包成功 但是文件夹里没有html。。 这应该怎么部署到服务器上

创建项目直接运行报错

直接通过 yarn create @ruabick/vlib 创建项目,运行 yarn install && yarn dev 报错

[vitepress] Internal server error: At least one <template> or <script> is required in a single file component.
  Plugin: vite:vue
  File: F:/git_workspace/frontend/handwrite/lc-kit/.docs/index.md
      at Object.parse$2 [as parse] (F:\git_workspace\frontend\handwrite\lc-kit\node_modules\@vue\compiler-sfc\dist\compiler-sfc.cjs.js:1275:7)
      at createDescriptor (file:///F:/git_workspace/frontend/handwrite/lc-kit/node_modules/vitepress/node_modules/@vitejs/plugin-vue/dist/index.mjs:71:43)
      at getDescriptor (file:///F:/git_workspace/frontend/handwrite/lc-kit/node_modules/vitepress/node_modules/@vitejs/plugin-vue/dist/index.mjs:97:36)
      at transformMain (file:///F:/git_workspace/frontend/handwrite/lc-kit/node_modules/vitepress/node_modules/@vitejs/plugin-vue/dist/index.mjs:2270:3)
      at TransformContext.transform (file:///F:/git_workspace/frontend/handwrite/lc-kit/node_modules/vitepress/node_modules/@vitejs/plugin-vue/dist/index.mjs:2791:16)
      at Object.transform (file:///F:/git_workspace/frontend/handwrite/lc-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:62)
      at async loadAndTransform (file:///F:/git_workspace/frontend/handwrite/lc-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29)
      at async viteTransformMiddleware (file:///F:/git_workspace/frontend/handwrite/lc-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)

Markdown 标签渲染规则错误

由于 mdit-vue/plugin-component 插件,现在 demo 标签解析为 html_inline ( vitepress>= 1.0.0-alpha.9)。代码中的 md.renderer.rules.html_block 规则未命中。

更换规则类型

const defaultRender = md.renderer.rules.html_inline;
md.renderer.rules.html_inline = (tokens, idx, options, env, self) => {}

或者两种兼容。

const genRule = (rule: string) => {
    const defaultRender = md.renderer.rules[rule];
    md.renderer.rules[rule] =  (tokens, idx, options, env, self) => {}
}

genRule('html_block');
genRule('html_inline');

自定义文档目录 srcDir 为 lib,dev 监听目录尚为 src/**/*.md

现象

"scripts": {
    "dev": "initial-scan --srcDir lib && vitepress dev .docs --host"
  },

执行 pnpm dev

initial-scan 扫描文件正确,但 dev 监听的还是 src/**/*.md
所以当此刻更新lib/**/*.md文件时,站点不会更新,需重新扫描。

期望

@ruabick/vite-plugin-gen-temp 函数 genTemp 支持传递配置项,自定义 srcDir

image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.