(feat): add vite config#45
Merged
Merged
Conversation
FreakyWizard
approved these changes
Aug 8, 2025
|
|
||
| ```json | ||
| { | ||
| "scripts": { |
Contributor
There was a problem hiding this comment.
Idealiter zal het nog mooier zijn als deze scripts ook weer in de toolkit worden gedefined
| error( | ||
| `Filetype '${ formatFiletype.name }' not possible with lint action.` | ||
| ); | ||
| let command = { |
| msg = 'An error occurred', | ||
| die = true, | ||
| exitCode = 1 | ||
| export const runCommand = async ( |
|
|
||
| try { | ||
| const { stdout } = await execWithEnv( | ||
| `vite build --emptyOutDir --config vite-blocks.config.js`, |
Contributor
There was a problem hiding this comment.
Moet vite-blocks.config.js niet vervangen worden voor ${configFile}?
| themes.map( async ( theme ) => { | ||
| log.info( `Building theme: ${ theme }` ); | ||
| try { | ||
| const { stdout } = await execWithEnv( `vite build`, { |
Contributor
There was a problem hiding this comment.
Is het niet handig om met een param configFile mee te geven (nu pakt hij denk ik by default vite.config.js.
Dan kan je ook een andere file gebruiken (ik gok dat dat ook de bedoeling was)
Contributor
There was a problem hiding this comment.
Het zelfde gaat op voor watchBlocks
| */ | ||
| import log from '../utils/logger.js'; | ||
|
|
||
| export const watchThemes = () => { |
Contributor
There was a problem hiding this comment.
Is het niet mooi als je hier net als bij build themes en blocks ook een config naam kan mee geven?
| "vite": "^6.3.5" | ||
| }, | ||
| "optionalDependencies": { | ||
| "@rollup/rollup-linux-x64-gnu": "^4.46.1" |
| * Generates the aliases for each theme to use like `@theme-name`. | ||
| * Example: `background-image: url('@sage/images/logo.svg')`; or `import '@sage-child/scripts/frontend/frontend.js';` | ||
| */ | ||
| const generateAliases = ( themeNames ) => { |
44a3a0f to
89319f1
Compare
This reverts commit 9ce16b1.
f17a51a to
24a3b89
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@yardinternet/vite-configtoegevoegd en Vite integratie toegevoegd aan detoolkit.Je hebt nu twee modussen (
watchofbuild) en twee scripts die Vite aftrappen:Deze scripts wil ik vrijdag tijdens de kennisdeling toelichten.
Verder:
loggertoegevoegd: oude error-utilities vervangen door een nieuwe logger voor uniformiteitEr staat nog een PR open bij de repo van EvoMark voor het builden van de blocks. Deze moet gemerged worden, en anders moeten we de repo forken:
Ik heb uiteindelijk de repo geforked.