parameters: (self)
docstring: Run the build according to the instructions in the manifest.
docstring_summary: Run the build according to the instructions in the manifest.
docstring_tokens: Run the build according to the instructions in the manifest .
function: def build(self):
          """Run the build according to the instructions in the manifest.
          """
          if self.errors:
              raise BuildError("Errors found, stopping...", self.errors)
          
          output_dir = self.output_dir
          print "Placing output in %s" % output_dir
          if output_dir.exists():
              output_dir.rmtree()
  
          output_dir.makedirs()
  
          filenames = [
              output_dir / f for f in
              ("BespinEmbedded.js", "BespinMain.js", "BespinWorker.js", "BespinEmbedded.css")
          ]
          
          self._created_javascript.add(filenames[0])
          self._created_javascript.add(filenames[1])
          self._created_javascript.add(filenames[2])
          
          files = [ codecs.open(f, 'w', 'utf8') for f in filenames ]
          [ jsfile, mainfile, workerfile, cssfile ] = files
          self.generate_output_files(jsfile, mainfile, workerfile, cssfile)
          for f in files:
              f.close()
          
          if self.unbundled_plugins:
              self._output_unbundled_plugins(self.unbundled_plugins)
  
          for package in self.static_packages + self.dynamic_packages + self.worker_packages + self.shared_packages:
              plugin = self.get_plugin(package.name)
              resources = plugin.location / "resources"
              if resources.exists() and resources.isdir():
                  resources.copytree(output_dir / "resources" / plugin.name,
                      ignore=ignore_css)
  
          if self.include_sample:
              sample_dir.copytree(output_dir / "samples")
function_tokens: def build ( self ) : if self . errors : raise BuildError ( "Errors found, stopping..." , self . errors ) output_dir = self . output_dir print "Placing output in %s" % output_dir if output_dir . exists ( ) : output_dir . rmtree ( ) output_dir . makedirs ( ) filenames = [ output_dir / f for f in ( "BespinEmbedded.js" , "BespinMain.js" , "BespinWorker.js" , "BespinEmbedded.css" ) ] self . _created_javascript . add ( filenames [ 0 ] ) self . _created_javascript . add ( filenames [ 1 ] ) self . _created_javascript . add ( filenames [ 2 ] ) files = [ codecs . open ( f , 'w' , 'utf8' ) for f in filenames ] [ jsfile , mainfile , workerfile , cssfile ] = files self . generate_output_files ( jsfile , mainfile , workerfile , cssfile ) for f in files : f . close ( ) if self . unbundled_plugins : self . _output_unbundled_plugins ( self . unbundled_plugins ) for package in self . static_packages + self . dynamic_packages + self . worker_packages + self . shared_packages : plugin = self . get_plugin ( package . name ) resources = plugin . location / "resources" if resources . exists ( ) and resources . isdir ( ) : resources . copytree ( output_dir / "resources" / plugin . name , ignore = ignore_css ) if self . include_sample : sample_dir . copytree ( output_dir / "samples" )