Closed GamerGirlandCo closed 1 month ago
Asking this as an interested watcher: if view pages can have a typescript content type for the script, does that mean that the TS compiler is getting bundled?
@iamrecursion sucrase is bundled in. See here - https://github.com/blacksmithgu/datacore/blob/master/src/utils/javascript.ts#L8-L23
Cheers, awesome stuff!
Apparently I'm allowed to push to feature PRs which is... very interesting. I've pushed some refactors and a yarn run format
to the branch; testing this locally though I'm not sure how convinced I am by it's utility compared to just viewing a regular markdown page with some code embedded in it. In particular, having a plain textarea as the code input is not very good UX experience.
I'm wondering if we should adjust this to instead just load a script from a different place (like say, a markdown file) and add the ability for it to set the current file to whatever the active workspace leaf is. That matches closer to my understanding of people's use cases for side panes.
closing this because i plan to delete my fork
to quote the roadmap:
each view page has its own state consisting of the following properties:
sourceType
: the type of script this view will contain (ex:ts
,js
,jsx
,tsx
...)script
: the actual source code for the scripttitle
: the title, as displayed in the tab/view headercurrentFile
: the configurable path to the current file, so that functions and hooks such asuseCurrentPath
don't chokeall of these are configurable via the view's settings page, which can be accessed via going into the three-dot menu and clicking "View configuration".
a command to create a view page has also been added to the command palette for ease of use.
as always, let me know if i should add or change anything! :)