2012-03-14 00:55:19 +04:00
|
|
|
# A list of our CSS and JS assets for jingo-minify.
|
|
|
|
|
|
|
|
CSS = {
|
|
|
|
'mkt/devreg': (
|
|
|
|
# Contains reset, clearfix, etc.
|
|
|
|
'css/devreg/base.css',
|
|
|
|
|
|
|
|
# Base styles (body, breadcrumbs, islands, columns).
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/base.styl',
|
|
|
|
'css/devreg/breadcrumbs.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Typographical styles (font treatments, headings).
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/typography.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Header (aux-nav, masthead, site-nav).
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/desktop-account-links.styl',
|
|
|
|
'css/devreg/header.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Item rows (used on Dashboard).
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/listing.styl',
|
|
|
|
'css/devreg/legacy-paginator.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Buttons (used for paginator, "Edit" buttons, Refunds page).
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/buttons.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Popups, Modals, Tooltips.
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/overlay.styl',
|
|
|
|
'css/devreg/popups.styl',
|
|
|
|
'css/devreg/device.styl',
|
|
|
|
'css/devreg/tooltips.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# L10n menu ("Localize for ...").
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/l10n.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Forms (used for tables on "Manage ..." pages).
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/forms.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
2012-12-30 09:55:08 +04:00
|
|
|
# Tables.
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/data-grid.styl',
|
2012-12-30 09:55:08 +04:00
|
|
|
|
2012-03-14 00:55:19 +04:00
|
|
|
# Landing page
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/landing.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# "Manage ..." pages.
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/manage.styl',
|
|
|
|
'css/devreg/prose.styl',
|
|
|
|
'css/devreg/authors.styl',
|
|
|
|
'css/devreg/in-app-config.styl',
|
|
|
|
'css/devreg/payments.styl',
|
|
|
|
'css/devreg/refunds.styl',
|
|
|
|
'css/devreg/transactions.styl',
|
|
|
|
'css/devreg/status.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Image Uploads (used for "Edit Listing" Images and Submission).
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/media.styl',
|
|
|
|
'css/devreg/invisible-upload.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Submission.
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/submit-progress.styl',
|
|
|
|
'css/devreg/submit-terms.styl',
|
|
|
|
'css/devreg/submit-manifest.styl',
|
|
|
|
'css/devreg/submit-details.styl',
|
|
|
|
'css/devreg/validation.styl',
|
|
|
|
'css/devreg/submit.styl',
|
|
|
|
'css/devreg/tabs.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Developer Log In / Registration.
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/login.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Footer.
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/footer.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
),
|
2012-04-04 21:37:52 +04:00
|
|
|
'mkt/reviewers': (
|
2013-03-01 23:55:19 +04:00
|
|
|
'css/zamboni/editors.css',
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/consumer-buttons.styl',
|
|
|
|
'css/devreg/ratings.styl',
|
|
|
|
'css/devreg/data-grid.styl',
|
|
|
|
'css/devreg/reviewers.styl',
|
|
|
|
'css/devreg/themes_review.styl',
|
|
|
|
'css/devreg/legacy-paginator.styl',
|
|
|
|
'css/devreg/files.styl',
|
2012-04-04 21:37:52 +04:00
|
|
|
),
|
2012-11-30 01:43:37 +04:00
|
|
|
'mkt/splash': (
|
2013-03-19 02:27:11 +04:00
|
|
|
'css/mkt/splash.styl',
|
2012-11-30 01:43:37 +04:00
|
|
|
),
|
2012-03-20 12:23:22 +04:00
|
|
|
'mkt/consumer': (
|
2013-03-19 02:27:11 +04:00
|
|
|
'css/mkt/reset.styl',
|
|
|
|
'css/mkt/typography.styl',
|
|
|
|
'css/mkt/site.styl',
|
|
|
|
'css/mkt/banners.styl',
|
|
|
|
'css/mkt/forms.styl',
|
|
|
|
'css/mkt/header.styl',
|
|
|
|
'css/mkt/account-links.styl',
|
|
|
|
'css/mkt/buttons.styl',
|
|
|
|
'css/mkt/tile.styl',
|
|
|
|
'css/mkt/notification.styl',
|
|
|
|
'css/mkt/detail.styl',
|
|
|
|
'css/mkt/ratings.styl',
|
|
|
|
'css/mkt/abuse.styl',
|
|
|
|
'css/mkt/categories.styl',
|
|
|
|
'css/mkt/menu.styl',
|
|
|
|
'css/mkt/infobox.styl',
|
|
|
|
'css/mkt/promo-grid.styl',
|
|
|
|
'css/mkt/overlay.styl',
|
|
|
|
'css/mkt/search.styl',
|
|
|
|
'css/mkt/paginator.styl',
|
|
|
|
'css/mkt/suggestions.styl',
|
|
|
|
'css/mkt/account.styl',
|
|
|
|
'css/mkt/login.styl',
|
|
|
|
'css/mkt/purchase.styl',
|
|
|
|
'css/mkt/lightbox.styl',
|
|
|
|
'css/mkt/filters.styl',
|
2012-03-14 00:55:19 +04:00
|
|
|
),
|
2012-04-25 04:15:49 +04:00
|
|
|
'mkt/ecosystem': (
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/reset.styl',
|
|
|
|
'css/devreg/consumer-typography.styl',
|
|
|
|
'css/devreg/login.styl',
|
|
|
|
'css/devreg/forms.styl',
|
2013-03-19 03:48:17 +04:00
|
|
|
'css/ecosystem/landing.styl',
|
|
|
|
'css/ecosystem/documentation.styl',
|
2012-05-03 02:29:56 +04:00
|
|
|
),
|
2012-03-21 02:37:02 +04:00
|
|
|
'mkt/in-app-payments': (
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/reset.styl',
|
|
|
|
'css/devreg/consumer-typography.styl',
|
|
|
|
'css/devreg/buttons.styl',
|
|
|
|
'css/devreg/in-app-payments.styl',
|
2012-03-21 02:37:02 +04:00
|
|
|
),
|
2012-03-28 12:25:01 +04:00
|
|
|
'mkt/stats': (
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/legacy-paginator.styl',
|
2013-02-28 08:49:16 +04:00
|
|
|
'css/devreg/jquery-ui/jquery-ui-1.10.1.custom.css',
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/stats.styl',
|
2012-03-28 12:25:01 +04:00
|
|
|
),
|
2012-06-27 22:52:48 +04:00
|
|
|
'mkt/lookup': (
|
2013-03-19 07:55:13 +04:00
|
|
|
'css/devreg/lookup-tool.styl',
|
|
|
|
'css/devreg/activity.styl',
|
2012-05-25 02:12:37 +04:00
|
|
|
),
|
2013-02-27 23:53:26 +04:00
|
|
|
'mkt/gaia': (
|
|
|
|
# Gaia building blocks.
|
|
|
|
'css/gaia/action_menu.css',
|
2013-03-07 03:17:45 +04:00
|
|
|
'css/gaia/switches.css',
|
|
|
|
'css/gaia/value_selector.css',
|
2013-02-27 23:53:26 +04:00
|
|
|
)
|
2012-03-14 00:55:19 +04:00
|
|
|
}
|
|
|
|
|
2012-10-10 10:33:36 +04:00
|
|
|
# Bundle extensions (e.g., desktop).
|
|
|
|
CSS.update({
|
|
|
|
'mkt/consumer-desktop': CSS['mkt/consumer'] + (
|
|
|
|
# TODO: Split components into individual, appropriate stylesheets.
|
2013-03-19 02:27:11 +04:00
|
|
|
'css/mkt/desktop.styl',
|
|
|
|
'css/mkt/desktop-tile.styl',
|
|
|
|
'css/mkt/desktop-filters.styl',
|
|
|
|
'css/mkt/desktop-forms.styl',
|
|
|
|
'css/mkt/desktop-account.styl',
|
|
|
|
'css/mkt/desktop-listing.styl',
|
|
|
|
'css/mkt/desktop-details.styl',
|
|
|
|
'css/mkt/desktop-ratings.styl',
|
2012-12-31 20:50:07 +04:00
|
|
|
),
|
|
|
|
})
|
|
|
|
|
2012-03-14 00:55:19 +04:00
|
|
|
JS = {
|
|
|
|
'mkt/devreg': (
|
2012-11-29 02:06:58 +04:00
|
|
|
# tiny module loader
|
|
|
|
'js/lib/amd.js',
|
|
|
|
|
2013-02-15 04:38:33 +04:00
|
|
|
'js/lib/jquery-1.9.1.js',
|
2012-03-14 00:55:19 +04:00
|
|
|
'js/lib/underscore.js',
|
2013-03-01 05:08:34 +04:00
|
|
|
'js/lib/format.js',
|
|
|
|
'js/lib/jquery.cookie.js',
|
|
|
|
'js/lib/stick.js',
|
|
|
|
'js/lib/csrf.js',
|
2013-03-11 20:57:16 +04:00
|
|
|
'js/common/fakefilefield.js',
|
2013-02-22 04:55:54 +04:00
|
|
|
'js/mkt/gettext.js',
|
2012-12-18 05:12:58 +04:00
|
|
|
'js/mkt/tracking.js',
|
2013-03-04 17:08:34 +04:00
|
|
|
'js/devreg/init.js', # This one excludes buttons initialization, etc.
|
2013-03-01 05:08:34 +04:00
|
|
|
'js/mkt/modal.js',
|
|
|
|
'js/mkt/overlay.js',
|
2012-07-26 02:02:56 +04:00
|
|
|
'js/mkt/capabilities.js',
|
2013-03-04 17:08:34 +04:00
|
|
|
'js/devreg/slugify.js',
|
|
|
|
'js/devreg/formdata.js',
|
2013-03-01 05:08:34 +04:00
|
|
|
'js/devreg/tooltip.js',
|
|
|
|
'js/devreg/popup.js',
|
2012-09-08 00:33:28 +04:00
|
|
|
'js/mkt/login.js',
|
2012-12-05 08:03:15 +04:00
|
|
|
'js/mkt/notification.js',
|
2013-03-01 05:08:34 +04:00
|
|
|
'js/mkt/outgoing_links.js',
|
|
|
|
'js/mkt/utils.js',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
2013-03-01 05:08:34 +04:00
|
|
|
'js/impala/serializers.js',
|
|
|
|
'js/common/keys.js',
|
2012-08-14 03:47:15 +04:00
|
|
|
'js/common/upload-base.js',
|
|
|
|
'js/common/upload-packaged-app.js',
|
2012-03-29 00:39:34 +04:00
|
|
|
'js/common/upload-image.js',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
2013-03-01 05:08:34 +04:00
|
|
|
'js/devreg/l10n.js',
|
|
|
|
|
|
|
|
# jQuery UI
|
|
|
|
'js/lib/jquery-ui/jquery-ui-1.10.1.custom.js',
|
|
|
|
'js/lib/jquery.minicolors.js',
|
|
|
|
|
2012-03-14 00:55:19 +04:00
|
|
|
'js/devreg/devhub.js',
|
2012-09-20 02:08:07 +04:00
|
|
|
'js/devreg/submit.js',
|
2012-10-24 04:37:02 +04:00
|
|
|
'js/devreg/tabs.js',
|
2012-08-03 22:43:32 +04:00
|
|
|
'js/devreg/edit.js',
|
2013-03-01 05:08:34 +04:00
|
|
|
'js/devreg/validator.js',
|
2012-03-14 00:55:19 +04:00
|
|
|
|
|
|
|
# Specific stuff for making payments nicer.
|
2013-01-31 04:05:51 +04:00
|
|
|
'js/devreg/payments-enroll.js',
|
|
|
|
'js/devreg/payments-manage.js',
|
|
|
|
'js/devreg/payments.js',
|
2012-12-05 08:03:15 +04:00
|
|
|
|
2013-04-03 04:33:50 +04:00
|
|
|
# For testing installs.
|
|
|
|
'js/mkt/apps.js',
|
|
|
|
'js/devreg/test-install.js',
|
|
|
|
|
2012-12-05 08:03:15 +04:00
|
|
|
# Module initialization.
|
2012-12-05 11:15:35 +04:00
|
|
|
'js/devreg/devreg_init.js',
|
2012-03-14 00:55:19 +04:00
|
|
|
),
|
2012-03-20 12:23:22 +04:00
|
|
|
'mkt/consumer': (
|
2012-11-28 05:37:19 +04:00
|
|
|
# tiny module loader
|
|
|
|
'js/lib/amd.js',
|
|
|
|
|
2013-02-15 04:38:33 +04:00
|
|
|
'js/lib/jquery-1.9.1.js',
|
2012-11-02 02:57:00 +04:00
|
|
|
'js/lib/jquery.cookie.js',
|
2012-03-15 05:20:45 +04:00
|
|
|
'js/lib/underscore.js',
|
2012-03-22 05:35:08 +04:00
|
|
|
'js/lib/format.js',
|
2012-08-10 03:22:00 +04:00
|
|
|
|
|
|
|
# slider lib
|
2012-08-10 02:13:49 +04:00
|
|
|
'js/lib/flipsnap.js',
|
2012-11-28 05:37:19 +04:00
|
|
|
|
2012-12-18 05:12:58 +04:00
|
|
|
'js/mkt/tracking.js',
|
2012-04-26 02:21:22 +04:00
|
|
|
'js/mkt/utils.js',
|
2012-05-12 11:03:45 +04:00
|
|
|
'js/lib/csrf.js',
|
2013-02-22 04:55:54 +04:00
|
|
|
'js/mkt/gettext.js',
|
2012-04-26 02:13:59 +04:00
|
|
|
'js/zamboni/browser.js',
|
2012-03-20 05:21:39 +04:00
|
|
|
'js/mkt/init.js',
|
2012-10-09 01:26:20 +04:00
|
|
|
'js/lib/truncate.js',
|
2012-04-12 01:14:22 +04:00
|
|
|
'js/zamboni/truncation.js',
|
2012-03-22 05:35:08 +04:00
|
|
|
'js/common/keys.js',
|
2012-03-20 05:21:39 +04:00
|
|
|
'js/mkt/capabilities.js',
|
2012-11-27 02:00:50 +04:00
|
|
|
'js/mkt/banners.js',
|
2012-07-20 22:43:02 +04:00
|
|
|
'js/impala/serializers.js',
|
2013-02-12 08:52:38 +04:00
|
|
|
'js/mkt/potatocaptcha.js',
|
2012-04-12 12:39:08 +04:00
|
|
|
'js/mkt/overlay.js',
|
2012-04-10 05:01:10 +04:00
|
|
|
'js/mkt/login.js',
|
2012-03-15 05:20:45 +04:00
|
|
|
'js/mkt/install.js',
|
2012-03-24 01:05:32 +04:00
|
|
|
'js/mkt/payments.js',
|
2012-04-12 01:14:22 +04:00
|
|
|
'js/mkt/buttons.js',
|
2012-03-17 02:23:09 +04:00
|
|
|
'js/mkt/search.js',
|
2012-03-20 02:56:48 +04:00
|
|
|
'js/mkt/apps.js',
|
2013-02-25 22:17:26 +04:00
|
|
|
'js/mkt/header.js',
|
2012-03-22 05:35:08 +04:00
|
|
|
|
2012-11-28 05:37:19 +04:00
|
|
|
# ui
|
|
|
|
'js/mkt/notification.js',
|
|
|
|
|
2012-03-22 05:35:08 +04:00
|
|
|
# Search suggestions.
|
|
|
|
'js/impala/ajaxcache.js',
|
|
|
|
'js/impala/suggestions.js',
|
2012-10-01 21:49:05 +04:00
|
|
|
'js/mkt/mkt_suggestions.js',
|
2012-03-28 22:00:30 +04:00
|
|
|
|
|
|
|
# Account settings.
|
2013-02-21 03:40:39 +04:00
|
|
|
'js/mkt/account.js',
|
2013-01-02 21:07:02 +04:00
|
|
|
'js/mkt/feedback.js',
|
2012-04-19 02:51:08 +04:00
|
|
|
|
2012-06-27 03:13:59 +04:00
|
|
|
# Fix-up outgoing links.
|
|
|
|
'js/mkt/outgoing_links.js',
|
|
|
|
|
2012-05-02 03:48:08 +04:00
|
|
|
# Stick.
|
|
|
|
'js/lib/stick.js',
|
2012-11-29 05:45:53 +04:00
|
|
|
|
2012-12-07 02:11:05 +04:00
|
|
|
'js/mkt/prefetch.js',
|
|
|
|
|
2012-11-29 05:45:53 +04:00
|
|
|
# Module initialization.
|
2012-12-05 08:03:15 +04:00
|
|
|
'js/mkt/consumer_init.js',
|
2012-03-14 00:55:19 +04:00
|
|
|
),
|
2012-05-15 03:43:49 +04:00
|
|
|
'mkt/reviewers': (
|
2013-03-12 02:15:59 +04:00
|
|
|
'js/lib/highcharts.src.js',
|
2013-03-12 18:58:20 +04:00
|
|
|
'js/zamboni/storage.js',
|
2013-03-12 02:15:59 +04:00
|
|
|
'js/zamboni/editors.js',
|
|
|
|
'js/impala/formset.js',
|
|
|
|
'js/lib/jquery.hoverIntent.js',
|
|
|
|
'js/lib/jquery.zoomBox.js',
|
|
|
|
'js/mkt/themes_review.js',
|
2012-05-15 03:43:49 +04:00
|
|
|
'js/mkt/apps.js',
|
2013-01-16 01:48:05 +04:00
|
|
|
'js/mkt/payments.js',
|
2012-05-15 03:43:49 +04:00
|
|
|
'js/mkt/install.js',
|
|
|
|
'js/mkt/buttons.js',
|
2012-06-28 18:30:39 +04:00
|
|
|
'js/mkt/reviewers.js',
|
2013-03-05 00:57:30 +04:00
|
|
|
'js/devreg/expandable.js',
|
2013-03-08 07:17:55 +04:00
|
|
|
'js/devreg/mobile_review_actions.js',
|
2013-03-11 20:57:16 +04:00
|
|
|
'js/common/fakefilefield.js',
|
|
|
|
'js/common/formsets.js',
|
2013-06-20 03:21:34 +04:00
|
|
|
'js/common/buckets.js',
|
2013-01-16 01:48:05 +04:00
|
|
|
'js/devreg/reviewers_init.js',
|
2012-05-15 03:43:49 +04:00
|
|
|
),
|
2012-03-28 12:25:01 +04:00
|
|
|
'mkt/stats': (
|
2012-06-19 00:23:35 +04:00
|
|
|
'js/zamboni/storage.js',
|
2012-03-28 12:25:01 +04:00
|
|
|
'js/mkt/modal.js',
|
|
|
|
'js/lib/highcharts.src.js',
|
2012-05-15 21:54:28 +04:00
|
|
|
'js/mkt/stats/csv_keys.js',
|
|
|
|
'js/mkt/stats/helpers.js',
|
|
|
|
'js/mkt/stats/dateutils.js',
|
|
|
|
'js/mkt/stats/manager.js',
|
|
|
|
'js/mkt/stats/controls.js',
|
|
|
|
'js/mkt/stats/overview.js',
|
|
|
|
'js/mkt/stats/topchart.js',
|
|
|
|
'js/mkt/stats/chart.js',
|
|
|
|
'js/mkt/stats/table.js',
|
2012-06-09 03:35:52 +04:00
|
|
|
'js/mkt/stats/chart_column.js',
|
2012-05-15 21:54:28 +04:00
|
|
|
'js/mkt/stats/stats.js',
|
2012-03-28 12:25:01 +04:00
|
|
|
),
|
2012-04-06 04:40:03 +04:00
|
|
|
'mkt/in-app-payments': (
|
2013-02-15 04:38:33 +04:00
|
|
|
'js/lib/jquery-1.9.1.js',
|
2012-04-06 04:40:03 +04:00
|
|
|
'js/mkt/inapp_payments.js',
|
2012-05-12 11:03:45 +04:00
|
|
|
'js/lib/csrf.js',
|
2012-05-05 00:34:48 +04:00
|
|
|
'js/impala/serializers.js',
|
2012-04-17 03:30:16 +04:00
|
|
|
'js/mkt/login.js',
|
2012-04-06 04:40:03 +04:00
|
|
|
),
|
2012-06-27 22:52:48 +04:00
|
|
|
'mkt/lookup': (
|
2012-05-25 02:12:37 +04:00
|
|
|
'js/common/keys.js',
|
|
|
|
'js/impala/ajaxcache.js',
|
|
|
|
'js/impala/suggestions.js',
|
2012-06-27 22:52:48 +04:00
|
|
|
'js/mkt/lookup-tool.js',
|
2012-05-25 02:12:37 +04:00
|
|
|
),
|
2012-10-01 23:40:50 +04:00
|
|
|
'mkt/ecosystem': (
|
|
|
|
'js/mkt/ecosystem.js',
|
|
|
|
),
|
2012-10-18 03:33:53 +04:00
|
|
|
'mkt/debug': (
|
|
|
|
'js/debug/tinytools.js',
|
|
|
|
),
|
2012-03-14 00:55:19 +04:00
|
|
|
}
|
2013-02-01 03:04:04 +04:00
|
|
|
|
|
|
|
JS_desktop = list(JS['mkt/consumer'])
|
|
|
|
if 'js/mkt/consumer_init.js' in JS_desktop:
|
|
|
|
JS_desktop.remove('js/mkt/consumer_init.js')
|
|
|
|
JS_desktop = tuple(JS_desktop)
|
|
|
|
|
|
|
|
JS.update({
|
|
|
|
'mkt/consumer-desktop': JS_desktop + (
|
|
|
|
# This must be the last JS file defined!
|
|
|
|
'js/mkt/consumer_init.js',
|
|
|
|
),
|
|
|
|
})
|
2013-02-15 17:58:15 +04:00
|
|
|
|
|
|
|
|
|
|
|
def jquery_migrated():
|
|
|
|
new_JS = dict(JS)
|
|
|
|
for bundle, files in new_JS.iteritems():
|
|
|
|
files = list(files)
|
|
|
|
try:
|
|
|
|
jquery = files.index('js/lib/jquery-1.9.1.js')
|
|
|
|
except ValueError:
|
|
|
|
continue
|
|
|
|
# Insert jquery-migrate immediately after jquery (before any files
|
|
|
|
# requiring jquery are loaded).
|
|
|
|
files.insert(jquery + 1, 'js/lib/jquery-migrate-1.1.0.js')
|
|
|
|
new_JS[bundle] = tuple(files)
|
|
|
|
return new_JS
|
2013-03-13 03:04:25 +04:00
|
|
|
|
|
|
|
|
|
|
|
def less2stylus():
|
|
|
|
"""
|
|
|
|
This will return a dict of the CSS bundles with `.styl` stylesheets
|
|
|
|
instead of `.less` ones.
|
|
|
|
|
|
|
|
Put in your local settings::
|
|
|
|
|
|
|
|
try:
|
|
|
|
MINIFY_BUNDLES['css'].update(asset_bundles.less2stylus())
|
|
|
|
except AttributeError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
"""
|
|
|
|
import os
|
|
|
|
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
def stylus(fn):
|
|
|
|
fn_styl = fn.replace('.less', '.styl')
|
|
|
|
if os.path.exists(os.path.join(ROOT, 'media', fn_styl)):
|
|
|
|
fn = fn_styl
|
|
|
|
return fn
|
|
|
|
|
|
|
|
new_CSS = dict(CSS)
|
|
|
|
for bundle, files in new_CSS.iteritems():
|
|
|
|
new_CSS[bundle] = tuple(stylus(f) for f in files)
|
|
|
|
return new_CSS
|