Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

[Question] How can I run some script when the file changed and how to add extension *.json in list of files has changed #344

Closed
tomzaku opened this issue Jun 19, 2018 · 1 comment

Comments

@tomzaku
Copy link

tomzaku commented Jun 19, 2018

I would like to run some script when file has changed. How can I do that?

For specific example:
My script is build file call: "language.json" to combine all of file in source code.
Therefor, I would like to add script to catch the event when file has changed.
Moreover, I would like to add *.json extension to list of file has changed

Thanks
Version:

    "react-scripts-ts": "^2.16.0",
@tomzaku
Copy link
Author

tomzaku commented Jun 20, 2018

Okay. I've ready fixed by ejecting and overriding method

    compiler.plugin('invalid', () => {
      if (isInteractive) {
        clearConsole();
      }

      console.log('Compiling...and generating language');
      // require('../src/i18n/translator')
    });

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

No branches or pull requests

1 participant