Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brushless v3 #87

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
558cdba
Migrate from webpack to esbuild
Sep 4, 2023
b2239ab
Wire up model settings in ui
Sep 4, 2023
1442873
Switch from model -> hardware
Sep 10, 2023
50840b5
Try and pass in the device path
Sep 10, 2023
f584da2
Thread the hardware needle
Sep 10, 2023
02e79db
lowercase instances of Axidraw
Sep 10, 2023
db3a67c
Fix some tsc lints
Sep 10, 2023
2e5860b
pass the hardware option in cli plot command
Sep 10, 2023
7be60a9
Appease the type checker
Sep 10, 2023
1825f53
Minify js
Sep 10, 2023
bb0104d
Pass com path back in broadcast info
Sep 12, 2023
abd9591
Simplify path generation for pen up, fix tsc errors
Sep 19, 2023
0fee7ca
Try satisfying the same hack for withHeight
Sep 19, 2023
37c65ed
Fix tsc errors, run format
Sep 20, 2023
97958df
Split typescript config for editor support
Sep 21, 2023
12ad5a1
Move --firmware-version from option to command
Sep 22, 2023
94106b9
exclude more, es2020
Sep 22, 2023
10c8960
Try starting with strict mode
Sep 22, 2023
2e5cf08
nvm
Sep 22, 2023
2a0045c
f typescript
Sep 22, 2023
2022f86
Add back firmware-version
Sep 22, 2023
f0eafd5
Skip library checking
Sep 22, 2023
f3b889c
Make sure to open the port first
Sep 22, 2023
e1fa8da
Try implementing this.port.close
Sep 22, 2023
847e304
try not throwing
Sep 22, 2023
37e8b01
Fix scripts
alexrudd2 Sep 27, 2023
00383e4
fixup! Fix tsc errors, run format
alexrudd2 Oct 3, 2023
da405c4
fixup! Simplify path generation for pen up, fix tsc errors
alexrudd2 Oct 3, 2023
85b8a2f
Skip typescript build for web
Sep 27, 2023
5a7aa1a
fixup! Fix scripts
alexrudd2 Oct 3, 2023
d300952
Switch base config to expected name for editor support
Sep 27, 2023
6678432
fixup! Switch from model -> hardware
alexrudd2 Oct 3, 2023
155ad2b
Fix test logic, but now the tests show different values for penPos
Sep 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
sourceType: 'module'
},
root: true,
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
"indent": "off",
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
}],
indent: 'off',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}]
},
settings: {
react: {
version: 'detect',
},
version: 'detect'
}
},
ignorePatterns: [
'*.js',
'__tests__',
],
};
'__tests__'
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ saxi makes use of the low-level `LM` command introduced in EBB firmware version
AxiDraw is running an older version of the firmware, saxi will fall back to the
less-accurate (but still pretty accurate) `XM` command.

To check what version of the EBB firmware your AxiDraw is running, run `saxi --firmware-version`:
To check what version of the EBB firmware your AxiDraw is running, run `saxi firmware-version`:

```
$ saxi --firmware-version
$ saxi firmware-version
EBBv13_and_above EB Firmware Version 2.5.3
```

Expand Down
52 changes: 52 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* eslint-disable no-undef */ //TODO: Remove by splitting eslintrc like we do for the tsconfig
import { context, build } from 'esbuild'
import inlineWorker from 'esbuild-plugin-inline-worker'
import { htmlPlugin as html } from '@craftamap/esbuild-plugin-html'

const buildOptions = {
entryPoints: ['src/ui.tsx'],
bundle: true,
platform: 'browser',
target: 'es2020',
sourcemap: true,
metafile: true,
logLevel: 'debug',
minify: true,
outdir: 'dist/ui',
tsconfig: 'tsconfig.web.json',
loader: { '.svg': 'dataurl' },
define: {
IS_WEB: process.env.IS_WEB ?? '0'
},
plugins: [inlineWorker(),
html({
files: [{
entryPoints: ['src/ui.tsx'],
filename: 'index.html',
htmlTemplate: 'src/index.html',
scriptLoading: 'defer'
}]
})
],
resolveExtensions: ['.js', '.ts', '.tsx', '.svg', '.worker.js']
};

(async () => {
try {
if (process.env.BUILD_MODE === 'development') {
// enables live-reloading
const ctx = await context({
...buildOptions,
banner: { js: "new EventSource('/esbuild').addEventListener('change', () => location.reload());" }
})
await ctx.watch()
const { host, port } = await ctx.serve({ servedir: 'dist/ui', port: 9080 })
console.log(`http://${host}:${port}`)
} else {
await build(buildOptions)
}
} catch (error) {
console.error(error)
process.exit(1)
}
})()
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
server: require('./dist/server/server'),
server: require('./dist/server/server')
}
Loading