Пример #1
0
def create_builder(conf):
    builder = StandardBuilder(conf)
    builder.create_asset("Styles", minify=True).add_bundle(css1)
    builder.create_asset("Vendors", minify=True, merge=True).add_bundle(js1)
    builder.create_asset("Application", minify=True, merge=True).add_bundle(js2)
    builder.create_asset("AllOtherFiles").add_bundle(other1)
    return builder
Пример #2
0
 def test_input_dir(self):
     bundle = JsBundle('js')
     bc = BuilderConfig('tests/mockups/src', 'tests/mockups/out')
     builder = StandardBuilder(bc)
     asset = builder.create_asset("test-example")
     asset.add_bundle(bundle)
     asset.collect_files()
     self.assertEquals(len(asset.files), 6)
     self.assertTrue(bundle.abs_path)
     self.assertEqual(bundle.abs_bundle_path, MOCKUPS_PATH + '/src/js')
     self.assertEqual(bundle.input_dir, bc.input_dir)