Skip to content

Commit

Permalink
release: 0.1.7
Browse files Browse the repository at this point in the history
Release: 0.1.7
  • Loading branch information
alvinhui authored Jul 13, 2020
2 parents 5385609 + 2458241 commit 13cb71d
Show file tree
Hide file tree
Showing 98 changed files with 827 additions and 439 deletions.
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Use Iceworks to develop Universal Application quickly:

After installation is successful, click the "Iceworks icon" on Activity Bar of VS Code to start:

![Iceworks](https://img.alicdn.com/tfs/TB1gQcRL4v1gK0jSZFFXXb0sXXa-1024-766.gif)
![Iceworks](https://img.alicdn.com/tfs/TB1kPb5NoT1gK0jSZFrXXcNCXXa-1024-766.gif)

See the [Iceworks Pack](extensions/iceworks/README.md) for more details.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

安装成功后,点击 VS Code 界面左侧活动栏上的「Iceworks 图标」,开始使用:

![Iceworks](https://img.alicdn.com/tfs/TB1gQcRL4v1gK0jSZFFXXb0sXXa-1024-766.gif)
![Iceworks](https://img.alicdn.com/tfs/TB1kPb5NoT1gK0jSZFrXXcNCXXa-1024-766.gif)

查看 [Iceworks Pack](extensions/iceworks/README.md) 阅读更多详细介绍
查看 [Iceworks Pack](extensions/iceworks/README.md) 了解更多功能

## 参与贡献

Expand Down
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.2.0
- feat: install dependencies automatically when node_modules does not exist
- feat: refresh dependencies list、pages list and components list automatically
- feat: support stopping scripts

## 0.1.34

- feat: add Iceworks status bar entry
Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-app/assets/dark/run.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions extensions/iceworks-app/assets/dark/stop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion extensions/iceworks-app/assets/light/run.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions extensions/iceworks-app/assets/light/stop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 44 additions & 17 deletions 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.1.34",
"version": "0.2.0",
"engines": {
"vscode": "^1.41.0"
},
Expand Down Expand Up @@ -90,110 +90,132 @@
"commands": [
{
"command": "iceworksApp.configHelper.start",
"title": "Iceworks: Set Configuration"
"title": "%iceworksApp.command.configHelper.start.title%"
},
{
"command": "iceworksApp.npmScripts.refresh",
"title": "%iceworksApp.npmScripts.refresh.title%",
"title": "%iceworksApp.command.npmScripts.refresh.title%",
"icon": {
"light": "assets/light/refresh.svg",
"dark": "assets/dark/refresh.svg"
}
},
{
"command": "iceworksApp.npmScripts.executeCommand",
"title": "%iceworksApp.npmScripts.executeCommand.title%",
"command": "iceworksApp.npmScripts.run",
"title": "%iceworksApp.command.npmScripts.run.title%",
"icon": {
"light": "assets/light/run.svg",
"dark": "assets/dark/run.svg"
}
},
{
"command": "iceworksApp.npmScripts.stop",
"title": "%iceworksApp.command.npmScripts.stop.title%",
"icon": {
"light": "assets/light/stop.svg",
"dark": "assets/dark/stop.svg"
}
},
{
"command": "iceworksApp.pages.add",
"title": "%iceworksApp.pages.add.title%",
"title": "%iceworksApp.command.pages.add.title%",
"icon": {
"light": "assets/light/add.svg",
"dark": "assets/dark/add.svg"
}
},
{
"command": "iceworksApp.pages.refresh",
"title": "%iceworksApp.pages.refresh.title%",
"title": "%iceworksApp.command.pages.refresh.title%",
"icon": {
"light": "assets/light/refresh.svg",
"dark": "assets/dark/refresh.svg"
}
},
{
"command": "iceworksApp.pages.openFile",
"title": "%iceworksApp.pages.openFile.title%"
"title": "%iceworksApp.command.pages.openFile.title%"
},
{
"command": "iceworksApp.components.add",
"title": "%iceworksApp.components.add.title%",
"title": "%iceworksApp.command.components.add.title%",
"icon": {
"light": "assets/light/add.svg",
"dark": "assets/dark/add.svg"
}
},
{
"command": "iceworksApp.components.refresh",
"title": "%iceworksApp.components.refresh.title%",
"title": "%iceworksApp.command.components.refresh.title%",
"icon": {
"light": "assets/light/refresh.svg",
"dark": "assets/dark/refresh.svg"
}
},
{
"command": "iceworksApp.nodeDependencies.addDepsAndDevDeps",
"title": "%iceworksApp.nodeDependencies.addDepsAndDevDeps.title%",
"title": "%iceworksApp.command.nodeDependencies.addDepsAndDevDeps.title%",
"icon": {
"light": "assets/light/add.svg",
"dark": "assets/dark/add.svg"
}
},
{
"command": "iceworksApp.nodeDependencies.reinstall",
"title": "%iceworksApp.nodeDependencies.reinstall.title%",
"title": "%iceworksApp.command.nodeDependencies.reinstall.title%",
"icon": {
"light": "assets/light/install.svg",
"dark": "assets/dark/install.svg"
}
},
{
"command": "iceworksApp.nodeDependencies.refresh",
"title": "%iceworksApp.nodeDependencies.refresh.title%",
"title": "%iceworksApp.command.nodeDependencies.refresh.title%",
"icon": {
"light": "assets/light/refresh.svg",
"dark": "assets/dark/refresh.svg"
}
},
{
"command": "iceworksApp.nodeDependencies.dependencies.add",
"title": "%iceworksApp.nodeDependencies.dependencies.add.title%",
"title": "%iceworksApp.command.nodeDependencies.dependencies.add.title%",
"icon": {
"light": "assets/light/add.svg",
"dark": "assets/dark/add.svg"
}
},
{
"command": "iceworksApp.nodeDependencies.devDependencies.add",
"title": "%iceworksApp.nodeDependencies.devDependencies.add.title%",
"title": "%iceworksApp.command.nodeDependencies.devDependencies.add.title%",
"icon": {
"light": "assets/light/add.svg",
"dark": "assets/dark/add.svg"
}
},
{
"command": "iceworksApp.nodeDependencies.upgrade",
"title": "%iceworksApp.nodeDependencies.upgrade.title%",
"title": "%iceworksApp.command.nodeDependencies.upgrade.title%",
"icon": {
"light": "assets/light/upgrade.svg",
"dark": "assets/dark/upgrade.svg"
}
}
],
"menus": {
"commandPalette": [
{
"command": "iceworksApp.nodeDependencies.reinstall"
},
{
"command": "iceworksApp.nodeDependencies.dependencies.add"
},
{
"command": "iceworksApp.nodeDependencies.devDependencies.add"
},
{
"command": "iceworksApp.nodeDependencies.addDepsAndDevDeps"
}
],
"view/title": [
{
"command": "iceworksApp.npmScripts.refresh",
Expand Down Expand Up @@ -238,7 +260,12 @@
],
"view/item/context": [
{
"command": "iceworksApp.npmScripts.executeCommand",
"command": "iceworksApp.npmScripts.run",
"when": "view == npmScripts && viewItem == script",
"group": "inline"
},
{
"command": "iceworksApp.npmScripts.stop",
"when": "view == npmScripts && viewItem == script",
"group": "inline"
},
Expand Down
30 changes: 16 additions & 14 deletions extensions/iceworks-app/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@
"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.npmScripts.refresh.title": "Refresh",
"iceworksApp.npmScripts.executeCommand.title": "Run",
"iceworksApp.pages.add.title": "Add Pages",
"iceworksApp.pages.refresh.title": "Refresh",
"iceworksApp.pages.openFile.title": "Open File",
"iceworksApp.components.add.title": "Add Components",
"iceworksApp.components.refresh.title": "Refresh",
"iceworksApp.nodeDependencies.addDepsAndDevDeps.title": "Add Dependencies",
"iceworksApp.nodeDependencies.dependencies.add.title": "Add Dependency",
"iceworksApp.nodeDependencies.devDependencies.add.title": "Add DevDependency",
"iceworksApp.nodeDependencies.reinstall.title": "Reinstall Dependencies",
"iceworksApp.nodeDependencies.refresh.title": "Refresh",
"iceworksApp.nodeDependencies.upgrade.title": "Upgrade Dependency",
"iceworksApp.command.configHelper.start.title": "Iceworks: Set Configuration",
"iceworksApp.command.npmScripts.refresh.title": "Refresh",
"iceworksApp.command.npmScripts.run.title": "Run Script",
"iceworksApp.command.npmScripts.stop.title": "Stop Script",
"iceworksApp.command.pages.add.title": "Add Pages",
"iceworksApp.command.pages.refresh.title": "Refresh",
"iceworksApp.command.pages.openFile.title": "Open File",
"iceworksApp.command.components.add.title": "Add Components",
"iceworksApp.command.components.refresh.title": "Refresh",
"iceworksApp.command.nodeDependencies.addDepsAndDevDeps.title": "Iceworks: Add Dependencies",
"iceworksApp.command.nodeDependencies.dependencies.add.title": "Iceworks: Add Dependency",
"iceworksApp.command.nodeDependencies.devDependencies.add.title": "Iceworks: Add DevDependency",
"iceworksApp.command.nodeDependencies.reinstall.title": "Iceworks: Reinstall Dependencies",
"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."
}
}
38 changes: 20 additions & 18 deletions extensions/iceworks-app/package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
"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.npmScripts.refresh.title": "刷新",
"iceworksApp.npmScripts.executeCommand.title": "运行",
"iceworksApp.pages.add.title": "添加页面",
"iceworksApp.pages.refresh.title": "刷新",
"iceworksApp.pages.openFile.title": "打开文件",
"iceworksApp.components.add.title": "添加组件",
"iceworksApp.components.refresh.title": "刷新",
"iceworksApp.nodeDependencies.addDepsAndDevDeps.title": "添加依赖",
"iceworksApp.nodeDependencies.dependencies.add.title": "添加dependency",
"iceworksApp.nodeDependencies.devDependencies.add.title": "添加devDependency",
"iceworksApp.nodeDependencies.reinstall.title": "重装依赖",
"iceworksApp.nodeDependencies.refresh.title": "刷新",
"iceworksApp.nodeDependencies.upgrade.title": "升级依赖",
"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.npmScripts.refresh.title": "刷新",
"iceworksApp.command.npmScripts.run.title": "运行脚本",
"iceworksApp.command.npmScripts.stop.title": "停止脚本",
"iceworksApp.command.pages.add.title": "添加页面",
"iceworksApp.command.pages.refresh.title": "刷新",
"iceworksApp.command.pages.openFile.title": "打开文件",
"iceworksApp.command.components.add.title": "添加组件",
"iceworksApp.command.components.refresh.title": "刷新",
"iceworksApp.command.nodeDependencies.addDepsAndDevDeps.title": "Iceworks: 添加依赖",
"iceworksApp.command.nodeDependencies.dependencies.add.title": "Iceworks: 添加 dependency",
"iceworksApp.command.nodeDependencies.devDependencies.add.title": "Iceworks: 添加 devDependency",
"iceworksApp.command.nodeDependencies.reinstall.title": "Iceworks: 重装依赖",
"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 镜像源"
}
}
28 changes: 28 additions & 0 deletions extensions/iceworks-app/src/commands/executeCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as vscode from 'vscode';
import { Terminal, TerminalOptions } from 'vscode';
import { ITerminalMap } from '../types';

export default function executeCommand(terminalMapping: ITerminalMap, script: vscode.Command, id?: string) {
if (!script.arguments) {
return;
}
const args = script.arguments;
const [cwd, command] = args;
if (!command) {
return;
}

const terminalId = id || command;
let terminal: Terminal;

if (terminalMapping.has(terminalId)) {
terminal = terminalMapping.get(terminalId)!;
} else {
const terminalOptions: TerminalOptions = { cwd, name: command };
terminal = vscode.window.createTerminal(terminalOptions);
terminalMapping.set(terminalId, terminal);
}

terminal.show();
terminal.sendText(command);
}
9 changes: 9 additions & 0 deletions extensions/iceworks-app/src/commands/stopCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { ITerminalMap } from '../types';

export default function stopCommand(terminalMapping: ITerminalMap, scriptId: string) {
const currentTerminal = terminalMapping.get(scriptId);
if (currentTerminal) {
currentTerminal.dispose();
terminalMapping.delete(scriptId);
}
}
2 changes: 2 additions & 0 deletions extensions/iceworks-app/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ export const nodeDepTypes: NodeDepTypes[] = [
'dependencies',
'devDependencies'
];

export const showExtensionsQuickPickCommandId = 'iceworksApp.showExtensionsQuickPick';
13 changes: 8 additions & 5 deletions extensions/iceworks-app/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import { createComponentsTreeProvider } from './views/componentsView';
import { createPagesTreeProvider } from './views/pagesView';
import { ITerminalMap } from './types';
import services from './services';
import { createStatusBarItem, openCommandPaletteCommandId, registerOpenCommandPalette } from './createStatusBarItem';
import { showExtensionsQuickPickCommandId } from './constants';
import showExtensionsQuickPick from './quickPicks/showExtensionsQuickPick';
import createExtensionsStatusBar from './statusBar/createExtensionsStatusBar';

// eslint-disable-next-line
const { name, version } = require('../package.json');
Expand All @@ -27,9 +29,9 @@ export async function activate(context: vscode.ExtensionContext) {
initExtension(context);

// init statusBarItem
const statusBarItem = createStatusBarItem();
subscriptions.push(vscode.commands.registerCommand(openCommandPaletteCommandId, registerOpenCommandPalette));
subscriptions.push(statusBarItem);
const extensionsStatusBar = createExtensionsStatusBar();
subscriptions.push(vscode.commands.registerCommand(showExtensionsQuickPickCommandId, showExtensionsQuickPick));
subscriptions.push(extensionsStatusBar);
// init webview
function activeWebview() {
const webviewPanel: vscode.WebviewPanel = window.createWebviewPanel('iceworks', '设置 - Iceworks', ViewColumn.One, {
Expand All @@ -54,8 +56,9 @@ export async function activate(context: vscode.ExtensionContext) {
const projectType = await getProjectType();
const isNotTargetProject = projectType === 'unknown';
vscode.commands.executeCommand('setContext', 'iceworks:isNotTargetProject', isNotTargetProject);
if (isNotTargetProject)
if (isNotTargetProject) {
vscode.commands.executeCommand('iceworks-project-creator.start');
}
} catch (e) {
vscode.commands.executeCommand('setContext', 'iceworks:isNotTargetProject', true);
vscode.commands.executeCommand('iceworks-project-creator.start');
Expand Down
Loading

0 comments on commit 13cb71d

Please sign in to comment.