Skip to content

Commit

Permalink
release: 0.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinhui authored Nov 25, 2020
2 parents aee6813 + 08f96d1 commit 0a78a29
Show file tree
Hide file tree
Showing 144 changed files with 3,998 additions and 662 deletions.
1 change: 1 addition & 0 deletions extensions/iceworks-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- fix: material sources edit form dialog will disappear before error
- fix: material sources list display order
- feat: add create custom scaffold entry

## 0.5.7

Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-app/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"iceworksApp.view.pages.name": "Pages",
"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.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.create-project.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",
Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-app/package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"iceworksApp.view.pages.name": "页面列表",
"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.welcome.contents": "要使用 Iceworks,您需要先打开或创建一个应用。\n[打开文件夹](command:vscode.openFolder)\n[创建应用](command:iceworks-project-creator.create-project.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": "未找到组件",
Expand Down
6 changes: 4 additions & 2 deletions extensions/iceworks-app/src/locales/en-US.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extension.iceworksApp.showEntriesQuickPick.projectCreater.label": "Create Application",
"extension.iceworksApp.showEntriesQuickPick.projectCreater.detail": "Create a Universal Application(React/Rax/Vue, etc) quickly",
"extension.iceworksApp.showEntriesQuickPick.projectCreator.label": "Select Scaffold to Create Application",
"extension.iceworksApp.showEntriesQuickPick.projectCreator.detail": "Select Scaffold to Create a Universal Application(React/Rax/Vue, etc) quickly",
"extension.iceworksApp.showEntriesQuickPick.customScaffold.label": "Configure Scaffold to Create Application",
"extension.iceworksApp.showEntriesQuickPick.customScaffold.detail": "Configure Scaffold to Create React Application",
"extension.iceworksApp.showEntriesQuickPick.generatePage.label": "Generate Page by Blocks",
"extension.iceworksApp.showEntriesQuickPick.generatePage.detail": "Generate pages by block assembly",
"extension.iceworksApp.showEntriesQuickPick.createPage.label": "Generate Page by Configuration",
Expand Down
6 changes: 4 additions & 2 deletions extensions/iceworks-app/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extension.iceworksApp.showEntriesQuickPick.projectCreater.label": "创建应用",
"extension.iceworksApp.showEntriesQuickPick.projectCreater.detail": "快速创建多端应用(例如:React/Rax/Vue...)",
"extension.iceworksApp.showEntriesQuickPick.projectCreator.label": "选择模板创建应用",
"extension.iceworksApp.showEntriesQuickPick.projectCreator.detail": "选择模板快速创建多端应用(例如:React/Rax/Vue...)",
"extension.iceworksApp.showEntriesQuickPick.customScaffold.label": "配置模板创建应用",
"extension.iceworksApp.showEntriesQuickPick.customScaffold.detail": "配置模板快速创建 React 应用",
"extension.iceworksApp.showEntriesQuickPick.generatePage.label": "使用区块组装页面",
"extension.iceworksApp.showEntriesQuickPick.generatePage.detail": "通过区块组装的方式生成页面",
"extension.iceworksApp.showEntriesQuickPick.createPage.label": "使用模板生成页面",
Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-app/src/utils/autoStart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async function (context: vscode.ExtensionContext) {
const { globalState } = context;
const isNotTargetProject = await checkIsNotTarget();
if (isNotTargetProject) {
vscode.commands.executeCommand('iceworks-project-creator.start');
vscode.commands.executeCommand('iceworks-project-creator.create-project.start');
} else if (!globalState.get(didShowWelcomePageStateKey) && !globalState.get(didShowWelcomePageBySidebarStateKey)) {
vscode.commands.executeCommand('iceworksApp.welcome.start');
globalState.update(didShowWelcomePageBySidebarStateKey, true);
Expand Down
11 changes: 8 additions & 3 deletions extensions/iceworks-app/src/utils/getQuickEntryOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ import i18n from '../i18n';

const entries = [
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.projectCreater.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.projectCreater.detail'),
command: 'iceworks-project-creator.start',
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.projectCreator.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.projectCreator.detail'),
command: 'iceworks-project-creator.create-project.start',
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.customScaffold.label'),
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.customScaffold.detail'),
command: 'iceworks-project-creator.custom-scaffold.start',
},
{
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.openDashboard.label'),
Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-project-creator/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
web/**
node_modules
!node_modules/prettier
!node_modules/@iceworks/code-generator
!node_modules/@iceworks/code-generator
1 change: 1 addition & 0 deletions extensions/iceworks-project-creator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# 0.3.18

- refactor: material source card
- feat: add custom scaffold

# 0.3.17

Expand Down
21 changes: 18 additions & 3 deletions extensions/iceworks-project-creator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,38 @@ English | [简体中文](https://github.com/ice-lab/iceworks/blob/master/extensi

Create a Universal Application(React/Rax/Vue, etc) quickly.

## Usage
## Select Scaffold Create Application

### Activate Extension

![demo](https://user-images.githubusercontent.com/56879942/88181928-1e927f00-cc62-11ea-94fb-06d12dab77d1.gif)

1. Open vscode command palette through `Ctrl+Shift+P` or `⇧⌘P`.
2. Enter `Iceworks: create Application` to activate the extension.
2. Enter `Iceworks: Select Scaffold to Create Application` to activate the extension.

### Create a new application
### Usage

![demo](https://user-images.githubusercontent.com/56879942/88175435-6f9d7580-cc58-11ea-8a88-f74a5ab4f674.gif)

1. Select a scaffold.
2. Input your application information.
3. Create your application and open application automatically.

## Configure Scaffold to Create Application

### Activate Extension

1. Open vscode command palette through `Ctrl+Shift+P` or `⇧⌘P`.
2. Enter `Iceworks: Configure Scaffold to Create Application` to activate the extension.

### Usage

![usage](https://user-images.githubusercontent.com/44047106/98786993-de862080-2439-11eb-8c93-cb69afda78dd.gif)

1. Click the configuration button on the right to select the layout configuration, layout style and other configurations, and you can preview it in the page.
2. Input your application information.
3. Create your application and open application automatically.

## More

This Extension power by [Iceworks Team](https://marketplace.visualstudio.com/publishers/iceworks-team), it's part of the Iceworks, see [Iceworks](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) to know more features.
21 changes: 18 additions & 3 deletions extensions/iceworks-project-creator/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,38 @@

快速创建多端应用(例如:React/Rax/Vue...)

## 功能
## 选择模板创建应用

### 激活

![使用示例](https://user-images.githubusercontent.com/56879942/87621232-e61b0e80-c752-11ea-852c-77bb164d2dab.gif)

1. 通过 `⇧⌘P``Ctrl+Shift+P` 快捷键唤醒命令面板
2. 输入 `Iceworks: createApplication` 激活插件
2. 输入 `Iceworks: Select Scaffold to Create Application` 激活插件

### 创建应用
### 使用

![使用示例](https://user-images.githubusercontent.com/56879942/87621825-41013580-c754-11ea-8da8-e49e71397d08.gif)

1. 选择模板
2. 输入应用信息
3. 创建应用并自动打开应用

## 配置模板创建应用

### 激活

1. 通过 `⇧⌘P``Ctrl+Shift+P` 快捷键唤醒命令面板
2. 输入 `Iceworks: Configure Scaffold to Create Application` 激活插件

### 使用

1. 点击右侧配置按钮,选择布局配置、布局风格等配置,支持在页面中查看效果
2. 输入应用信息
3. 创建应用并自动打开应用

![usage](https://user-images.githubusercontent.com/44047106/98786993-de862080-2439-11eb-8c93-cb69afda78dd.gif)

## 更多

本插件由 [Iceworks Team](https://marketplace.visualstudio.com/publishers/iceworks-team) 开发,是 Iceworks 套件的一部分,访问 [Iceworks](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) 获取更多功能。
14 changes: 10 additions & 4 deletions extensions/iceworks-project-creator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@
],
"icon": "assets/logo.png",
"activationEvents": [
"onCommand:iceworks-project-creator.start",
"onCommand:iceworks-project-creator.create-project.start",
"onCommand:iceworks-project-creator.custom-scaffold.start",
"onStartupFinished"
],
"main": "./build/extension.js",
"contributes": {
"commands": [
{
"command": "iceworks-project-creator.start",
"title": "%iceworksProjectCreator.commands.start.title%"
"command": "iceworks-project-creator.create-project.start",
"title": "%iceworksProjectCreator.create-project.commands.start.title%"
},
{
"command": "iceworks-project-creator.custom-scaffold.start",
"title": "%iceworksProjectCreator.custom-scaffold.commands.start.title%"
}
],
"configuration": {
Expand Down Expand Up @@ -95,7 +100,8 @@
"@iceworks/pegasus-service": "^0.1.2",
"@iceworks/project-service": "^0.1.4",
"@iceworks/recorder": "^0.1.6",
"@iceworks/vscode-webview": "^0.1.1"
"@iceworks/vscode-webview": "^0.1.1",
"js-base64": "^3.6.0"
},
"homepage": "https://github.com/ice-lab/iceworks/blob/master/extensions/iceworks-project-creator/README.md",
"bugs": {
Expand Down
3 changes: 2 additions & 1 deletion extensions/iceworks-project-creator/package.nls.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"iceworksProjectCreator.commands.start.title": "Iceworks: Create Application"
"iceworksProjectCreator.create-project.commands.start.title": "Iceworks: Select Scaffold to Create Application",
"iceworksProjectCreator.custom-scaffold.commands.start.title": "Iceworks: Configure Scaffold to Create Application"
}
3 changes: 2 additions & 1 deletion extensions/iceworks-project-creator/package.nls.zh-cn.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"iceworksProjectCreator.commands.start.title": "Iceworks: 创建应用"
"iceworksProjectCreator.create-project.commands.start.title": "Iceworks: 选择模板创建应用",
"iceworksProjectCreator.custom-scaffold.commands.start.title": "Iceworks: 配置模板创建应用"
}
80 changes: 67 additions & 13 deletions extensions/iceworks-project-creator/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connectService, getHtmlForWebview } from '@iceworks/vscode-webview/lib/
import { initExtension, registerCommand } from '@iceworks/common-service';
import { Recorder } from '@iceworks/recorder';
import services from './services/index';
import { Base64 } from 'js-base64';
import i18n from './i18n';

// eslint-disable-next-line
Expand All @@ -17,44 +18,97 @@ export function activate(context: vscode.ExtensionContext) {
// auto set configuration
initExtension(context, name);

let webviewPanel: vscode.WebviewPanel | undefined;
let projectCreatorwebviewPanel: vscode.WebviewPanel | undefined;

function activeWebview() {
function activeProjectCreatorWebview() {
recorder.recordActivate();

if (webviewPanel) {
webviewPanel.reveal();
if (projectCreatorwebviewPanel) {
projectCreatorwebviewPanel.reveal();
} else {
webviewPanel = window.createWebviewPanel(
projectCreatorwebviewPanel = window.createWebviewPanel(
'iceworks',
i18n.format('extension.iceworksProjectCreator.extension.webViewTitle'),
i18n.format('extension.iceworksProjectCreator.createProject.webViewTitle'),
ViewColumn.One,
{
enableScripts: true,
retainContextWhenHidden: true,
},
);
webviewPanel.webview.html = getHtmlForWebview(extensionPath, 'createproject');
webviewPanel.onDidDispose(
projectCreatorwebviewPanel.webview.html = getHtmlForWebview(extensionPath, 'createproject', false);
projectCreatorwebviewPanel.onDidDispose(
() => {
webviewPanel = undefined;
projectCreatorwebviewPanel = undefined;
},
null,
context.subscriptions,
);
connectService(webviewPanel, context, { services, recorder });
connectService(projectCreatorwebviewPanel, context, { services, recorder });
}
}

subscriptions.push(
registerCommand('iceworks-project-creator.start', () => {
activeWebview();
registerCommand('iceworks-project-creator.create-project.start', () => {
activeProjectCreatorWebview();
}),
);

let customScaffoldWebviewPanel: vscode.WebviewPanel | undefined;

function activeCustomScaffoldWebview() {
recorder.recordActivate();

if (customScaffoldWebviewPanel) {
customScaffoldWebviewPanel.reveal();
} else {
customScaffoldWebviewPanel = window.createWebviewPanel(
'iceworks',
i18n.format('extension.iceworksProjectCreator.customScaffold.webViewTitle'),
ViewColumn.One,
{
enableScripts: true,
retainContextWhenHidden: true,
},
);
const extraScaffoldTemplateHtml = `
<style>
body {
background-color: #fff;
color: #000;
margin: 0;
}
</style>
`;

const iframeContent = getHtmlForWebview(extensionPath, 'scaffoldtemplate', false, undefined, extraScaffoldTemplateHtml, (resourceUrl) => {
return customScaffoldWebviewPanel!.webview.asWebviewUri(vscode.Uri.file(resourceUrl));
});
const extraCustomScaffoldHtml = `
<script>
window.iframeContent = '${Base64.encode(iframeContent)}'
</script>
`;
customScaffoldWebviewPanel.webview.html = getHtmlForWebview(extensionPath, 'customscaffold', false, undefined, extraCustomScaffoldHtml);
customScaffoldWebviewPanel.onDidDispose(
() => {
customScaffoldWebviewPanel = undefined;
},
null,
context.subscriptions,
);
connectService(customScaffoldWebviewPanel, context, { services, recorder });
}
}

subscriptions.push(
registerCommand('iceworks-project-creator.custom-scaffold.start', () => {
activeCustomScaffoldWebview();
}),
);

const stateKey = 'iceworks.projectCreator.autoActivedWebview';
if (!globalState.get(stateKey)) {
activeWebview();
activeProjectCreatorWebview();
globalState.update(stateKey, true);
}
}
Expand Down
3 changes: 2 additions & 1 deletion extensions/iceworks-project-creator/src/locales/en-US.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extension.iceworksProjectCreator.extension.webViewTitle": "Create Project - Iceworks"
"extension.iceworksProjectCreator.createProject.webViewTitle": "Create Project - Iceworks",
"extension.iceworksProjectCreator.customScaffold.webViewTitle": "Custom Scaffold - Iceworks"
}
3 changes: 2 additions & 1 deletion extensions/iceworks-project-creator/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extension.iceworksProjectCreator.extension.webViewTitle": "创建应用 - Iceworks"
"extension.iceworksProjectCreator.createProject.webViewTitle": "创建应用 - Iceworks",
"extension.iceworksProjectCreator.customScaffold.webViewTitle": "自定义模板 - Iceworks"
}
11 changes: 9 additions & 2 deletions extensions/iceworks-project-creator/web/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
{
"themePackage": [
{
"name": "@alifd/theme-iceworks-dark"
"name": "@alifd/theme-iceworks-dark",
"default": true
},
{
"name": "@alifd/theme-design-pro",
"default": true
}
]
}
Expand All @@ -30,5 +35,7 @@
}
],
"./build.plugin.js"
]
],
"mpa": true,
"vendor": false
}
2 changes: 1 addition & 1 deletion extensions/iceworks-project-creator/web/build.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module.exports = ({ onGetWebpackConfig }) => {
config.plugin('DefinePlugin').tap(([args]) => {
return [{ ...args, ...defineVariables }];
});
config.node.set('fs', 'empty');
config.node.set('fs', 'empty').set('net', 'empty').set('tls', 'empty');
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
false
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"/User/workspace/"
Loading

0 comments on commit 0a78a29

Please sign in to comment.