Skip to content

Commit

Permalink
release: 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinhui authored Sep 18, 2020
2 parents 6abca6f + 05b932b commit 9b49c56
Show file tree
Hide file tree
Showing 281 changed files with 5,811 additions and 3,904 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +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
quote_type = single

[*.md]
trim_trailing_whitespace = false
25 changes: 11 additions & 14 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# 忽略目录
build/
tests/
demo/
.ice/
def-login-client/

# node 覆盖率文件
coverage/
build
lib
es
dist
tests
demo
node_modules
extensions/*/build/
.ice
def-login-client
coverage/
.vscode-test
packages/*/lib/
packages/*/es/
packages/*/build/
app/main_dist/
app/build/
tmp
.tmp
__mocks__
out
__tests__

# 忽略文件
**/*-min.js
Expand Down
48 changes: 4 additions & 44 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,7 @@
const { eslint, tslint, deepmerge } = require('@ice/spec');

const commonRules = {
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.tsx'] }],
'react/jsx-no-target-blank': [0],
'@typescript-eslint/indent': 0,
'prefer-object-spread': 0,
'max-classes-per-file': 0,
'class-methods-use-this': 0,
};

const jsRules = deepmerge(eslint, {
env: {
jest: true,
},
rules: {
...commonRules,
},
});

const tsRules = deepmerge(tslint, {
env: {
jest: true,
},
module.exports = {
extends: 'eslint-config-ali/typescript/react',
rules: {
...commonRules,
'@typescript-eslint/no-inferrable-types': 1,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/array-type': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/no-parameter-properties': 0,
'no-return-await': 1,
'@typescript-eslint/no-parameter-properties': 1,
},
});

delete tsRules.root;

module.exports = {
...jsRules,
overrides: [
{
...tsRules,
files: ['**/*.ts', '**/*.tsx'],
},
],
};
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: |
npm run setup:packages
npm run lint
npm run prettier
npm run docs:check
npm run dependency:check
npm run test
npm run coverage
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ node_modules
.DS_Store
.eslintcache
.happypack
.vscode
extensions/*/web/.vscode
coverage/
tmp/
.tmp/
Expand Down
12 changes: 7 additions & 5 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { prettier, deepmerge } = require('@ice/spec');

module.exports = deepmerge(prettier, {
printWidth: 120,
});
module.exports = {
printWidth: 100,
tabWidth: 2,
semi: true,
singleQuote: true,
trailingComma: 'all',
};
20 changes: 20 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 忽略目录
build
lib
es
dist
tests
demo
node_modules
.ice
def-login-client
coverage/
.vscode-test
tmp
.tmp
__mocks__
__tests__

# 忽略文件
**/*-min.js
**/*.min.js
3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'stylelint-config-ali',
};
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['ali'],
};
5 changes: 5 additions & 0 deletions extensions/iceworks-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 0.5.0

- feat: Add Iceworks Doctor
- feat: Add welcome page

## 0.4.10

