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

Public Member Functions

def __init__ (self, str name)
 
def __repr__ (self)
 
def depends_on (self, str path)
 
def build (self)
 
def __init__ (self, str output, Sequence[str] inputs)
 
bool depends_on (self, str path)
 
def build (self)
 

Public Attributes

 name
 
- Public Attributes inherited from build.Artifact
 output
 
 inputs
 

Additional Inherited Members

- Static Public Member Functions inherited from build.Artifact
def build_all ()
 
def build_matching (Callable[[Artifact], bool] predicate)
 

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__()

def 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__()

def 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()

def 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
def build()
Definition: dom.py:52

◆ depends_on()

def 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.


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