-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from stone-lyl/feat-move-ext
feat: move ext-ds to monorepo packags/vscode-extension
- Loading branch information
Showing
43 changed files
with
3,101 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"amodio.tsl-problem-matcher", | ||
"ms-vscode.extension-test-runner" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-extension" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/packages/vscode-extension/dist/**/*.js" | ||
], | ||
"preLaunchTask": "${defaultBuildTask}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": false, // set this to true to hide the "out" folder with the compiled JS files | ||
"dist": false // set this to true to hide the "dist" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true, // set this to false to include "out" folder in search results | ||
"dist": true // set this to false to include "dist" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "ext:dev", | ||
"problemMatcher": "$ts-webpack-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never", | ||
"group": "watchers" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { defineConfig } from '@vscode/test-cli'; | ||
|
||
export default defineConfig({ | ||
files: 'out/test/**/*.test.js', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/** | ||
node_modules/** | ||
src/** | ||
.gitignore | ||
.yarnrc | ||
webpack.config.js | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/eslint.config.mjs | ||
**/*.map | ||
**/*.ts | ||
**/.vscode-test.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--ignore-engines true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Change Log | ||
|
||
All notable changes to the "ds-ext" extension will be documented in this file. | ||
|
||
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. | ||
|
||
## [Unreleased] | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Development Installation | ||
* clone repo | ||
* in root, also run `yarn` | ||
* open repo with VS Code | ||
* In "Run and Debug" tab, click "Run Extension" | ||
* This opens a new instance of VS Code | ||
* With the new instance, open a directory | ||
* Create a *.diagram.json file (must have a content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
|
||
export default [{ | ||
files: ["**/*.ts"], | ||
}, { | ||
plugins: { | ||
"@typescript-eslint": typescriptEslint, | ||
}, | ||
globals: { | ||
acquireVsCodeApi: "readonly" // Add this line to define acquireVsCodeApi as a global variable | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
}, | ||
|
||
rules: { | ||
"@typescript-eslint/naming-convention": ["warn", { | ||
selector: "import", | ||
format: ["camelCase", "PascalCase"], | ||
}], | ||
|
||
curly: "warn", | ||
eqeqeq: "warn", | ||
"no-throw-literal": "warn", | ||
semi: "warn", | ||
}, | ||
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"comments": { | ||
"lineComment": "//", | ||
"blockComment": ["/*", "*/"] | ||
}, | ||
"brackets": [ | ||
["{", "}"], | ||
["[", "]"] | ||
], | ||
"autoClosingPairs": [ | ||
{ "open": "{", "close": "}" }, | ||
{ "open": "[", "close": "]" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"name": "@data-story/vscode-extension", | ||
"displayName": "ds-ext", | ||
"description": "", | ||
"version": "0.0.1", | ||
"publisher": "ajthinking", | ||
"engines": { | ||
"vscode": "^1.93.0" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
"activationEvents": [ | ||
"onCommand:ds-ext.showReactApp", | ||
"onCommand:ds-ext.openAsJson" | ||
], | ||
"main": "./dist/extension.js", | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "ds-ext.showReactApp", | ||
"title": "Show React App" | ||
}, | ||
{ | ||
"command": "ds-ext.openAsJson", | ||
"title": "Open raw, diagram JSON" | ||
} | ||
], | ||
"languages": [ | ||
{ | ||
"id": "diagramJson", | ||
"aliases": [ | ||
"Diagram JSON" | ||
], | ||
"extensions": [ | ||
".diagram.json" | ||
], | ||
"configuration": "./language-configuration.json" | ||
} | ||
], | ||
"customEditors": [ | ||
{ | ||
"viewType": "ds-ext.diagramEditor", | ||
"displayName": "Diagram Editor", | ||
"selector": [ | ||
{ | ||
"filenamePattern": "*.diagram.json" | ||
} | ||
] | ||
} | ||
], | ||
"iconThemes": [ | ||
{ | ||
"id": "diagramFileIconTheme", | ||
"label": "Diagram File Icon Theme", | ||
"path": "./themes/file-icon-theme.json" | ||
} | ||
], | ||
"viewsContainers": { | ||
"activitybar": [ | ||
{ | ||
"id": "dataStoryViewContainer", | ||
"title": "DataStory", | ||
"icon": "./themes/icon.png" | ||
} | ||
] | ||
}, | ||
"views": { | ||
"dataStoryViewContainer": [ | ||
{ | ||
"id": "nodeDetailsView", | ||
"name": "Node Details" | ||
} | ||
] | ||
} | ||
}, | ||
"scripts": { | ||
"vscode:prepublish": "yarn run package", | ||
"build": "webpack && vite build", | ||
"watch:extension": "webpack --watch", | ||
"watch:app": "vite build -w", | ||
"package": "webpack --mode production --devtool hidden-source-map", | ||
"compile-tests": "tsc -p . --outDir out", | ||
"watch-tests": "tsc -p . -w --outDir out", | ||
"pretest": "yarn run compile-tests && yarn run build && yarn run lint", | ||
"lint": "eslint src", | ||
"test": "vscode-test" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^10.0.7", | ||
"@types/node": "20.x", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@types/vscode": "^1.93.0", | ||
"@typescript-eslint/eslint-plugin": "^8.3.0", | ||
"@typescript-eslint/parser": "^8.3.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"@vscode/test-cli": "^0.0.10", | ||
"@vscode/test-electron": "^2.4.1", | ||
"autoprefixer": "^10.4.20", | ||
"eslint": "^9.9.1", | ||
"postcss": "^8.4.47", | ||
"typescript": "^5.5.4", | ||
"vite": "^5.4.7", | ||
"webpack": "^5.94.0", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"dependencies": { | ||
"@data-story/core": "^0.0.92", | ||
"@data-story/ui": "^0.0.92", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"ts-loader": "^9.5.1" | ||
} | ||
} |
Oops, something went wrong.