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

compiler.run() - Cannot read property 'run' of undefined #2

Closed
crazyx13th opened this issue Feb 20, 2018 · 4 comments
Closed

compiler.run() - Cannot read property 'run' of undefined #2

crazyx13th opened this issue Feb 20, 2018 · 4 comments

Comments

@crazyx13th
Copy link

Hi there,

how I can take my own onChangeCallback Function? How I can get the compiler instance?
Thx!

grafik

@crazyx13th
Copy link
Author

crazyx13th commented Feb 20, 2018

current "workaround", I modified your module and call my functions with more args
grafik

and besides... In my Custom-Callback-Function I moved 2 lines.
grafik
1. I think watcher should only close on error, or? (forget it...)
2. end-message should be inside the run-callback, or?

thx!

@sap9433
Copy link
Owner

sap9433 commented Feb 22, 2018

Existing code

        'change',
        options.onChangeCallback || ...

So if we just provide custom options.onChangeCallback while initializing, then it would take precedence. I don't think source code needs to be changed.

@sap9433 sap9433 closed this as completed Feb 22, 2018
@crazyx13th
Copy link
Author

I think you understand my point :-) sorry if I communicate too complicate :-D

I can't use a custom function, because i can't call the function compiler.run(), because i don't have the compiler instance inside my custom function. I only change that I got this instance

thx!

@crazyx13th
Copy link
Author

ok, last try :-(
problem still exists

my example code (for this example onChangeCallback is the same function you use internal)
grafik

But than you got
grafik

this is th reason that i would give the custum function more attributes than path. you need compiler and watcher

thx!

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

No branches or pull requests

2 participants