Commit Graph
161 Commits
Author SHA1 Message Date
Alan Pierce 404aacfa46 Address review comments
* Switch to `bracketSpacing: false`.
* Add prettier-ignore in one case.
2018-04-14 16:19:26 -07:00
Alan Pierce 1bcb88670b Set up Prettier and run it on the whole codebase
* Install prettier, set up the config file, and run it on all ts and tsx files.
* Install eslint and configure it with just eslint-plugin-prettier to check to
  make sure that prettier has been run.
* Add a basic .travis.yml that runs eslint.

There are other style things that might be nice to enforce with ESLint/TSLint,
like using const, import order, etc, but this commit just focuses on prettier,
which gets most of the way there.

One annoying issue for now is that typescript-eslint-parser gives a big warning
message since they haven't updated to officially support TypeScript 2.8 yet. We
aren't even using any ESLint rules that need the parser, but if we don't include
it, ESLint will crash. TS2.8 support is hopefully coming really soon, though:
https://github.com/eslint/typescript-eslint-parser/pull/454

As for the prettier config specifically, see https://prettier.io/docs/en/options.html
for the available options.

Config settings that seem non-controversial:

Semicolons: You don't use semicolons. (I prefer semicolons, but either way is fine.)

Quote style: Looks like you consistently use single quotes outside JSX and double
quotes in JSX, which is the `singleQuote: true` option.

Config settings worth discussion:

Line width: You don't have a specific max. I put 100 since I think it's a good number
for people (like both of us, probably) who find 80 a bit cramped. (At Benchling we use
110.) Prettier has a big red warning box recommending 80, but I still prefer 100ish.

Bracket spacing: This is `{foo}` vs `{ foo }` for imports, exports, object literals,
and destructuring. Looks like you're inconsistent but lean toward spaces. I personally
really dislike bracket spacing (it feels inconsistent with arrays and function calls),
but I'm certainly fine with it and Prettier has it enabled by default, so I kept it
enabled.

Trailing comma style: Options are "no trailing commas", "trailing commas for
everything exception function calls and parameter lists", and "trailing commas
everywhere". TypeScript can handle trailing commas everywhere, so there isn't a
concern with tooling. You're inconsistent, and it looks like you tend to not have
trailing commas, but I think it's probably best to just have them everywhere, so I
enabled them.

JSX Brackets: You're inconsistent about this, I think. I'd prefer to just keep the
default and wrap the `>` to the next line.

Arrow function parens: I only found two cases of arrow functions with one param
(both `c => c.frame === frame`), and both omitted the parens, so I kept the
default of omitting parens. This makes it mildly more annoying to add a typescript
type or additional param, which is a possible reason for always requiring parens.

