diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-05-12 11:21:32 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-05-12 14:59:08 +0300 |
| commit | 7bea0fd4fe4016483f7af4a17c5a5e24e47b75bc (patch) | |
| tree | 3c058ada12b2ea8f87f3434d904a1450ad8c1442 | |
| parent | c82c9625568a2c3b758a7c9edb79d816d5d4b10f (diff) | |
app.js: support fragment path injection
| -rw-r--r-- | build.ant | 10 | ||||
| -rw-r--r-- | src/client/app.js | 5 |
2 files changed, 14 insertions, 1 deletions
@@ -163,6 +163,11 @@ excludes="template.d/" /> </copy> + <replaceregexp file="${deploy_target_dir}/static/js/app.js"> + <regexp pattern="\$\{fragment_d_path\}" /> + <substitution expression="/static/fragment.d" /> + </replaceregexp> + </parallel> </target> @@ -243,6 +248,11 @@ <substitution expression="${package_name}" /> </replaceregexp> + <replaceregexp file="${build_dir__deb_pkg}/src/client/app.js"> + <regexp pattern="\$\{fragment_d_path\}" /> + <substitution expression="/fragment.d" /> + </replaceregexp> + <!-- generate version fragment --> <generate_version_tag outputdir="${build_dir__deb_pkg}/${default_fragmentd_src_path}/template.d" /> diff --git a/src/client/app.js b/src/client/app.js index 10b1493d..7b74724c 100644 --- a/src/client/app.js +++ b/src/client/app.js @@ -1,5 +1,8 @@ (function() { + var lib_path = '/static/lib/'; + var fragmentd_path = '${fragment_d_path}'; // [!] see README.md#Deployment note + var config = { shim: { 'socketio': { exports: 'io' }, @@ -13,7 +16,7 @@ Bacon: lib_path + 'Bacon', caret: lib_path + 'caret', cola: lib_path + 'cola', - domain_types: 'fragment.d/js/domain_types', + domain_types: fragmentd_path + '/js/domain_types', d3: lib_path + 'd3/d3', feedback: lib_path + 'feedback', FileSaver: lib_path + 'FileSaver', |
