Beispiel #1
0
 def test_normalize_manifests(self):
     manifests = Manifest.normalize_manifests({
         'package':
         'sass/path',
         'package.name': ('sass/path', 'css/path'),
         'package.name2':
         Manifest('sass/path', 'css/path'),
         'package.name3': {
             'sass_path': 'sass/path',
             'css_path': 'css/path',
             'strip_extension': True,
         },
     })
     assert len(manifests) == 4
     assert isinstance(manifests['package'], Manifest)
     assert manifests['package'].sass_path == 'sass/path'
     assert manifests['package'].css_path == 'sass/path'
     assert isinstance(manifests['package.name'], Manifest)
     assert manifests['package.name'].sass_path == 'sass/path'
     assert manifests['package.name'].css_path == 'css/path'
     assert isinstance(manifests['package.name2'], Manifest)
     assert manifests['package.name2'].sass_path == 'sass/path'
     assert manifests['package.name2'].css_path == 'css/path'
     assert isinstance(manifests['package.name3'], Manifest)
     assert manifests['package.name3'].sass_path == 'sass/path'
     assert manifests['package.name3'].css_path == 'css/path'
     assert manifests['package.name3'].strip_extension is True
Beispiel #2
0
def build_scss():
    manifests = Manifest.normalize_manifests(app.config["SASS_MANIFEST"])

    css_files = []
    for package_name, manifest in manifests.items():
        css_files = manifest.build("hubgrep/",
                                   output_style=app.config.get(
                                       "CSS_OUTPUT_STYLE", "compressed"))

    print(f"built css files: {list(css_files)}")
    print("deleting empty folders...")
    delete_empty_folders("hubgrep/static/")
 def test_normalize_manifests(self):
     manifests = Manifest.normalize_manifests({
         'package': 'sass/path',
         'package.name': ('sass/path', 'css/path'),
         'package.name2': Manifest('sass/path', 'css/path')
     })
     assert len(manifests) == 3
     assert isinstance(manifests['package'], Manifest)
     assert manifests['package'].sass_path == 'sass/path'
     assert manifests['package'].css_path == 'sass/path'
     assert isinstance(manifests['package.name'], Manifest)
     assert manifests['package.name'].sass_path == 'sass/path'
     assert manifests['package.name'].css_path == 'css/path'
     assert isinstance(manifests['package.name2'], Manifest)
     assert manifests['package.name2'].sass_path == 'sass/path'
     assert manifests['package.name2'].css_path == 'css/path'
Beispiel #4
0
 def test_normalize_manifests(self):
     manifests = Manifest.normalize_manifests({
         'package': 'sass/path',
         'package.name': ('sass/path', 'css/path'),
         'package.name2': Manifest('sass/path', 'css/path')
     })
     assert len(manifests) == 3
     assert isinstance(manifests['package'], Manifest)
     assert manifests['package'].sass_path == 'sass/path'
     assert manifests['package'].css_path == 'sass/path'
     assert isinstance(manifests['package.name'], Manifest)
     assert manifests['package.name'].sass_path == 'sass/path'
     assert manifests['package.name'].css_path == 'css/path'
     assert isinstance(manifests['package.name2'], Manifest)
     assert manifests['package.name2'].sass_path == 'sass/path'
     assert manifests['package.name2'].css_path == 'css/path'