Open xogg opened 8 years ago
I like the idea a lot, because I see its value for the script files as well as base class for scripts and styles of any kind. I am unsure about this implementation. First of all, the class name is a bit vague, BT.FilteredFile would be better IMHO. Secondly, I think that this doesn't need to be done through mixins, mainly because if the normal extending procedure is used, you can use concatenatedProperties (http://docs.sproutcore.com/#doc=SC.Object&method=concatenatedProperties&src=false) to automatically attach new filtering to the end of the filtering procedure. Moreover, if the filters themselves are implemented as cached computed properties, it could mean a speed up for any processed file.
The purpose of the class itself is to simply apply all the filters in a row. Thoughts?
Very nice work! I agreed with Maurits for the implementation details.
I thinks we should also move most of the BT.CSSFile
logic into BT.SCSSFile
, and extend BT.CSSFile
from BT.SCSSFile
.
Content Filters Adds a new abstract file type
BT.CodeFile
with content filtering support implemented via aBT.ContentFiltersMixin
. With content filtering mixed in, a chain of filters may be defined for a processable file with purpose of parsing, replacing known fragments or any other kind of processing.sc_static()
/static_url()
support Implemented as JavaScript functions in node-sass. all targets are inserted into the file'sresourceDependencies
, so linked resources would be processed inBUILD
run mode.Dependency tree All
@import
's in .scss files are intercepted and a tree of dependencies is maintained. Updating an imported file leads to the update of all master files on top of its dependency chain.