Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-dashboard
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-analytics-dashboard
Commits
1cb51b37
Commit
1cb51b37
authored
Mar 02, 2015
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #267 from edx/closure-compiler
Minifying JS with Closure Compiler
parents
adb2d8b7
b0277616
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
.travis.yml
+1
-0
README.md
+4
-2
analytics_dashboard/settings/base.py
+3
-0
analytics_dashboard/settings/test.py
+4
-2
scripts/closure-compiler.jar
+0
-0
No files found.
.travis.yml
View file @
1cb51b37
...
...
@@ -11,6 +11,7 @@ install:
-
make test.acceptance
-
pip install coveralls
script
:
-
make static -e DJANGO_SETTINGS_MODULE="analytics_dashboard.settings.test"
-
make validate
-
make generate_fake_translations
-
bash ./runAcceptance.sh
...
...
README.md
View file @
1cb51b37
...
...
@@ -9,6 +9,7 @@ Prerequisites
*
Python 2.7.x (not tested with Python 3.x)
*
[
gettext
](
http://www.gnu.org/software/gettext/
)
*
[
npm
](
https://www.npmjs.org/
)
*
[
JDK 7+
](
http://openjdk.java.net/
)
Getting Started
---------------
...
...
@@ -116,8 +117,9 @@ Note that only the following files (for each language) should be committed to th
Asset Pipeline
--------------
Static files are managed via [django-compressor](http://django-compressor.readthedocs.org/) and [RequireJS](http://requirejs.org/).
RequireJS (and r.js) are used to manage JavaScript dependencies. django-compressor compiles SASS, minifies JavaScript,
and handles naming files to facilitate cache busting during deployment.
RequireJS (and r.js) are used to manage JavaScript dependencies. django-compressor compiles SASS, minifies JavaScript (
using [Closure Compiler](https://developers.google.com/closure/compiler/)), and handles naming files to facilitate
cache busting during deployment.
Both tools should operate seamlessly in a local development environment. When deploying to production, call
`
make static
` to compile all static assets and move them to the proper location to be served.
...
...
analytics_dashboard/settings/base.py
View file @
1cb51b37
...
...
@@ -116,6 +116,9 @@ COMPRESS_PRECOMPILERS = (
)
COMPRESS_CSS_FILTERS
=
[
'compressor.filters.css_default.CssAbsoluteFilter'
]
COMPRESS_JS_FILTERS
=
[
'compressor.filters.closure.ClosureCompilerFilter'
]
COMPRESS_CLOSURE_COMPILER_BINARY
=
'java -jar scripts/closure-compiler.jar'
COMPRESS_CLOSURE_JS_ARGUMENTS
=
{
'compilation_level'
:
'ADVANCED_OPTIMIZATIONS'
,
}
########## END STATIC FILE CONFIGURATION
...
...
analytics_dashboard/settings/test.py
View file @
1cb51b37
...
...
@@ -27,5 +27,7 @@ COURSE_API_URL = 'http://course-api-host'
LOGGING
=
get_logger_config
(
debug
=
DEBUG
,
dev_env
=
True
,
local_loglevel
=
'DEBUG'
)
# Compressing assets slows down view rendering. Since we don't actually need assets, don't bother compressing them.
COMPRESS_ENABLED
=
False
# Use production settings for asset compression so that asset compilation can be tested on the CI server.
COMPRESS_ENABLED
=
True
COMPRESS_OFFLINE
=
True
RJS_OPTIMIZATION_ENABLED
=
True
scripts/closure-compiler.jar
0 → 100644
View file @
1cb51b37
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment