Skip to content

Commit adedaae

Browse files
fix(scss): render css before starting serve command
1 parent 20465cb commit adedaae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/commands/serve.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { NgAotFactoryPlugin } from '../fusebox/ng.aot-factory.plugin'
2020
import { main as ngc } from '@angular/compiler-cli/src/main'
2121
import { CompressionPlugin } from '../fusebox/compression.plugin'
2222
import { appEnvironmentVariables } from '../utilities/environment-variables'
23-
import { renderSingleSass } from '../utilities/sass'
23+
import { renderSingleSass, renderSassDir } from '../utilities/sass'
2424
import { SparkyFile } from 'fuse-box/sparky/SparkyFile'
2525
import clearTerminal from '../utilities/clear'
2626
import readConfig_ from '../utilities/read-config'
@@ -181,16 +181,17 @@ function serve(isProdBuild = false) {
181181
.instructions(` !> [${browserModule}]`)
182182
.splitConfig({ dest: '../js/modules' })
183183

184-
task('test', () =>
184+
task('scss.watch', () =>
185185
watch('src/**/**.*').file('*.scss', (f: SparkyFile) => {
186186
f.homePath && renderSingleSass(f.homePath)
187187
})
188188
)
189189

190-
exec('test')
190+
exec('scss.watch')
191191

192192
logInfo('Bundling your application, this may take some time...')
193193

194+
renderSassDir()
194195
fuseBrowser.run({ chokidar: { ignored: /.scss/g } })
195196
})
196197
}

0 commit comments

Comments
 (0)