Skip to content

Commit

Permalink
Two improvements to the development workflow (GraphiteEditor#270)
Browse files Browse the repository at this point in the history
* Configure rust-analyzer to target wasm32-unknown-unknown

* Watch changes to core rust files
  • Loading branch information
bjorn3 authored and Keavon committed Jul 16, 2021
1 parent 546bb16 commit 9ed1fcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"rust-analyzer.experimental.procAttrMacros": true,
"rust-analyzer.cargo.target": "wasm32-unknown-unknown",
"files.eol": "\n",
"html.format.wrapLineLength": 200,
"eslint.format.enable": true,
Expand All @@ -23,4 +24,4 @@
"typescript",
],
"vetur.format.enable": false,
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This is the primary means of running and developing the project. You may need to
npm run serve
```

The server automatically watches for changes to Vue files and rebuilds them. However core Rust and TypeScript file changes require a manual restart of the development server. (Please submit a PR to help it watch the `.ts` files!)
The server automatically watches for changes to Vue files and rebuilds them. However TypeScript file changes require a manual restart of the development server. (Please submit a PR to help it watch the `.ts` files!)

You can also use `npm run lint` and `npm run lint-no-fix` to solve web formatting and `cargo fmt` for Rust formatting. Also `npm run build` writes static files to `/client/web/dist` instead of serving them from memory.

Expand Down
1 change: 1 addition & 0 deletions client/web/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
(Plugin) =>
new Plugin({
crateDirectory: path.resolve(__dirname, "wasm"),
watchDirectories: [path.resolve(__dirname, "../../core")],
})
)
.end();
Expand Down

0 comments on commit 9ed1fcc

Please sign in to comment.