Browse Source

Change some plugin module names to be a bit more generic.

* less   -> css
* git    -> vcs
* uglify -> js
main
Elliott Sales de Andrade 12 years ago
committed by Lakshmi Vyasarajan
parent
commit
3f86282544
5 changed files with 8 additions and 7 deletions
  1. +1
    -1
      hyde/ext/plugins/css.py
  2. +1
    -1
      hyde/ext/plugins/js.py
  3. +2
    -1
      hyde/ext/plugins/vcs.py
  4. +1
    -1
      hyde/tests/ext/test_less.py
  5. +3
    -3
      hyde/tests/ext/test_uglify.py

hyde/ext/plugins/less.py → hyde/ext/plugins/css.py View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Less css plugin
CSS plugins
""" """


from hyde.plugin import CLTransformer from hyde.plugin import CLTransformer

hyde/ext/plugins/uglify.py → hyde/ext/plugins/js.py View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Uglify plugin
JavaScript plugins
""" """


from hyde.plugin import CLTransformer from hyde.plugin import CLTransformer

hyde/ext/plugins/git.py → hyde/ext/plugins/vcs.py View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Contains classes and utilities to extract information from git repository
Contains classes and utilities to extract information from repositories
""" """


from hyde.plugin import Plugin from hyde.plugin import Plugin
@@ -60,3 +60,4 @@ class GitDatesPlugin(Plugin):
modified = datetime.utcfromtimestamp(os.path.getmtime(resource.path)) modified = datetime.utcfromtimestamp(os.path.getmtime(resource.path))
modified = modified.replace(tzinfo=None) modified = modified.replace(tzinfo=None)
resource.meta.modified = modified resource.meta.modified = modified


+ 1
- 1
hyde/tests/ext/test_less.py View File

@@ -28,7 +28,7 @@ class TestLess(object):


def test_can_execute_less(self): def test_can_execute_less(self):
s = Site(TEST_SITE) s = Site(TEST_SITE)
s.config.plugins = ['hyde.ext.plugins.less.LessCSSPlugin']
s.config.plugins = ['hyde.ext.plugins.css.LessCSSPlugin']
source = TEST_SITE.child('content/media/css/site.less') source = TEST_SITE.child('content/media/css/site.less')
target = File(Folder(s.config.deploy_root_path).child('media/css/site.css')) target = File(Folder(s.config.deploy_root_path).child('media/css/site.css'))
gen = Generator(s) gen = Generator(s)


+ 3
- 3
hyde/tests/ext/test_uglify.py View File

@@ -30,7 +30,7 @@ class TestUglify(object):


def test_can_uglify(self): def test_can_uglify(self):
s = Site(TEST_SITE) s = Site(TEST_SITE)
s.config.plugins = ['hyde.ext.plugins.uglify.UglifyPlugin']
s.config.plugins = ['hyde.ext.plugins.js.UglifyPlugin']
s.config.mode = "production" s.config.mode = "production"
source = TEST_SITE.child('content/media/js/jquery.js') source = TEST_SITE.child('content/media/js/jquery.js')
target = File(Folder(s.config.deploy_root_path).child('media/js/jquery.js')) target = File(Folder(s.config.deploy_root_path).child('media/js/jquery.js'))
@@ -44,7 +44,7 @@ class TestUglify(object):


def test_uglify_with_extra_options(self): def test_uglify_with_extra_options(self):
s = Site(TEST_SITE) s = Site(TEST_SITE)
s.config.plugins = ['hyde.ext.plugins.uglify.UglifyPlugin']
s.config.plugins = ['hyde.ext.plugins.js.UglifyPlugin']
s.config.mode = "production" s.config.mode = "production"
s.config.uglify = Expando(dict(args={"nc":""})) s.config.uglify = Expando(dict(args={"nc":""}))
source = TEST_SITE.child('content/media/js/jquery.js') source = TEST_SITE.child('content/media/js/jquery.js')
@@ -60,7 +60,7 @@ class TestUglify(object):


def test_no_uglify_in_dev_mode(self): def test_no_uglify_in_dev_mode(self):
s = Site(TEST_SITE) s = Site(TEST_SITE)
s.config.plugins = ['hyde.ext.plugins.uglify.UglifyPlugin']
s.config.plugins = ['hyde.ext.plugins.js.UglifyPlugin']
s.config.mode = "dev" s.config.mode = "dev"
source = TEST_SITE.child('content/media/js/jquery.js') source = TEST_SITE.child('content/media/js/jquery.js')
target = File(Folder(s.config.deploy_root_path).child('media/js/jquery.js')) target = File(Folder(s.config.deploy_root_path).child('media/js/jquery.js'))


Loading…
Cancel
Save