Permalink
Browse files

only load plugin text of widget

  • Loading branch information...
1 parent ad0d854 commit 984ea02d1cb0d78c3302be4d6f088cde1ab3ad28 @lepture lepture committed Apr 15, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 templates/snippet/head.html
@@ -18,19 +18,24 @@
{%- set enginefiles = engines %}
{%- if enginefiles|length %}
+{%- set pkg = config.package %}
+
{%- for file in enginefiles %}
<script src="{{content_url('')}}/sea-modules/{{file}}"></script>
{%- endfor %}
{%- else %}
+{%- if 'widget' in pkg.keywords %}
<script src="http://assets.spmjs.org/seajs/seajs/2.0.0/??sea.js,plugin-combo.js,plugin-text.js"></script>
+{%- else %}
+<script src="http://assets.spmjs.org/seajs/seajs/2.0.0/??sea.js,plugin-combo.js"></script>
+{%- endif %}
{%- endif %}
{%- set src = src_files %}
{%- set dist = dist_files %}
-{%- set pkg = config.package %}
<script>
(function() {

0 comments on commit 984ea02

Please sign in to comment.