-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit cc66ae1.
- Loading branch information
1 parent
9867ed9
commit 129bee7
Showing
4 changed files
with
39 additions
and
30 deletions.
There are no files selected for viewing
19 changes: 8 additions & 11 deletions
19
plugins/development/plugin-sass-palette/src/node/prepare/prepareConfigSass.ts
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,19 +1,16 @@ | ||
import type { App } from 'vuepress/core' | ||
import { getFileContent, getIdPrefix } from '../utils.js' | ||
import { getIdPrefix, getPath } from '../utils.js' | ||
|
||
export const prepareConfigSass = async ( | ||
export const prepareConfigSass = ( | ||
app: App, | ||
id: string, | ||
defaultConfig: string, | ||
userConfig: string, | ||
): Promise<string> => { | ||
const contents = await Promise.all([ | ||
getFileContent(defaultConfig), | ||
getFileContent(userConfig), | ||
]) | ||
|
||
return app.writeTemp( | ||
): Promise<string> => | ||
app.writeTemp( | ||
`sass-palette/${getIdPrefix(id)}config.scss`, | ||
`${contents.join('\n')}\n`, | ||
`\ | ||
@import "file:///${getPath(defaultConfig)}"; | ||
@import "file:///${getPath(userConfig)}"; | ||
`, | ||
) | ||
} |
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