Remove all references to Vue

This commit is contained in:
Keavon Chambers 2023-03-10 04:02:02 -08:00
parent db29ac6366
commit 74d761dc84
13 changed files with 20 additions and 88 deletions

View file

@ -23,7 +23,7 @@ npm --version
cd frontend cd frontend
npm ci npm ci
# Install the cargo-about Rust dependency that's used during the Webpack build process (in `vue.config.js`) # Install the cargo-about Rust dependency that's used during the Webpack build process (in `webpack.config.js`)
echo 📦 Install cargo-about echo 📦 Install cargo-about
cargo install cargo-about cargo install cargo-about
@ -31,3 +31,4 @@ cargo install cargo-about
echo 👷 Build Graphite web client echo 👷 Build Graphite web client
export NODE_ENV=production export NODE_ENV=production
npm run build npm run build
mv public dist

View file

@ -1,4 +1,4 @@
[*.{rs,js,ts,vue,json,toml,svg,html,css,scss}] [*.{rs,js,ts,svelte,json,toml,svg,html,css,scss}]
indent_style = tab indent_style = tab
indent_size = 4 indent_size = 4
end_of_line = lf end_of_line = lf

View file

@ -50,7 +50,8 @@ jobs:
NODE_ENV: production NODE_ENV: production
run: | run: |
cd frontend cd frontend
npm run lint # npm run lint
echo "💥 Frontend linting is temporarily disabled until it can be set up again with Svelte 💥"
- name: 🔬 Check Rust formatting - name: 🔬 Check Rust formatting
run: | run: |

View file

@ -4,7 +4,7 @@
"rust-lang.rust-analyzer", "rust-lang.rust-analyzer",
// Web // Web
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"Vue.volar", "svelte.svelte-vscode",
"vitaliymaz.vscode-svg-previewer", "vitaliymaz.vscode-svg-previewer",
// Code quality // Code quality
"wayou.vscode-todo-highlight", "wayou.vscode-todo-highlight",
@ -14,6 +14,6 @@
"waderyan.gitblame", "waderyan.gitblame",
"qezhu.gitlink", "qezhu.gitlink",
"wmaurer.change-case", "wmaurer.change-case",
"shalimski.swapdiff", "shalimski.swapdiff"
] ]
} }

View file

@ -6,7 +6,7 @@
"editor.defaultFormatter": "rust-lang.rust-analyzer" "editor.defaultFormatter": "rust-lang.rust-analyzer"
}, },
// Web: save on format // Web: save on format
"[typescript][javascript][vue]": { "[typescript][javascript]": {
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true "source.fixAll.eslint": true
}, },
@ -34,9 +34,6 @@
"eslint.format.enable": true, "eslint.format.enable": true,
"eslint.workingDirectories": ["./frontend", "./website/other/bezier-rs-demos", "./website"], "eslint.workingDirectories": ["./frontend", "./website/other/bezier-rs-demos", "./website"],
"eslint.validate": ["javascript", "typescript"], "eslint.validate": ["javascript", "typescript"],
// Vue config
"volar.completion.preferredAttrNameCase": "camel",
"volar.completion.preferredTagNameCase": "pascal",
// VS Code config // VS Code config
"html.format.wrapLineLength": 200, "html.format.wrapLineLength": 200,
"files.eol": "\n", "files.eol": "\n",

19
Cargo.lock generated
View file

@ -1812,25 +1812,6 @@ dependencies = [
"wasm-bindgen-test", "wasm-bindgen-test",
] ]
[[package]]
name = "graphite-wasm-svelte"
version = "0.0.0"
dependencies = [
"bezier-rs",
"graph-craft",
"graphene-core",
"graphite-document-legacy",
"graphite-editor",
"js-sys",
"log",
"ron",
"serde",
"serde-wasm-bindgen",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-bindgen-test",
]
[[package]] [[package]]
name = "gtk" name = "gtk"
version = "0.15.5" version = "0.15.5"

View file

