This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
70 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,33 @@ | ||
# transmit-update-loader | ||
|
||
[![CircleCI](https://circleci.com/gh/occar421/transmit-update-loader/tree/master.svg?style=svg)](https://circleci.com/gh/occar421/transmit-update-loader/tree/master) | ||
[![Build status](https://ci.appveyor.com/api/projects/status/slqhhh1kuiatmtaf/branch/master?svg=true)](https://ci.appveyor.com/project/occar421/transmit-update-loader/branch/master) | ||
|
||
Message passing tool to transmit update to another file during webpack loader process. | ||
|
||
# Use case | ||
|
||
Assume these file structure while using CSS Modules. | ||
|
||
``` | ||
+- src/ | ||
+- Button.tsx | ||
+- Button.css | ||
+- Button.css.d.ts | ||
``` | ||
|
||
Here, also assume we use webpack Hot Module Replacement for dev server. | ||
When 'Button.css' is updated, 'Button.css.d.ts' could be updated. | ||
Although, 'Button.tsx' will not be notified that 'Button.css.d.ts' is updated. | ||
If 'Button.css's selector has changed, 'Button.tsx' won't be decorated correctly. | ||
|
||
Fortunately, it seems that webpack detects update with watching the same event when it is `touch`-ed. | ||
This module helps that situation. | ||
|
||
'Button.css' -(generate)-> 'Button.css.d.ts' -(watch)-(`touch`)-> 'Button.tsx' recompile. | ||
|
||
# TODO | ||
|
||
* Options | ||
* Transform target name | ||
* [TBD] | ||
* CI / CD pipeline. | ||
* Throttle | ||
* [TBD] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TxtFoo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters