electron-compile icon indicating copy to clipboard operation
electron-compile copied to clipboard

Documentation: How to determine if a file needs to be re-compiled?

Open waywardmonkeys opened this issue 10 years ago • 2 comments
trafficstars

A quick note in the README about how electron-compile decides whether or not a file needs to be recompiled would be useful.

waywardmonkeys avatar Jun 22 '15 04:06 waywardmonkeys

Whether the file should be compiled is based on:

  1. The compiler settings (i.e. if you change Babel options, we recompile your files)
  2. The content of the file

Where this breaks down is, file formats like SCSS that allow imports - we don't invalidate the parent file when the child changes

anaisbetts avatar Jul 26 '15 03:07 anaisbetts

@paulcbetts Is there any way to force recompile of parent SCSS file on an app reload, or make it work with autoreload?

I have a style directory set up like below with imports into the main root app.scss file. Seems changes in a child SCSS file are not reflected in the GUI on reload because of your explanation above: we don't invalidate the parent file when the child changes.

image

Otherwise I suppose I could always just run a sass-watch separately but would love to get this all working through electron-compile.

Btw, this is an awesome project!

rkpatel33 avatar Nov 08 '17 03:11 rkpatel33