Everything else is non-configurable, although it's possible some places would be
better with a `// prettier-ignore` comment (but I usually try to avoid those).
2018-04-14 08:40:06 -07:00
Jamie Wong 298056a9ef Add MIT License 2018-04-08 22:35:53 -07:00
Jamie Wong f4d14e55d0 Fix deploy 2018-04-05 00:59:56 -07:00
Jamie Wong e630b21420 Rename release to deploy 2018-04-05 00:53:49 -07:00
Jamie Wong 971c0a2dc4 More tweaks to release process 2018-04-05 00:53:21 -07:00
Jamie Wong 045be2831b Prevent an infinite loop 2018-04-05 00:41:49 -07:00
Jamie Wong e4a6d2e3f3 Include commit in gh-pages branch to see which version is deployed 2018-04-05 00:32:26 -07:00
Jamie Wong 5104e5cdcb Demangle C++ symbols (#2)
This adds support for demangling C++ symbols automatically (they'll have a name prefix of `__Z`).
2018-04-05 00:27:03 -07:00
Jamie Wong 1987e83bde Upgrade libraries & change release procedure (#8)
Previously, I was doing a hacky release process where I had `index.html` serve contents for `jlfwong.github.io/speedscope`, but used `dev.html` locally. This seems like it broke with the latest parcel release, so I just revamped the release process instead.

Now, the `release.sh` script creates a temporary shallow clone of the repository, overwrites its contents with build artifacts, runs a local server to verify it's working, then commits and pushes to the `gh-pages` branches.
2018-04-05 00:15:42 -07:00
Jamie Wong aee0554635 release 2018-02-05 11:06:21 -08:00
Jamie Wong bd40956722 Change triangle wave frequency for color generation 2018-02-05 11:04:42 -08:00
Jamie Wong f86a4f0d00 More colorscheme tweaking 2018-02-05 11:02:30 -08:00
Jamie Wong fac7356d21 Use triangle wave instead of fract for colorscheme 2018-02-02 09:04:29 -08:00
Jamie Wong 1525c3fa04 Switch to more canonical HCL, re-enable HMR 2018-02-01 23:14:47 -08:00
Jamie Wong 8e32110a0d Update README 2018-01-31 10:21:48 -08:00
Jamie Wong 3d2b94b3ba release 2018-01-31 10:16:21 -08:00
Justin Li 79e4ff0e50 Focus frames beneath a node on dblclick (#1) 2018-01-31 10:15:29 -08:00
Jamie Wong d6652388c9 release 2018-01-30 12:29:49 -08:00
Jamie Wong f25f8fc5cc Fix for Chrome timelines containing multiple CPU profiles 2018-01-30 12:29:25 -08:00
Jamie Wong f9af0fddb2 release 2018-01-30 10:34:47 -08:00
Jamie Wong 583cc1ad7c Fix window resize behavior 2018-01-30 10:34:28 -08:00
Jamie Wong 1ba3e00bd2 release 2018-01-30 02:19:10 -08:00
Jamie Wong 15e5e73d30 Simplify code a bit with framebuffer.use 2018-01-30 02:07:05 -08:00
Jamie Wong 53656fef43 I think it works!!!!! 2018-01-30 01:51:02 -08:00
Jamie Wong 838cc06ff5 Outline rendering WIP 2018-01-29 11:53:39 -08:00
Jamie Wong 45dd408163 Line-tiled cache seems like it works!!!! 2018-01-28 13:35:21 -08:00
Jamie Wong 31829c4aa0 Row atlas seems like it is working! 2018-01-28 12:29:41 -08:00
Jamie Wong 4fcd40da98 Row atlas sort of working? 2018-01-28 03:13:12 -08:00
Jamie Wong 5412573ba3 Make NDC an implementation detail 2018-01-27 21:21:38 -08:00
Jamie Wong 37e2b78ad8 Rendering from one big texture working, make using texture rendering more ergonomic 2018-01-27 20:19:45 -08:00
Jamie Wong ba8241b0d3 Add modified version of stats.js 2018-01-27 18:29:27 -08:00
Jamie Wong 82ad36f55a Texture based approach WIP 2018-01-25 21:15:35 -08:00
Jamie Wong f103f3ad7a Fix minimap rendering bug when switching between views 2018-01-25 12:04:30 -08:00
Jamie Wong 62eb215226 Batch culling 2018-01-25 11:50:40 -08:00
Jamie Wong 24c58d5e34 Flamechart Renderer with no culling 2018-01-25 10:17:17 -08:00
Jamie Wong 282aaf8597 More helpful stats readout 2018-01-25 09:22:15 -08:00
Jamie Wong dd2a733fec Simplify vertex shader 2018-01-25 08:59:48 -08:00
Jamie Wong bb90fedd68 Print perf stats 2018-01-25 08:56:14 -08:00
Jamie Wong 1145c13452 Take strokeSize out of the rectangel batch renderer 2018-01-25 08:48:38 -08:00
Jamie Wong 47ae01f705 release 2018-01-24 11:07:53 -08:00
Jamie Wong 3945873933 Render rectangle batches via instancing 2018-01-24 11:06:48 -08:00
Jamie Wong 5caaf856b5 Stop allocating six times more memory than necessary :) 2018-01-24 10:41:55 -08:00
Jamie Wong 1e659a204b Enable profiling for regl w/ GPU timing 2018-01-23 23:58:23 -08:00
Jamie Wong 767c677824 Render minimap to texture to avoid superfluous re-renders 2018-01-23 23:48:13 -08:00
Jamie Wong 61d321f6d4 Fix hot reloading 2018-01-23 23:47:17 -08:00
Jamie Wong 1e2dd36be1 Fix minimap view 2018-01-23 11:36:39 -08:00
Jamie Wong 5abe22dd77 Fix interaction lock 2018-01-23 11:04:28 -08:00
Jamie Wong db111dc9be Fix flashing issues 2018-01-23 10:59:31 -08:00
Jamie Wong fe9561f709 Refactor into a single CanvasContext 2018-01-23 09:59:14 -08:00