-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
- Loading branch information
Showing
6 changed files
with
80 additions
and
20 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,5 +1,7 @@ | ||
module.exports = { | ||
plugins: { | ||
'postcss-windicss': {}, | ||
'postcss-windicss': { | ||
// touchMode: 'insert-comment', | ||
}, | ||
}, | ||
} |
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,14 +1,27 @@ | ||
import { WindiPluginUtils } from '@windicss/plugin-utils' | ||
import { WindiPluginUtils, WindiPluginUtilsOptions } from '@windicss/plugin-utils' | ||
import _debug from 'debug' | ||
|
||
export interface WindiPostCSSPluginOptions extends WindiPluginUtilsOptions { | ||
/** | ||
* By default, this plugin "touches" your css entry by updating the file's | ||
* "updated time" (utime) to trigger the hot reload without changing its content. | ||
* | ||
* It should work most of the time. But for some tools, they might also compare | ||
* the file's content to avoid unnecessary hot reloads. In that cases, you will | ||
* need to specify this option to "insert-comment" to get proper style updates with | ||
* those tools. | ||
* | ||
* @default 'utime' | ||
*/ | ||
touchMode?: 'utime' | 'insert-comment' | ||
} | ||
|
||
export interface Context { | ||
entry?: string | ||
utils?: WindiPluginUtils | ||
} | ||
|
||
export const context: Context = { | ||
|
||
} | ||
export const context: Context = {} | ||
|
||
export const isDev = process.env.NODE_ENV === 'development' | ||
export const debug = _debug('postcss-windicss') |
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
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