Skip to content

Commit

Permalink
Remove all references to Vue
Browse files Browse the repository at this point in the history
  • Loading branch information
Keavon committed Mar 10, 2023
1 parent db29ac6 commit 74d761d
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 88 deletions.
3 changes: 2 additions & 1 deletion .deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ npm --version
cd frontend
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
cargo install cargo-about

# Build for production
echo 👷 Build Graphite web client
export NODE_ENV=production
npm run build
mv public dist
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -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_size = 4
end_of_line = lf
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
NODE_ENV: production
run: |
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
run: |
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"rust-lang.rust-analyzer",
// Web
"dbaeumer.vscode-eslint",
"Vue.volar",
"svelte.svelte-vscode",
"vitaliymaz.vscode-svg-previewer",
// Code quality
"wayou.vscode-todo-highlight",
Expand All @@ -14,6 +14,6 @@
"waderyan.gitblame",
"qezhu.gitlink",
"wmaurer.change-case",
"shalimski.swapdiff",
"shalimski.swapdiff"
]
}
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
// Web: save on format
"[typescript][javascript][vue]": {
"[typescript][javascript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
Expand Down Expand Up @@ -34,9 +34,6 @@
"eslint.format.enable": true,
"eslint.workingDirectories": ["./frontend", "./website/other/bezier-rs-demos", "./website"],
"eslint.validate": ["javascript", "typescript"],
// Vue config
"volar.completion.preferredAttrNameCase": "camel",
"volar.completion.preferredTagNameCase": "pascal",
// VS Code config
"html.format.wrapLineLength": 200,
"files.eol": "\n",
Expand Down
19 changes: 0 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ members = [
"document-legacy",
"proc-macros",
"frontend/wasm",
"frontend-svelte/wasm",
"frontend/src-tauri",
"node-graph/gcore",
"node-graph/gstd",
Expand Down Expand Up @@ -39,12 +38,6 @@ opt-level = 3
[profile.dev.package.graphite-wasm]
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]
opt-level = 3

Expand Down
39 changes: 1 addition & 38 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const webpackConfigPath = require.resolve("@vue/cli-service/webpack.config.js");
const webpackConfigPath = require.resolve("@webpack/webpack.config.js");

module.exports = {
root: true,
Expand All @@ -11,14 +11,6 @@ module.exports = {
ecmaVersion: 2020,
},
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
"prettier",
],
Expand All @@ -29,16 +21,6 @@ module.exports = {
node: {},
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: [
// Ignore generated directories
Expand Down Expand Up @@ -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: [
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "npm run serve",
"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-windows": "set NODE_ENV=production && webpack build || (npm run print-building-help && exit 1)",
"check": "svelte-check",
Expand Down
12 changes: 3 additions & 9 deletions frontend/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"build": {
"beforeBuildCommand": "npm run build",
"beforeDevCommand": "npm start",
"distDir": "../dist",
"distDir": "../public",
"devPath": "http://127.0.0.1:8080"
},
"package": {
"productName": "graphite-tauri",
"productName": "Graphite",
"version": "0.1.0"
},
"tauri": {
Expand All @@ -22,13 +22,7 @@
"depends": ["librustc_codegen_spirv"]
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/[email protected]", "icons/icon.icns", "icons/icon.ico"],
"identifier": "rs.graphite.editor",
"longDescription": "",
"macOS": {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand All @@ -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.

# 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

Expand Down
2 changes: 1 addition & 1 deletion frontend/wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "graphite-wasm-svelte"
name = "graphite-wasm"
publish = false
version = "0.0.0"
rust-version = "1.66.0"
Expand Down
4 changes: 3 additions & 1 deletion frontend/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const config: webpack.Configuration = {
// Dev mode must be enabled for HMR to work!
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",
hotOptions: {
// List of options and defaults: https://www.npmjs.com/package/svelte-loader-hot#usage
Expand Down

0 comments on commit 74d761d

Please sign in to comment.