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

3.0.0 #58

Closed
vegarringdal opened this issue Jul 21, 2019 · 13 comments
Closed

3.0.0 #58

vegarringdal opened this issue Jul 21, 2019 · 13 comments
Assignees

Comments

@vegarringdal
Copy link
Member

Will try and add faster checking by using IncrementalCompilerHost

@vegarringdal
Copy link
Member Author

If anyone want to try if its faster then use this
[email protected]

@vegarringdal
Copy link
Member Author

vegarringdal commented Jul 23, 2019

Some bads parts here, some todo for me for next week:

  • refactor and clean up
  • move builtin watch into thread
  • using tread to check code should also print result in tread so it dont interrupt main thread
  • have 2-3 simple functions that can be used with fusebox v4 for typechecking inside tread

@vegarringdal
Copy link
Member Author

@nchanged
When I update it I want it to be easier to use with fusebox.
I use it for otherstuff too, but since its called fusebox-typechekcer it might be nice if it was super easy to use.

Will the v4 plugin api have events for something like this:

    1. first run
    • with current tsconfig
    • with current watch settings
    1. Update/watch triggered
    • once when all is done
    1. Abort- config changed- need to shut down

Maybe best if it just runs its own tread all the time and uses it own watch so it dont mess with fusebox speed. Atm I notice I need to improve some parts, they are just making it hard for fusebox 😂

@nchanged
Copy link

nchanged commented Jul 23, 2019

Here is a simple v4 plugin

export function pluginTypeChecker(opts) {
  return (ctx: Context) => {
    ctx.ict.on('complete', props => {
      // initial run
      return props;
    });
    ctx.ict.on('rebundle_complete', props => {
      // re-bundle
      return props;
    });
  };
}

https://github.com/fuse-box/fuse-box/blob/26cc7f28b2d5c1a7ff12cee1f41827c4e9becaf4/src/interceptor/events.ts#L36-L43

@vegarringdal
Copy link
Member Author

@nchanged
thx

Just got old grid cleaned up and removed a lot
`[email protected]``
Will try and look at the plugin after Ive tested new code a little more.
Maybe clean up a little more when Ive had some more sleep 😂

New version have fewer options and more stuff it can do in the worker.

printSettings(): void;
inspectAndPrint(): number;
inspectOnly(oldProgram: ts.EmitAndSemanticDiagnosticsBuilderProgram): IResults;
printOnly(errors: IResults): number;
worker_watch(pathToWatch: string): void;
worker_kill(): void;
worker_inspect(): void;
worker_PrintSettings(): void;
worker_print(): void;
worker_inspectAndPrint(): void;

Im think this will be the sequenze

  1. starting -> worker_PrintSettings();
  2. on change -> worker_inspectAndPrint();
  3. if it needs to quit -> worker_kill()

Or we can just run the watch in the backgound so we dont use time to call it

@vegarringdal
Copy link
Member Author

vegarringdal commented Jul 24, 2019

Cleaned up more
Tslint is removed since it will be deprecated some time in 2019
Added missing throwOn options
Removed emit part, since anyonecan do it with a since line..
node ./node_modules/typescript/bin/tsc --build

[email protected]

Todo:

  • Make plugin

@vegarringdal
Copy link
Member Author

plugin added

[email protected]

@vegarringdal
Copy link
Member Author

Used no fusebox tsconfig if no path is set
You can still overide if you want

[email protected]

@vegarringdal vegarringdal pinned this issue Jul 31, 2019
@vegarringdal
Copy link
Member Author

vegarringdal commented Aug 7, 2019

Todo
when adding basepath I need to add this to file source, else contrl+mouse click will fail

  • add basepath to errors

@vegarringdal
Copy link
Member Author

[email protected]

fixed basepath issues when using server (2 plugins)
fixed production build, if .NODE_ENV === "production" then it does not use threads. (imprortant so it does not hold process alive after fusebox is done)

@vegarringdal
Copy link
Member Author

[email protected]

removed ref to homeDir

@vegarringdal
Copy link
Member Author

released v 3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants