-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e6af5b
commit c06b363
Showing
102 changed files
with
6,645 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { defineConfig } from 'dumi'; | ||
import path from 'path'; | ||
|
||
export default defineConfig({ | ||
outputPath: 'docs-dist', | ||
themeConfig: { | ||
name: 'opensumi-module-libro', | ||
}, | ||
theme: { | ||
'@s-content-width': '100%', //https://github.com/umijs/dumi/blob/31fd13cd8cbf52a1ac00275078e3b93934c3d1cf/src/client/theme-default/styles/variables.less#L3 | ||
}, | ||
alias: { | ||
modules: path.resolve(__dirname, 'modules'), | ||
}, | ||
extraBabelPlugins: [ | ||
['@babel/plugin-proposal-decorators', { legacy: true }], | ||
['@babel/plugin-transform-flow-strip-types', { allowDeclareFields: true }], | ||
['@babel/plugin-transform-class-properties', { loose: true }], | ||
['@babel/plugin-transform-private-methods', { loose: true }], | ||
['@babel/plugin-transform-private-property-in-object', { loose: true }], | ||
'babel-plugin-parameter-decorator', | ||
], | ||
mfsu: false, | ||
define: { | ||
'process.env.WORKSPACE_DIR': path.join(process.cwd(), 'example'), | ||
'process.env.EXTENSION_DIR': path.join(process.cwd(), 'extensions'), | ||
}, | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
modules/**/* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: require.resolve('@umijs/lint/dist/config/eslint'), | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export default { | ||
platform: 'browser', | ||
esm: { | ||
output: 'es', | ||
}, | ||
cjs: { | ||
output: 'lib', | ||
}, | ||
extraBabelPlugins: [ | ||
['@babel/plugin-proposal-decorators', { legacy: true }], | ||
['@babel/plugin-transform-flow-strip-types'], | ||
['@babel/plugin-transform-class-properties', { loose: true }], | ||
['@babel/plugin-transform-private-methods', { loose: true }], | ||
['@babel/plugin-transform-private-property-in-object', { loose: true }], | ||
['babel-plugin-parameter-decorator'], | ||
], | ||
extraBabelPresets: [ | ||
['@babel/preset-typescript', { onlyRemoveTypeImports: true }], | ||
], | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx commitlint --edit "${1}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
16 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# registry=https://registry.npmmirror.com |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/dist | ||
*.yaml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
pluginSearchDirs: false, | ||
plugins: [ | ||
require.resolve('prettier-plugin-organize-imports'), | ||
require.resolve('prettier-plugin-packagejson'), | ||
], | ||
printWidth: 80, | ||
proseWrap: 'never', | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
overrides: [ | ||
{ | ||
files: '*.md', | ||
options: { | ||
proseWrap: 'preserve', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
modules/**/*.less |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@umijs/lint/dist/config/stylelint" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", // Attach 模式 | ||
"name": "Attach to Extension Host", | ||
"port": 9889, // 插件进程端口,不可修改 | ||
"skipFiles": ["<node_internals>/**"], | ||
"sourceMaps": true, // 开启 SourceMap,便于源码映射 | ||
"outFiles": ["extensions/ryannz.datavisor/dist/*/.js"] // 指定插件代码输出目录 | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) [email protected] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# @difizen/opensumi-module-libro | ||
|
||
[](https://npmjs.org/package/@difizen/opensumi-module-libro) | ||
[](https://npmjs.org/package/@difizen/opensumi-module-libro) | ||
|
||
Use Libro as default notebook editor in Opensumi IDE | ||
|
||
 | ||
|
||
 | ||
|
||
## Usage | ||
|
||
see [opensumi-libro-demo](./example/src/browser/render-app.ts) | ||
|
||
## Development | ||
|
||
```bash | ||
# install dependencies | ||
$ npm install | ||
|
||
# start server | ||
$ npm run start:opensumi | ||
|
||
# start demo, visit http://localhost:9000 | ||
$ npm run dev | ||
|
||
``` | ||
|
||
## LICENSE | ||
|
||
MIT |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a guide example. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
hero: | ||
title: library | ||
description: libro on opensumi | ||
actions: | ||
- text: Hello | ||
link: / | ||
- text: World | ||
link: / | ||
features: | ||
- title: Hello | ||
emoji: 💎 | ||
description: Put hello description here | ||
- title: World | ||
emoji: 🌈 | ||
description: Put world description here | ||
- title: '!' | ||
emoji: 🚀 | ||
description: Put ! description here | ||
--- | ||
|
||
@difizen/opensumi-module-libro |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## libro | ||
|
||
<!-- <code src="./app.tsx" 配置项="值"></code> --> | ||
|
||
```jsx | ||
import React from 'react'; | ||
import { useEffect } from 'react'; | ||
import { startApp } from '../../example/src/browser'; | ||
|
||
export default () => { | ||
useEffect(() => { | ||
startApp(); | ||
}, []); | ||
return <div id="main" style={{ height: '100vh' }}></div>; | ||
}; | ||
``` |
9 changes: 9 additions & 0 deletions
9
opensumi-module-libro/example/configs/docker/productionDependencies.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"dependencies": { | ||
"nsfw": "1.2.7", | ||
"node-pty": "0.9.0", | ||
"spdlog": "0.9.0", | ||
"vscode-ripgrep": "1.3.1", | ||
"keytar": "^7.7.0" | ||
} | ||
} |
Oops, something went wrong.