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

feat: init react-markdown-lowcode-materials #1

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
registry=http://dev-npm.tenxcloud.net/
strict-peer-dependencies=false
always-auth=true
always-auth=true
auto-install-peers=true
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "ISC",
"scripts": {
"dev:antd": "pnpm --filter '*-antd' dev",
"dev:markdown": "pnpm --filter 'react-markdown-*' lowcode:dev",
"lint-staged": "lint-staged",
"prepare": "husky install",
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
103 changes: 103 additions & 0 deletions packages/react-markdown-lowcode-materials/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
.DS_Store

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
yarn.lock
# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# special demo file for locally reappear issue
docs/**/demo/issues.md

precss.css
.sass-cache/
scripts/server-remote
__html/
umd/
es/
lib/
lowcode_es/
lowcode_lib/
types/
demos/
!scripts/demos/
/platform
build/
test/coverage/
test/**/coverage/
mochawesome-report/
coverage/
gemini-report/
.idea/
.vscode/
*.iml
.tea/
/platform/
react/
platform/
dist/
_docs_/
doc.json
meet-react/
miniapp-preview/
.tmp/

.umi/
.umi-production/
12 changes: 12 additions & 0 deletions packages/react-markdown-lowcode-materials/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @yunti/react-markdown-lowcode-materials

Low-code Materials for react-markdown

## API


| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
| ------ | ---- | ---- | ---- | ------ | ---- |
| children | - | false | string | - | - |

[更多参考 react-markdown](https://github.com/remarkjs/react-markdown)
17 changes: 17 additions & 0 deletions packages/react-markdown-lowcode-materials/build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"library": "YuntiReactMarkdownLowcodeMaterials",
"plugins": [
"build-plugin-component",
"build-plugin-fusion",
[
"build-plugin-moment-locales",
{
"locales": ["zh-cn"]
}
]
],
"externals": {
"react": "React",
"lodash": "_"
}
}
23 changes: 23 additions & 0 deletions packages/react-markdown-lowcode-materials/build.lowcode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const { library } = require('./build.json');

module.exports = {
alias: {
'@': './src',
},
plugins: [
[
'@alifd/build-plugin-lowcode',
{
noParse: true,
library,
engineScope: "@alilc",
lowcodeDir: "lowcode", // 低码描述文件夹
entryPath: "src/index.js", // 组件入口文件
npmInfo: {
package: "@yunti/react-markdown-lowcode-materials", // 包名
version: "0.1.0",
},
},
],
],
};
26 changes: 26 additions & 0 deletions packages/react-markdown-lowcode-materials/demo/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Simple Usage
order: 1
---

本 Demo 演示 Markdown 的用法。

```jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Markdown from '@yunti/react-markdown-lowcode-materials';

class App extends Component {
render() {
return (
<div>
<Markdown>
### 标题
</Markdown>
</div>
);
}
}

ReactDOM.render(<App />, mountNode);
```
Loading