YahooArchive / mojito-cli-create

[archiving soon] Provide the `create` command for the mojito-cli tool to make scaffolding/boilerplate.
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

Changed the naming syntax of modules in mojits to be similar to that of YUI modules. #27

Closed zhouyaoji closed 10 years ago

zhouyaoji commented 10 years ago

When you create the mojit Map with $ mojito create mojit simple Map, Mojito will create the controller with the module name map.

When you create the mojit Map with the following commands:

Mojito will create a controller, binder, models, and tests with the following module names:

drewfish commented 10 years ago

Overall looking good. Are you sure that all dependencies have been updated too?

zhouyaoji commented 10 years ago

@drewfish I'll check and confirm again that all dependencies have been update as well.

zhouyaoji commented 10 years ago

@drewfish I've confirmed that the app/mojit dependencies, including the test code, have been updated. The tests for the newly created apps/mojits from the updated archetypes also pass.

zhouyaoji commented 10 years ago

@isao I modified the function replaceCb to only lowercase values for the key {{name}}. I am not creating new archetypes. As for the README, I haven't changed the way that {{name}} and {{port}} are implemented, and custom key-value pairs are not affected now by the change.

zhouyaoji commented 10 years ago

@isao I retained the original form of replacer.js and made changes in index.js that would allow for both the YUI module and class naming convention with the following:

 keyval.class = keyval.name || name;
 keyval.name = keyval.class.toLowerCase();

I updated the README.md and the archetypes. I reviewed the rendered mojit code and ran tests for all the mojit types as well.

lzhan commented 10 years ago

LGTM