Skip to content

Commit

Permalink
Merge branch 'dev' of ssh://gitlab.prod.dtstack.cn:10022/dt-insight-f…
Browse files Browse the repository at this point in the history
…ront/infrastructure/molecule into feat/collapse
  • Loading branch information
zhangtengjin committed Nov 13, 2020
2 parents 454f8c6 + 9acdbde commit 7f33aee
Show file tree
Hide file tree
Showing 122 changed files with 3,675 additions and 3,479 deletions.
46 changes: 25 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
module.exports = {
'env': {
'browser': true,
'es6': true,
env: {
browser: true,
es6: true,
},
'extends': [
extends: [
'plugin:react/recommended',
'google',
'prettier',
'prettier/react',
],
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
'__DEVELOPMENT__': 'readonly',
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
__DEVELOPMENT__: 'readonly',
},
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaFeatures': {
'jsx': true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
'ecmaVersion': 11,
'sourceType': 'module',
ecmaVersion: 11,
sourceType: 'module',
},
'plugins': [
'react',
'@typescript-eslint',
],
'rules': {
'indent': ['error', 4],
plugins: ['react', '@typescript-eslint'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'object-curly-spacing': ['error', 'always'],
'max-len': ['error', { 'ignoreComments': true }, { 'code': 180 }],
'max-len': ['error', { ignoreComments: true }, { code: 180 }],
'require-jsdoc': 0,
'valid-jsdoc': 0,
'no-unused-vars': 0,
'no-invalid-this': 0,
},
};
75 changes: 38 additions & 37 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
# Read more: https://docs.gitlab.com/12.7/ee/ci/yaml/README.html

cache:
paths:
- .npm/

before_script:
- npm ci --cache .npm --prefer-offline

stages:
- eslint
- check-types
- lint-docs
- test
- release

static-check:
stage: eslint
script:
- npm run eslint
- npm run check-types
only:
- merge_requests
- .yarn
- node_modules/

before_script:
- yarn install --cache-folder .yarn

docs-check:
stage: lint-docs
script:
- npm run lint-doc
stages:
- static-checking
- type-checking
# - test
- build

static-checking:
stage: static-checking
script:
- yarn eslint
- yarn prettier
- yarn stylelint
only:
- /doc(s)|release|master/
- merge_requests
- dev

test:
stage: test
script:
- npm run test
type-checking:
stage: type-checking
script:
- yarn check-types
only:
- merge_requests
- dev
- merge_requests
- dev

# test:
# stage: test
# script:
# - yarn test
# only:
# - merge_requests
# - dev

release:
stage: release
script:
- npm run release
build:
stage: build
script:
- yarn build
only:
- master

- dev
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore artifacts:
dist
.history
node_modules
yarn.lock
coverage
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"singleQuote": true
}
12 changes: 6 additions & 6 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const path = require("path");
const path = require('path');
const { merge } = require('webpack-merge');
const baseConf = require('../build/webpack.base');

module.exports = {
stories: ["../stories/**/*.stories.tsx"],
addons: ["@storybook/addon-actions", "@storybook/addon-links"],
webpackFinal: async (config) => {
return merge(config, baseConf);
},
stories: ['../stories/**/*.stories.tsx'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
webpackFinal: async (config) => {
return merge(config, baseConf);
},
};
12 changes: 6 additions & 6 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "stylelint-config-sass-guidelines",
"rules": {
"indentation": 4,
"scss/dollar-variable-pattern": null,
"max-nesting-depth": 4
}
"extends": "stylelint-config-sass-guidelines",
"rules": {
"indentation": 4,
"scss/dollar-variable-pattern": null,
"max-nesting-depth": 4
}
}
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"git.ignoreLimitWarning": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true
"source.fixAll.eslint": true,
"source.fixAll.markdownlint": false
}
}
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ yarn dev

### Reference

- ARIA: [Accessible Rich Internet Applications](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA)
- [VS Code Extension](https://code.visualstudio.com/api/get-started/your-first-extension)
<https://code.visualstudio.com/api>
<https://medium.com/dev-genius/reactjs-manage-your-state-nicely-with-context-1ed3090a6a46>
- ARIA: [Accessible Rich Internet Applications](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA)
- [VS Code Extension](https://code.visualstudio.com/api/get-started/your-first-extension)
<https://code.visualstudio.com/api>
<https://medium.com/dev-genius/reactjs-manage-your-state-nicely-with-context-1ed3090a6a46>
5 changes: 0 additions & 5 deletions NOTE.md

This file was deleted.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ A Web IDE UI library built by React.js, inspired by VSCode.

## Goals

- Free customize IDE by Assemble React components
- Allow you create features by extension
- Alow Users customize settings
- Support internationalization, default includes zhCN, English
- Support alter keybinding
- Free customize IDE by Assemble React components
- Allow you create features by extension
- Alow Users customize settings
- Support internationalization, default includes zhCN, English
- Support alter keybinding

## Root Directory

Unify the root path name from **molecule** to **mo**.

## vscode codicons online address
## References

<https://microsoft.github.io/vscode-codicons/dist/codicon.html>
- [vscode codicons online address](https://microsoft.github.io/vscode-codicons/dist/codicon.html)
6 changes: 2 additions & 4 deletions build/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ const { merge } = require('webpack-merge');
const HtmlWebPackPlugin = require('html-webpack-plugin');
const webpackConf = require('./webpack.base');

module.exports = function(env) {
module.exports = function (env) {
return merge(webpackConf, {
devtool: 'inline-source-map',
devServer: {
progress: false,
hot: true,
port: 8888,
},
entry: [
path.resolve(__dirname, './web/app.js'),
],
entry: [path.resolve(__dirname, './web/app.js')],
module: {
rules: [
{
Expand Down
6 changes: 1 addition & 5 deletions build/web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ const App = () => (
</React.StrictMode>
);

ReactDOM.render(
<App />,
document.getElementById('root'),
);

ReactDOM.render(<App />, document.getElementById('root'));
16 changes: 8 additions & 8 deletions build/web/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Molecule Sample</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
<head>
<meta charset="utf-8" />
<title>Molecule Sample</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
6 changes: 4 additions & 2 deletions build/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
resolve: {
extensions: ['.js', '.jsx', '.tsx', '.ts'],
alias: {
'mo': path.resolve(__dirname, '../src'),
mo: path.resolve(__dirname, '../src'),
'@stories': path.resolve(__dirname, '../stories'),
},
},
Expand All @@ -32,7 +32,9 @@ module.exports = {
},
// Optional
{
loader: require.resolve('react-docgen-typescript-loader'),
loader: require.resolve(
'react-docgen-typescript-loader'
),
},
],
},
Expand Down
5 changes: 5 additions & 0 deletions docs/NOTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Note

- Workbench layout need more thinking
- Optimize the load method of extension
- Import IOC for manage services?
Loading

0 comments on commit 7f33aee

Please sign in to comment.