Skip to content

Commit

Permalink
Merge pull request #932 from appworks-lab/release/1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GiveMe-A-Name committed Aug 12, 2021
2 parents eae3d02 + 0b70061 commit 50f2664
Show file tree
Hide file tree
Showing 43 changed files with 642 additions and 47 deletions.
9 changes: 7 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ const { getESLintConfig } = require('@iceworks/spec');

// getESLintConfig(rule: 'rax'|'react'|'vue', customConfig?);
module.exports = getESLintConfig('react-ts', {
parserOptions: {
project: [],
createDefaultProgram: false,
},
rules: {
'@typescript-eslint/dot-notation': 0,
'@typescript-eslint/restrict-plus-operands': 0,
'@typescript-eslint/member-delimiter-style': 1,
'max-len': 1,
'import/no-cycle': 1,
'@typescript-eslint/dot-notation': 1,
'@typescript-eslint/consistent-type-assertions': 1,
'@typescript-eslint/brace-style': 1,
'no-redeclare': 1,
},
});
});
7 changes: 7 additions & 0 deletions extensions/appworks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [1.4.0](https://github.com/appworks-lab/appworks/releases/tag/v1.4.0)

- feat: add React Generator [#933](https://github.com/appworks-lab/appworks/pull/933)
- fix: windows get empty files [#937](https://github.com/appworks-lab/appworks/pull/937)
- fix: ast parser error [#934](https://github.com/appworks-lab/appworks/pull/934)
- fix: README docs link [#930](https://github.com/appworks-lab/appworks/pull/930) [#931](https://github.com/appworks-lab/appworks/pull/931)

## [1.3.1](https://github.com/appworks-lab/appworks/releases/tag/v1.3.1)

- feat: update doctor codemod report [#920](https://github.com/appworks-lab/appworks/pull/920)
Expand Down
2 changes: 1 addition & 1 deletion extensions/appworks/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/iceworks/README.zh-CN.md)
English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/appworks/README.zh-CN.md)

# AppWorks

Expand Down
2 changes: 1 addition & 1 deletion extensions/appworks/README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/iceworks/README.md)
简体中文 | [English](https://github.com/appworks-lab/appworks/blob/master/extensions/appworks/README.md)

# AppWorks

Expand Down
3 changes: 2 additions & 1 deletion extensions/appworks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "AppWorks",
"description": "Application Development Pack, provide visualization and intelligent technology to build Universal Application faster and better, support Web / H5 / MiniProgram(小程序) Application.",
"publisher": "iceworks-team",
"version": "1.3.1",
"version": "1.4.0",
"engines": {
"vscode": "^1.41.0"
},
Expand Down Expand Up @@ -41,6 +41,7 @@
"iceworks-team.iceworks-time-master",
"iceworks-team.iceworks-codemod",
"iceworks-team.iceworks-refactor",
"iceworks-team.iceworks-generator",
"eamodio.gitlens",
"streetsidesoftware.code-spell-checker",
"dbaeumer.vscode-eslint",
Expand Down
4 changes: 4 additions & 0 deletions extensions/doctor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log


# 1.1.5

- fix: windows get empty files
# 1.1.4

- fix: codemod 100 score show result
Expand Down
2 changes: 1 addition & 1 deletion extensions/doctor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Doctor",
"description": "A free security and quality audit tool for modern DevOps teams",
"publisher": "iceworks-team",
"version": "1.1.4",
"version": "1.1.5",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
5 changes: 5 additions & 0 deletions extensions/material-helper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 1.0.9

- feat: change auto fill code to React Generator extension.
- fix: the code in the editor is incomplete will cause the AST parser error.

## 1.0.8

- fix: update code snippets, the snippet - mtop.[request | config] => mtop[Request | Config]
Expand Down
15 changes: 1 addition & 14 deletions extensions/material-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Component Helper",
"description": "Easily use Component in React/Vue/Rax.",
"publisher": "iceworks-team",
"version": "1.0.8",
"version": "1.0.9",
"main": "./build/extension.js",
"engines": {
"vscode": "^1.41.0"
Expand Down Expand Up @@ -265,18 +265,6 @@
"description": "%iceworksMaterialHelper.configuration.openInBrowserDescription%",
"title": "Open Doc Link Inside VSCode"
},
"appworks.autoCreateIndexFile": {
"type": "boolean",
"default": true,
"description": "%iceworksMaterialHelper.configuration.autoCreateIndexFile.description%",
"title": "%iceworksMaterialHelper.configuration.autoCreateIndexFile.title%"
},
"appworks.autoFillComponentCode": {
"type": "boolean",
"default": true,
"description": "%iceworksMaterialHelper.configuration.autoFillComponentCode.description%",
"title": "%iceworksMaterialHelper.configuration.autoFillComponentCode.title%"
},
"appworks.materialSources": {
"type": "array",
"description": "%iceworksMaterialHelper.configuration.properties.appworks.materialSources.description%",
Expand Down Expand Up @@ -368,7 +356,6 @@
"@types/babel-traverse": "^6.25.5",
"@types/node": "^12.11.7",
"@types/vscode": "^1.41.0",
"copy-webpack-plugin": "^6.0.0",
"ts-loader": "^7.0.5",
"typescript": "^3.6.4",
"webpack": "^4.44.2",
Expand Down
2 changes: 0 additions & 2 deletions extensions/material-helper/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { autoSetContext as autoSetContextByProject } from '@appworks/project-ser
import { ICEWORKS_ICON_PATH } from '@appworks/constant';
import services from './services/index';
import propsAutoComplete from './propsAutoComplete';
import autoFillContent from './autoFillContent';
import i18n from './i18n';
import registerComponentDocSupport from './componentDocSupport';
import recorder from './utils/recorder';
Expand Down Expand Up @@ -122,7 +121,6 @@ export function activate(context: vscode.ExtensionContext) {
propsAutoComplete();
mtopAutoComplete();
registerComponentDocSupport();
autoFillContent();

// views
createComponentsTreeView(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default (doc: vscode.TextDocument): Set<string> => {
const ast = parse(documentText, {
sourceType: 'module',
plugins: getBabelParserPlugins('jsx'),
errorRecovery: true,
});
traverse(ast, {
ImportDeclaration(path: NodePath<ImportDeclaration>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default (code: string, uri: vscode.Uri): string => {
const ast = parse(code, {
sourceType: 'module',
plugins: getBabelParserPlugins('jsx'),
errorRecovery: true,
});

const propTypesDependentName = getImportDependentName(ast, 'prop-types');
Expand Down
17 changes: 0 additions & 17 deletions extensions/material-helper/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');

const tsConfigPath = path.join(__dirname, 'tsconfig.json');
const destPath = path.resolve(__dirname, 'build');
Expand Down Expand Up @@ -40,22 +39,6 @@ const config = {
},
],
},
plugins: [
new CopyPlugin({
patterns: [
{
from: 'src/templates/*.ejs',
globOptions: {
gitignore: true,
},
to() {
return `${destPath }/[name].[ext]`;
},
},
],
options: { concurrency: 10 },
}),
],
};

module.exports = (env, argv) => {
Expand Down
5 changes: 5 additions & 0 deletions extensions/react-generator/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"eamodio.tsl-problem-matcher"
]
}
32 changes: 32 additions & 0 deletions extensions/react-generator/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// 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": [
{
"name": "Debug Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/build/*.js"],
"preLaunchTask": "npm: watch:extension"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/build/__tests__/suite/index"
],
"outFiles": [
"${workspaceFolder}/build/__tests__/**/*.js"
],
"preLaunchTask": "npm: watch",
"console": "integratedTerminal"
}
]
}
30 changes: 30 additions & 0 deletions extensions/react-generator/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch:extension",
"problemMatcher": [
"$ts-webpack",
"$ts-webpack-watch"
],
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": "build"
},
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": "build"
}
]
}
10 changes: 10 additions & 0 deletions extensions/react-generator/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
**/tsconfig.json
**/*.map
**/*.ts
web/**
node_modules/**
!node_modules/prettier
5 changes: 5 additions & 0 deletions extensions/react-generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Change Log

## 1.0.0

Release 1.0.0
36 changes: 36 additions & 0 deletions extensions/react-generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# React Generator

English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/react-generator/README.zh-CN.md)

[![Version for VS Code Extension](https://vsmarketplacebadge.apphb.com/version-short/iceworks-team.iceworks-generator.svg?logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-generator)
[![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks-generator.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-generator)
[![Rating](https://vsmarketplacebadge.apphb.com/rating-short/iceworks-team.iceworks-generator.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-generator)
[![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)

## Usage

### Generate typescript code

Convert json object to typescript interfaces

![img](https://img.alicdn.com/imgextra/i3/O1CN01ldVoDI1vlbSLpMtid_!!6000000006213-1-tps-1080-705.gif)

### Generate styles code

Generate dark mode styles (Right Click in a directory or a CSS File Editor, choose `AppWorks: add dark mode media query to css files`.)

![img](https://img.alicdn.com/imgextra/i3/O1CN017C7Cw91pUlC3XS7Zj_!!6000000005364-1-tps-1080-601.gif)

### Generate boilerplate code when create file

* Generate page components
* Generate common components
* Generate module and store files

![img](https://img.alicdn.com/imgextra/i3/O1CN01qwQZYb1nE9bQT6qZb_!!6000000005057-1-tps-960-677.gif)

![img](https://img.alicdn.com/imgextra/i4/O1CN01lIMHws1NlQMXVjtWs_!!6000000001610-1-tps-960-677.gif)

## More

This Extension power by [AppWorks Team](https://marketplace.visualstudio.com/publishers/iceworks-team), it's part of the AppWorks, see [AppWorks](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) to know more features.
36 changes: 36 additions & 0 deletions extensions/react-generator/README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# React 代码生成器

English | [简体中文](https://github.com/appworks-lab/appworks/blob/master/extensions/react-generator/README.zh-CN.md)

[![Version for VS Code Extension](https://vsmarketplacebadge.apphb.com/version-short/iceworks-team.iceworks-generator.svg?logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-generator)
[![Installs](https://vsmarketplacebadge.apphb.com/installs-short/iceworks-team.iceworks-generator.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-generator)
[![Rating](https://vsmarketplacebadge.apphb.com/rating-short/iceworks-team.iceworks-generator.svg)](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks-generator)
[![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)

## 使用

### 生成 typescript 代码

通过 JSON 生成 typescript interface 文件

![img](https://img.alicdn.com/imgextra/i3/O1CN01ldVoDI1vlbSLpMtid_!!6000000006213-1-tps-1080-705.gif)

### 生成样式代码

生成 dark mode 代码(在 css 文件或目录中右键,选择 `AppWorks:分析 CSS 文件中的颜色,生成「深色模式」的样式代码`

![img](https://img.alicdn.com/imgextra/i3/O1CN017C7Cw91pUlC3XS7Zj_!!6000000005364-1-tps-1080-601.gif)

### 创建文件时自动填充样板代码

* 生成页面组件代码
* 生成通用组件代码
* 生成 module 和 store 状态管理文件

![img](https://img.alicdn.com/imgextra/i3/O1CN01qwQZYb1nE9bQT6qZb_!!6000000005057-1-tps-960-677.gif)

![img](https://img.alicdn.com/imgextra/i4/O1CN01lIMHws1NlQMXVjtWs_!!6000000001610-1-tps-960-677.gif)

## 更多

本插件由 [AppWorks Team](https://marketplace.visualstudio.com/publishers/iceworks-team) 开发,是 AppWorks 套件的一部分,访问 [AppWorks](https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks) 获取更多功能。
Binary file added extensions/react-generator/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 50f2664

Please sign in to comment.