- docs: update text for find component and generate page
Expand Down
11 changes: 10 additions & 1 deletion extensions/iceworks-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Iceworks Application Viewer",
"description": "Quick view your Universal Application(React/Rax/Vue, etc).",
"publisher": "iceworks-team",
"version": "0.4.10",
"version": "0.5.0",
"engines": {
"vscode": "^1.41.0"
},
Expand Down Expand Up @@ -100,6 +100,10 @@
"dark": "assets/dark/setting.svg"
}
},
{
"command": "iceworksApp.welcome.start",
"title": "%iceworksApp.command.welcome.start.title%"
},
{
"command": "iceworksApp.editorMenu.DefPublish",
"title": "%iceworksApp.command.DefPublish.title%",
Expand Down Expand Up @@ -440,6 +444,11 @@
"https://registry.npm.taobao.org"
],
"description": "%iceworksApp.configuration.properties.iceworks.npmRegistry.description%"
},
"iceworks.showWelcomePage": {
"type": "boolean",
"default": true,
"description": "%iceworksApp.configuration.properties.iceworks.showWelcomePage.description%"
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions extensions/iceworks-app/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"iceworksApp.view.components.name": "Components",
"iceworksApp.view.nodeDependencies.name": "Node Dependencies",
"iceworksApp.viewsWelcome.welcome.contents": "To use Iceworks, you need to open or create a application first. \n[Open a Folder](command:vscode.openFolder)\n[Create Application](command:iceworks-project-creator.start)\n[Configuration](command:iceworksApp.configHelper.start)\nRead the [docs](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) to learn more about how to use Iceworks in VS Code.",
"iceworksApp.viewsWelcome.npmScripts.contents": "npm scripts could not be found in package.json.",
"iceworksApp.viewsWelcome.pages.contents": "Pages could not be found.",
"iceworksApp.viewsWelcome.components.contents": "Components could not be found.",
"iceworksApp.viewsWelcome.nodeDependencies.contents": "Node dependencies could not be found in package.json.",
"iceworksApp.viewsWelcome.npmScripts.contents": "npm scripts could not be found in package.json",
"iceworksApp.viewsWelcome.pages.contents": "Pages could not be found",
"iceworksApp.viewsWelcome.components.contents": "Components could not be found",
"iceworksApp.viewsWelcome.nodeDependencies.contents": "Node dependencies could not be found in package.json",
"iceworksApp.command.configHelper.start.title": "Iceworks: Settings",
"iceworksApp.command.welcome.start.title": "Iceworks: Welcome",
"iceworksApp.command.DefPublish.title": "Iceworks: Def Publish",
"iceworksApp.command.quickEntries.start.title": "Start",
"iceworksApp.command.npmScripts.refresh.title": "Refresh",
Expand All @@ -33,5 +34,6 @@
"iceworksApp.command.nodeDependencies.refresh.title": "Refresh",
"iceworksApp.command.nodeDependencies.upgrade.title": "Upgrade Dependency",
"iceworksApp.configuration.properties.iceworks.packageManager.description": "Iceworks npm package manager.",
"iceworksApp.configuration.properties.iceworks.npmRegistry.description": "Iceworks npm registry."
"iceworksApp.configuration.properties.iceworks.npmRegistry.description": "Iceworks npm registry.",
"iceworksApp.configuration.properties.iceworks.showWelcomePage.description": "Show welcome page"
}
12 changes: 7 additions & 5 deletions extensions/iceworks-app/package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"iceworksApp.view.components.name": "组件列表",
"iceworksApp.view.nodeDependencies.name": "依赖列表",
"iceworksApp.viewsWelcome.welcome.contents": "要使用 Iceworks,您需要先打开或创建一个应用。\n[打开文件夹](command:vscode.openFolder)\n[创建应用](command:iceworks-project-creator.start)\n[设置](command:iceworksApp.configHelper.start)\n查看[文档](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks)以学习如何在 VS Code 中如何使用 Iceworks App。",
"iceworksApp.viewsWelcome.npmScripts.contents": "未找到 npm 脚本",
"iceworksApp.viewsWelcome.pages.contents": "未找到页面",
"iceworksApp.viewsWelcome.components.contents": "未找到组件",
"iceworksApp.viewsWelcome.nodeDependencies.contents": "未找到依赖",
"iceworksApp.viewsWelcome.npmScripts.contents": "未找到 npm 脚本",
"iceworksApp.viewsWelcome.pages.contents": "未找到页面",
"iceworksApp.viewsWelcome.components.contents": "未找到组件",
"iceworksApp.viewsWelcome.nodeDependencies.contents": "未找到依赖",
"iceworksApp.command.configHelper.start.title": "Iceworks: 设置",
"iceworksApp.command.welcome.start.title": "Iceworks: 欢迎",
"iceworksApp.command.DefPublish.title": "Iceworks: DEF 发布",
"iceworksApp.command.quickEntries.start.title": "启动",
"iceworksApp.command.npmScripts.refresh.title": "刷新",
Expand All @@ -33,5 +34,6 @@
"iceworksApp.command.nodeDependencies.refresh.title": "刷新",
"iceworksApp.command.nodeDependencies.upgrade.title": "升级依赖",
"iceworksApp.configuration.properties.iceworks.packageManager.description": "Iceworks npm 包管理工具",
"iceworksApp.configuration.properties.iceworks.npmRegistry.description": "Iceworks npm 镜像源"
"iceworksApp.configuration.properties.iceworks.npmRegistry.description": "Iceworks npm 镜像源",
"iceworksApp.configuration.properties.iceworks.showWelcomePage.description": "是否显示欢迎页"
}
4 changes: 2 additions & 2 deletions extensions/iceworks-app/src/commands/executeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export default function executeCommand(command: vscode.Command) {
return;
}

const terminals = vscode.window.terminals;
const { terminals } = vscode.window;

let terminal: Terminal | undefined = terminals.find((terminal: Terminal) => terminal.name === script);
let terminal: Terminal | undefined = terminals.find(({ name }) => name === script);
if (!terminal) {
const terminalOptions: TerminalOptions = { cwd, name: script };
terminal = vscode.window.createTerminal(terminalOptions);
Expand Down
4 changes: 2 additions & 2 deletions extensions/iceworks-app/src/commands/stopCommand.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as vscode from 'vscode';

export default function stopCommand(command: vscode.Command) {
const terminals = vscode.window.terminals;
const { terminals } = vscode.window;
const commandArgs = command.arguments;
if (!commandArgs) {
return;
}
const [cwd, script] = commandArgs;
const [script] = commandArgs;
if (!script) {
return;
}
Expand Down
2 changes: 2 additions & 0 deletions extensions/iceworks-app/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ export const showExtensionsQuickPickCommandId = 'iceworksApp.showEntriesQuickPic

export const editorTitleRunDebugCommandId = 'npmScripts-editor-title-run-dev';
export const editorTitleRunBuildCommandId = 'npmScripts-editor-title-run-build';

export const projectExistsTime = 5;
4 changes: 2 additions & 2 deletions extensions/iceworks-app/src/debugConfig/getDefaultConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function getLaunchConfig(launchUrl?: string): IDebugConfig {
baseUrl: BASE_URL,
startLabel: CONFIG_START_LABEL,
stopLabel: CONFIG_STOP_LABEL,
})
}),
),
};
}
Expand All @@ -87,7 +87,7 @@ export function getTasksConfig(isPegasusProject = false, disableOpen = false): I
isPegasusProject,
startLabel: CONFIG_START_LABEL,
stopLabel: CONFIG_STOP_LABEL,
})
}),
),
};
}
2 changes: 1 addition & 1 deletion extensions/iceworks-app/src/debugConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function writeConfigFile(filePath: string, config: IDebugConfig) {
filePath,
'// See https://github.com/ice-lab/iceworks/blob/master/extensions/iceworks-app/docs/debug.md \n' +
'// for the documentation about the Iceworks debug \n' +
`${JSON.stringify(config, null, ' ')}`
`${JSON.stringify(config, null, ' ')}`,
);
}

Expand Down
Loading

0 comments on commit 9b49c56

Please sign in to comment.