Commits

Jiangge Zhang  committed f2cf094

refine the names of the assets.

  • Participants
  • Parent commits a498a38

Comments (0)

Files changed (4)

File passwood/assets/__init__.py

-from .scripts import default_scripts, foundation_scripts
-from .stylesheets import default_stylesheets
+from .scripts import default_js, foundation_js
+from .stylesheets import default_css
 from .processors import stylus, coffee, jsmin
 
 
 def register_bundles(compressor):
     """Registers the bundles into compressor extension."""
-    compressor.register_bundle(default_scripts)
-    compressor.register_bundle(default_stylesheets)
-    compressor.register_bundle(foundation_scripts)
+    compressor.register_bundle(default_js)
+    compressor.register_bundle(default_css)
+    compressor.register_bundle(foundation_js)
 
 
 def register_processors(compressor):

File passwood/assets/scripts.py

 from flask.ext.compressor import JSBundle, Asset, FileAsset
 
 
-default_scripts = JSBundle("default_scripts", assets=[
+default_js = JSBundle("default.js", assets=[
     FileAsset(filename="bundles/modernizr/modernizr.js"),
     FileAsset(filename="bundles/jquery/jquery.js"),
     FileAsset(filename="scripts/login.coffee", processors=["coffee"]),
 ], processors=["jsmin"])
-foundation_scripts = JSBundle("foundation_scripts", assets=[
+foundation_js = JSBundle("foundation.js", assets=[
     FileAsset(filename="bundles/foundation/js/foundation.js"),
     Asset(content="$(document).foundation()", processors=["coffee"]),
 ], processors=["jsmin"])

File passwood/assets/stylesheets.py

 from flask.ext.compressor import CSSBundle, FileAsset
 
 
-default_stylesheets = CSSBundle("default_stylesheets", assets=[
+default_css = CSSBundle("default.css", assets=[
     FileAsset(filename="bundles/foundation/css/foundation.css"),
     FileAsset(filename="stylesheets/login.styl", processors=["stylus"]),
 ], processors=["cssmin"])

File passwood/templates/layouts/base.html

   <meta charset="utf-8">
   <meta name="csrf-token" content="{{ csrf_token() }}">
   <title>{{ title|default("Passwood") }}</title>
-  {{ compressor("default_scripts", inline=False) }}
-  {{ compressor("default_stylesheets", inline=False) }}
+  {{ compressor("default.js", inline=False) }}
+  {{ compressor("default.css", inline=False) }}
 </head>
 <body>
   <header>
   {% include "widgets/flash-message.html" %}
   {% block body %}
   {% endblock %}
-  {{ compressor("foundation_scripts", inline=False) }}
+  {{ compressor("foundation.js", inline=False) }}
 </body>
 </html>