-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup adapter after processing styles (#343)
- Loading branch information
1 parent
0d8efe2
commit 50bae14
Showing
25 changed files
with
1,835 additions
and
488 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@vanilla-extract/css': patch | ||
'@vanilla-extract/integration': patch | ||
--- | ||
|
||
Cleanup adapter after processing styles |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import postcss from 'postcss'; | ||
import prettier from 'prettier'; | ||
// @ts-expect-error | ||
import cssnano from 'cssnano'; | ||
import got from 'got'; | ||
|
||
export const stylesheetName = 'main.css'; | ||
|
||
export async function getStylesheet(url: string, stylesheetName = 'main.css') { | ||
const response = await got(`${url}/${stylesheetName}`); | ||
const { css } = await postcss([cssnano({ preset: 'default' })]).process( | ||
response.body, | ||
{ | ||
from: undefined, | ||
}, | ||
); | ||
|
||
return response.body; | ||
return prettier.format(css, { parser: 'css' }); | ||
} |
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 |
---|---|---|
|
@@ -110,6 +110,7 @@ export const startWebpackFixture = ( | |
}), | ||
), | ||
type, | ||
stylesheet: 'main.css', | ||
}); | ||
}, | ||
}); | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.