resolve loader config for Hybridapp in 0.5.x #859

Merged
merged 8 commits into from Dec 14, 2012

Projects

None yet

2 participants

@isao
Contributor
isao commented Dec 13, 2012
  • use 0.5.x yui.config.x instead of older yui.x
  • use relatve config.base and config.group.app.base
  • rm obsolete, add some empty properties to override new defaults
  • use yui.config.seed to point to resolved synthetic files, per @caridy. this avoids having to create a symlink to emulate the «static-prefix»/yui/ uri

only changes are to archetype/hybrid/app/application.json

isao added some commits Dec 12, 2012
@isao isao yui configs now in yui.config; rm dependencyCalc f1faf28
@isao isao add groups df3f281
@isao isao revert base, whsp 6511c42
@isao isao use symlinked yui/ 8f02b14
@isao isao resolve loader config for Hybridapp in 0.5.x
config changes that avoid find/replace hacks, thanks Caridy

* use 0.5.x yui.config.x instead of older yui.x
* use relatve config.base and config.group.app.base
* rm obsolete, add some empty properties to override new defaults
* use yui.config.seed to point to resolved synthetic files, per @caridy. this avoids having to create a symlink to emulate the «static-prefix»/yui/ uri
b852d82
@caridy caridy commented on an outdated diff Dec 13, 2012
lib/app/archetypes/app/hybrid/application.json.hb
"yui": {
- "dependencyCalculations": "precomputed",
- "base": "/yahoo.libs.yui/",
- "url": "$$yui.base$$yui/yui-debug.js",
- "loader": "loader/loader-debug.js"
+ "config": {
+ "seed": [
+ "/yahoo.libs.yui/yui-base/yui-base-min.js",
+ "/yahoo.libs.yui/loader-base/loader-base-min.js",
+ "loader-yui3-resolved{langPath}",
+ "loader-app",
+ "loader-app-base{langPath}"
+ ],
+ "base": "../yahoo.libs.yui/",
+ "combine": false,
+ "comboBase": "",
@caridy
caridy Dec 13, 2012 Collaborator

remove comboBase, not needed.

@caridy caridy commented on an outdated diff Dec 13, 2012
lib/app/archetypes/app/hybrid/application.json.hb
+ "config": {
+ "seed": [
+ "/yahoo.libs.yui/yui-base/yui-base-min.js",
+ "/yahoo.libs.yui/loader-base/loader-base-min.js",
+ "loader-yui3-resolved{langPath}",
+ "loader-app",
+ "loader-app-base{langPath}"
+ ],
+ "base": "../yahoo.libs.yui/",
+ "combine": false,
+ "comboBase": "",
+ "root": "",
+ "groups": {
+ "app": {
+ "combine": false,
+ "comboBase": "",
@caridy
caridy Dec 13, 2012 Collaborator

remove comboBase, not needed.

@caridy
Collaborator
caridy commented Dec 13, 2012

please, check the notes

@caridy caridy commented on an outdated diff Dec 13, 2012
lib/app/archetypes/app/hybrid/application.json.hb
"yui": {
- "dependencyCalculations": "precomputed",
- "base": "/yahoo.libs.yui/",
- "url": "$$yui.base$$yui/yui-debug.js",
- "loader": "loader/loader-debug.js"
+ "config": {
+ "seed": [
+ "/yahoo.libs.yui/yui-base/yui-base-min.js",
+ "/yahoo.libs.yui/loader-base/loader-base-min.js",
+ "loader-yui3-resolved{langPath}",
+ "loader-app",
+ "loader-app-base{langPath}"
@caridy
caridy Dec 13, 2012 Collaborator

use loader-app-resolved{langPath}, which behaves better, and in any case u are already using loader-yui3-resolved.

a quick note on this:

if you plan to run functional tests, it will not work because yui-test is not part of the resolved meta ;) for that u have to use "/yahoo.libs.yui/loader-yui3/loader-yui3-min.js" instead of "loader-yui3-resolved{langPath}"

isao added some commits Dec 13, 2012
@isao isao apply feedback from Caridy: "use loader-app
-resolved{langPath}, which behaves
better, and in any case u are already using 
loader-yui3-resolved."
44f91c4
@isao isao rm comboBase per Caridy feedback 8c21fa7
@caridy
Collaborator
caridy commented Dec 13, 2012

+1

@isao isao for subdir case,
- build.hybridapp.forceRelativePaths: false
- yui.config.base: "/yahoo.libs.yui/"
- yui.config.groups.app.base: "/"

doesn't work via http, but should for crt://
5909dc8
@isao isao merged commit 21075b3 into yahoo:develop Dec 14, 2012

1 check passed

Details default The Travis build passed
@caridy
Collaborator
caridy commented Dec 14, 2012

@isao I like this solution better (I mean not using forceRelativePaths).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment