Commit 440f9adb by Timothée Peignier

remove external urls support

parent f86026f7
...@@ -78,9 +78,6 @@ class Packager(object): ...@@ -78,9 +78,6 @@ class Packager(object):
return packages return packages
for name in config: for name in config:
packages[name] = {} packages[name] = {}
if 'external_urls' in config[name]:
packages[name]['externals'] = config[name]['external_urls']
continue
paths = [] paths = []
for pattern in config[name]['source_filenames']: for pattern in config[name]['source_filenames']:
for path in glob(pattern): for path in glob(pattern):
......
...@@ -66,9 +66,6 @@ class CompressedJSNode(template.Node): ...@@ -66,9 +66,6 @@ class CompressedJSNode(template.Node):
except PackageNotFound: except PackageNotFound:
return '' # fail silently, do not return anything if an invalid group is specified return '' # fail silently, do not return anything if an invalid group is specified
if 'externals' in package:
return '\n'.join([self.render_external(package, url) for url in package['externals']])
if settings.PIPELINE: if settings.PIPELINE:
return self.render_js(package, package["output"]) return self.render_js(package, package["output"])
else: else:
......
...@@ -70,29 +70,5 @@ class PackagerTest(TestCase): ...@@ -70,29 +70,5 @@ class PackagerTest(TestCase):
self.assertEqual(individual_url, self.assertEqual(individual_url,
"http://localhost/static/js/application.js") "http://localhost/static/js/application.js")
def test_external_urls(self):
packager = Packager()
packages = packager.create_packages({
'jquery': {
'external_urls': ('//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js',)
},
'application': {
'source_filenames': ('js/application.js',),
'output_filename': 'application.r?.js'
}
})
self.assertEqual(packages, {
'jquery': {
'externals': ('//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js',)
},
'application': {
'context': {},
'manifest': True,
'output': 'application.r?.js',
'paths': ['js/application.js'],
'templates': []
}
})
def tearDown(self): def tearDown(self):
settings.PIPELINE_URL = self.old_pipeline_url settings.PIPELINE_URL = self.old_pipeline_url
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment