| 45 | ) |
| 46 | |
| 47 | const bundleStyles = async (ctx: PandaContext, changedFilePath: string) => { |
| 48 | const parserResult = ctx.project.parseSourceFile(changedFilePath) |
| 49 | |
| 50 | if (parserResult) { |
| 51 | const done = logger.time.info(ctx.messages.buildComplete(1)) |
| 52 | const sheet = ctx.createSheet() |
| 53 | ctx.appendLayerParams(sheet) |
| 54 | ctx.appendBaselineCss(sheet) |
| 55 | ctx.appendParserCss(sheet) |
| 56 | await ctx.writeCss(sheet) |
| 57 | done() |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | ctx.watchFiles(async (event, file) => { |
| 62 | const filePath = ctx.runtime.path.abs(cwd, file) |