Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
build.Style Class Reference
Inheritance diagram for build.Style:
build.Artifact

Public Member Functions

 __init__ (self, str name)
 
 __repr__ (self)
 
 depends_on (self, str path)
 
 build (self)
 

Public Attributes

 name
 
 output
 
- Public Attributes inherited from build.Artifact
 output
 
 inputs
 

Additional Inherited Members

- Static Public Member Functions inherited from build.Artifact
 build_all ()
 
 build_matching (Callable[[Artifact], bool] predicate)
 
- Static Public Attributes inherited from build.Artifact
dict all = {}
 
list listeners = []
 

Detailed Description

Stylesheet written in SASS which needs to be compiled to CSS.

Definition at line 205 of file build.py.

Constructor & Destructor Documentation

◆ __init__()

build.Style.__init__ (   self,
str  name 
)

Reimplemented from build.Artifact.

Definition at line 208 of file build.py.

208 def __init__(self, name: str):
209 self.name = name
210 super().__init__(os.path.join(OUTPUT_CSS_DIR, name + '.css'),
211 [os.path.join(STYLES_DIR, name + '.scss')])
212

Member Function Documentation

◆ __repr__()

build.Style.__repr__ (   self)

Definition at line 213 of file build.py.

213 def __repr__(self):
214 return f'Style({self.output} <- {self.inputs[0]})'
215

◆ build()

build.Style.build (   self)
Convert artifact inputs into an output.

Reimplemented from build.Artifact.

Definition at line 219 of file build.py.

219 def build(self):
220 logging.info('Build %s from %s', self.output, self.inputs[0])
221 subprocess.call(['sass', self.inputs[0], self.output])
222
223
Definition build.py:1

◆ depends_on()

build.Style.depends_on (   self,
str  path 
)
Check if this

Reimplemented from build.Artifact.

Definition at line 216 of file build.py.

216 def depends_on(self, path: str):
217 return path.startswith(STYLES_INCLUDES_DIR) or super().depends_on(path)
218
static bool depends_on(GrRenderTask *depender, GrRenderTask *dependee)

Member Data Documentation

◆ name

build.Style.name

Definition at line 209 of file build.py.

◆ output

build.Style.output

Definition at line 220 of file build.py.


The documentation for this class was generated from the following file: