Skip to content

Loading…

archtype updates #828

Merged
merged 2 commits into from

3 participants

@isao
  • enable -p option for create mojit
  • update app/hybrid mojito controller to 0.5.x
@mojit0 mojit0 commented on the diff
...s/app/hybrid/mojits/top_frame/controller.server.js.hb
@@ -43,4 +42,9 @@ YUI.add('top_frame', function(Y, NAME) {
};
-}, '0.0.1', {requires: ['mojito', 'top_frameModelFoo']});
+}, '0.0.1', {requires: [
+ 'mojito',
+ 'mojito-assets-addon',
+ 'mojito-models-addon',
+ 'top_frameModelFoo'
@mojit0
mojit0 added a note

I think this has to change to something ala '{{name}}ModelFoo'.

@drewfish Yahoo Inc. member
drewfish added a note

This is an app archetype, which contains a canned "top_frame" mojit, so I think what Isao has is correct.

@isao
isao added a note

it's inconsistent, I know. the hybrid archetype is supposed to include both an app and a mojit and the mojit name was hard-coded (was a requirement)

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

One comment, otherwise +1

@drewfish
Yahoo Inc. member

+1

@isao isao merged commit 2fec468 into yahoo:develop
@isao isao added a commit to isao/mojito that referenced this pull request
@isao isao Revert "Merge pull request #828 from isao/createport"
This reverts commit 2fec468, reversing
changes made to e716cc5.
72fe0d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 4, 2012
  1. @isao

    add {{port}} in application.json.hb so that the

    isao committed
    `mojito create -p «portnum»` option works
  2. @isao
View
1 lib/app/archetypes/app/default/application.json
@@ -1,6 +1,7 @@
[
{
"settings": [ "master" ],
+ "appPort": "{{port}}",
"specs": {}
},
{
View
2 lib/app/archetypes/app/full/application.json
@@ -2,7 +2,7 @@
{
"settings": [ "master" ],
- "appPort": 8666,
+ "appPort": "{{port}}",
"cacheViewTemplates": true,
"staticHandling": {
"appName": "app",
View
18 lib/app/archetypes/app/hybrid/mojits/top_frame/controller.server.js.hb
@@ -2,6 +2,8 @@
* Copyright (c) 2012 Yahoo! Inc. All rights reserved.
*/
/*jslint anon:true, sloppy:true, nomen:true*/
+/*globals YUI*/
+
YUI.add('top_frame', function(Y, NAME) {
/**
@@ -18,10 +20,6 @@ YUI.add('top_frame', function(Y, NAME) {
*/
Y.namespace('mojito.controllers')[NAME] = {
- init: function(config) {
- this.config = config;
- },
-
/**
* Method corresponding to the 'index' action.
*
@@ -29,9 +27,10 @@ YUI.add('top_frame', function(Y, NAME) {
* to the Mojito API.
*/
index: function(ac) {
- ac.models.top_frameModelFoo.getData(function(err, data) {
+ ac.models.get('top_frameModelFoo').getData(function(err, data) {
if (err) {
- return ac.error(err);
+ ac.error(err);
+ return;
}
ac.done({
@@ -43,4 +42,9 @@ YUI.add('top_frame', function(Y, NAME) {
};
-}, '0.0.1', {requires: ['mojito', 'top_frameModelFoo']});
+}, '0.0.1', {requires: [
+ 'mojito',
+ 'mojito-assets-addon',
+ 'mojito-models-addon',
+ 'top_frameModelFoo'
@mojit0
mojit0 added a note

I think this has to change to something ala '{{name}}ModelFoo'.

@drewfish Yahoo Inc. member
drewfish added a note

This is an app archetype, which contains a canned "top_frame" mojit, so I think what Isao has is correct.

@isao
isao added a note

it's inconsistent, I know. the hybrid archetype is supposed to include both an app and a mojit and the mojit name was hard-coded (was a requirement)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+]});
View
1 lib/app/archetypes/app/simple/application.json
@@ -1,6 +1,7 @@
[
{
"settings": [ "master" ],
+ "appPort": "{{port}}",
"specs": {}
},
{
View
1 lib/app/archetypes/app/yahoo/application.json
@@ -1,6 +1,7 @@
[
{
"settings": [ "master" ],
+ "appPort": "{{port}}",
"specs": {}
},
{
Something went wrong with that request. Please try again.