@ -4,7 +4,6 @@ members = [
"document-legacy", "document-legacy",
"proc-macros", "proc-macros",
"frontend/wasm", "frontend/wasm",
"frontend-svelte/wasm",
"frontend/src-tauri", "frontend/src-tauri",
"node-graph/gcore", "node-graph/gcore",
"node-graph/gstd", "node-graph/gstd",
@ -39,12 +38,6 @@ opt-level = 3
[profile.dev.package.graphite-wasm] [profile.dev.package.graphite-wasm]
opt-level = 3 opt-level = 3
[profile.release.package.graphite-wasm-svelte]
opt-level = 3
[profile.dev.package.graphite-wasm-svelte]
opt-level = 3
[profile.dev.package.autoquant] [profile.dev.package.autoquant]
opt-level = 3 opt-level = 3

View file

@ -1,4 +1,4 @@
const webpackConfigPath = require.resolve("@vue/cli-service/webpack.config.js"); const webpackConfigPath = require.resolve("@webpack/webpack.config.js");
module.exports = { module.exports = {
root: true, root: true,
@ -11,14 +11,6 @@ module.exports = {
ecmaVersion: 2020, ecmaVersion: 2020,
}, },
extends: [ extends: [
// Vue-specific defaults
"plugin:vue/vue3-essential",
// Vue-compatible JS defaults
"@vue/airbnb",
// Vue-compatible TS defaults
"@vue/typescript/recommended",
// Vue-compatible Prettier defaults
"plugin:prettier-vue/recommended",
// General Prettier defaults // General Prettier defaults
"prettier", "prettier",
], ],
@ -29,16 +21,6 @@ module.exports = {
node: {}, node: {},
webpack: { config: webpackConfigPath }, webpack: { config: webpackConfigPath },
}, },
// https://github.com/meteorlxy/eslint-plugin-prettier-vue
"prettier-vue": {
// Use Prettier to format the HTML, CSS, and JS blocks of .vue single-file components
SFCBlocks: {
template: true,
style: true,
script: true,
},
},
}, },
ignorePatterns: [ ignorePatterns: [
// Ignore generated directories // Ignore generated directories
@ -102,25 +84,6 @@ module.exports = {
], ],
}, },
], ],
// Prettier plugin config (used to enforce HTML, CSS, and JS formatting styles as an ESLint plugin, where fixes are reported to ESLint to be applied when linting)
"prettier-vue/prettier": [
"error",
{
tabWidth: 4,
tabs: true,
printWidth: 200,
singleQuote: false,
},
],
// Vue plugin config (used to validate Vue single-file components)
"vue/multi-word-component-names": "off",
// Vue Accessibility plugin config (included by airbnb defaults but undesirable for a web app project)
"vuejs-accessibility/form-control-has-label": "off",
"vuejs-accessibility/label-has-for": "off",
"vuejs-accessibility/click-events-have-key-events": "off",
}, },
overrides: [ overrides: [
{ {

View file

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"start": "npm run serve", "start": "npm run serve",
"serve": "webpack serve || (npm run print-building-help && exit 1)", "serve": "webpack serve || (npm run print-building-help && exit 1)",
"build-dev": "webpack build || (npm run print-building-help && exit 1)", "build": "webpack build || (npm run print-building-help && exit 1)",
"build-prod-unix": "NODE_ENV=production webpack build || (npm run print-building-help && exit 1)", "build-prod-unix": "NODE_ENV=production webpack build || (npm run print-building-help && exit 1)",
"build-prod-windows": "set NODE_ENV=production && webpack build || (npm run print-building-help && exit 1)", "build-prod-windows": "set NODE_ENV=production && webpack build || (npm run print-building-help && exit 1)",
"check": "svelte-check", "check": "svelte-check",

View file

@ -3,11 +3,11 @@
"build": { "build": {
"beforeBuildCommand": "npm run build", "beforeBuildCommand": "npm run build",
"beforeDevCommand": "npm start", "beforeDevCommand": "npm start",
"distDir": "../dist", "distDir": "../public",
"devPath": "http://127.0.0.1:8080" "devPath": "http://127.0.0.1:8080"
}, },
"package": { "package": {
"productName": "graphite-tauri", "productName": "Graphite",
"version": "0.1.0" "version": "0.1.0"
}, },
"tauri": { "tauri": {
@ -22,13 +22,7 @@
"depends": ["librustc_codegen_spirv"] "depends": ["librustc_codegen_spirv"]
}, },
"externalBin": [], "externalBin": [],
"icon": [ "icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "rs.graphite.editor", "identifier": "rs.graphite.editor",
"longDescription": "", "longDescription": "",
"macOS": { "macOS": {

View file

@ -1,4 +1,4 @@
# Overview of `/frontend-svelte/src/components/` # Overview of `/frontend/src/components/`
Each component represents a (usually reusable) part of the Graphite Editor GUI. These all get mounted in `Editor.svelte` (in the `/src` directory above this one). Each component represents a (usually reusable) part of the Graphite Editor GUI. These all get mounted in `Editor.svelte` (in the `/src` directory above this one).
@ -22,9 +22,9 @@ The interactive input items used to display information and provide user control
The building blocks for the Title Bar, Workspace, and Status Bar within an editor application window. The building blocks for the Title Bar, Workspace, and Status Bar within an editor application window.
# Vue tips and tricks # Svelte tips and tricks
This section contains a growing list of quick reference information for helpful Vue solutions and best practices. Feel free to add to this to help contributors learn things, or yourself remember tricks you'll likely forget in a few months. This section contains a growing list of quick reference information for helpful Svelte solutions and best practices. Feel free to add to this to help contributors learn things, or yourself remember tricks you'll likely forget in a few months.
## Bi-directional props ## Bi-directional props

View file

@ -1,5 +1,5 @@
[package] [package]
name = "graphite-wasm-svelte" name = "graphite-wasm"
publish = false publish = false
version = "0.0.0" version = "0.0.0"
rust-version = "1.66.0" rust-version = "1.66.0"

View file

@ -41,7 +41,9 @@ const config: webpack.Configuration = {
// Dev mode must be enabled for HMR to work! // Dev mode must be enabled for HMR to work!
dev: mode === "development" dev: mode === "development"
}, },
emitCss: mode === "production", // TODO: Reenable in prod, see: https://github.com/sveltejs/rollup-plugin-svelte#extracting-css
// emitCss: mode === "production",
emitCss: false,
hotReload: mode === "development", hotReload: mode === "development",
hotOptions: { hotOptions: {
// List of options and defaults: https://www.npmjs.com/package/svelte-loader-hot#usage // List of options and defaults: https://www.npmjs.com/package/svelte-loader-hot#usage