Skip to content

Commit

Permalink
Merge pull request #1 from yahoo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Yujun-Qian committed Apr 12, 2013
2 parents 47df0cd + 2b66743 commit 746af30
Show file tree
Hide file tree
Showing 99 changed files with 4,893 additions and 2,480 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
language: node_js
node_js:
- 0.8
- 0.6
- "0.10"
- "0.8"
- "0.6"
env:
- "testtype=unit"
- "testtype=func"
script:
- "cd tests && sh runall.sh $testtype"
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "wget -nv http://selenium.googlecode.com/files/selenium-server-standalone-2.30.0.jar"
- "java -jar selenium-server-standalone-2.30.0.jar -p 4444 > /dev/null &"
- "sleep 6"
- "sleep 6"
59 changes: 59 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ version @VERSION@
Notes
-----

Deprecations
------------

* `mojito compile` command was removed. It has been deprecated since 0.5.1.


Features
--------

Bug Fixes
---------

Acknowledgements
----------------

version 0.5.9
=============

Notes
-----

* The PR [#1059](/yahoo/mojito/issues/1059) adds the Mojito Quickstart Guide application
to the `examples` directory. The application allows you to view documentation on
different devices and serves as a reference application. You can view the live application
at http://y.ahoo.it/mqsg. Also, see the wiki page
[Mojito Quickstart Guide: Intro](https://github.com/yahoo/mojito/wiki/Mojito-Quickstart-Guide:-Intro)
for more information about the application.


Deprecations
------------

Expand All @@ -13,6 +42,34 @@ Features
Bug Fixes
---------

Acknowledgements
----------------

Special thanks to @luchenghan for contributing the Mojito Quickstart Guide app for this release.

version 0.5.8
=============

Notes
-----

* The PR [#1062](/yahoo/mojito/issues/1062) fixes the detection problems in YUI that
where causing multiple issues with Y.JSON.parse and other components. In the current
implementation, the app itself uses `require('yui')` in a traditional way to avoid any
potential issues in the future with the detection system in YUI. It also re-enabled
the ability to run YUI in debug mode in the server side if you happen to use `filter="debug"`
in `application.json` which has been broken for a long time.

Deprecations
------------

* "hybridapp" code and resources have been removed. They were purpose built for use with other cocktails components outside mojito, but their development has recently stopped.

Bug Fixes
---------

* [PR #1062](/yahoo/mojito/issues/1062): fixes the issue with Y.config.global after the upgrade to yui@3.9.1
* removed a few unnecessary datastructure copies

version 0.5.7
=============
Expand Down Expand Up @@ -47,6 +104,7 @@ Bug Fixes
------------
* issue bz6160815: port argument must be an integer


version 0.5.6
=================

Expand All @@ -69,6 +127,7 @@ Bug Fixes
* issue #1016: regression that prevented shaker for controllering CDN urls
* issue #1026: compatibility with Node.js 0.10 by making all mojits to play by the same rules


version 0.5.5
=================

Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/getting_started/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Prerequisites

**System:** Unix-based system.

**Software:** `Node.js (>= 0.6.0 < 0.8) <http://nodejs.org/>`_, `npm (> 1.0.0) <http://npmjs.org/>`_
**Software:** `Node.js (>= 0.6.0 < 0.9.0) <http://nodejs.org/>`_, `npm (> 1.0.0) <http://npmjs.org/>`_

.. _mojito_qs-install:

Expand Down
41 changes: 0 additions & 41 deletions docs/dev_guide/intro/mojito_configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,6 @@ builds Object
| `html5app <#html5app-obj>`_ | object | Specifies configuration for HTML5 applications |
| | | created with ``$ mojito build html5app``. |
+---------------------------------+---------------+--------------------------------------------------------------------------------+
| `hybridapp <#hybridapp-obj>`_ | object | Specifies configuration for hybrid applications |
| | | created with the following: |
| | | ``mojito build hybridapp -n <snapshot_name> -t <snapshot_tag> [<build_path>]`` |
+---------------------------------+---------------+--------------------------------------------------------------------------------+


.. _html5app_obj:
Expand Down Expand Up @@ -267,43 +263,6 @@ html5app Object
| | | | | ``urls: [ '/view.html']`` |
+------------------------+---------------+-----------+---------------+-------------------------------------------+

.. _hybrid_obj:

hybridapp Object
****************

The ``hybridapp`` object is used to specify build information for hybrid applications,
which are created with the command
``mojito build hybridapp -n <snapshot_name> -t <snapshot_tag> [<build_path>]``.
Hybrid applications are HTML5 applications that are designed to work with future
Cocktails components that will enable hybrid applications to use the native features
of mobile devices. Currently, hybrid applications are strictly an experimental feature of
Mojito and Cocktails.

+------------------------+---------------+-----------+-------------------------------+--------------------------------------------------------------------------------+
| Property | Data Type | Required? | Default Value | Description |
+========================+===============+===========+===============================+================================================================================+
| ``buildDir`` | string | no | none | The build path of the hybrid application. If not specified, the hybrid |
| | | | | application will be placed in ``artifacts/build/hybridapp``. The specified |
| | | | | path for ``buildDir`` will be overridden if a build path is given to the |
| | | | | following command: |
| | | | | ``mojito build hybridapp -n <snapshot_name> -t <snapshot_tag> [<build_path>]`` |
+------------------------+---------------+-----------+-------------------------------+--------------------------------------------------------------------------------+
| ``forceRelativePaths`` | boolean | no | ``false`` | When ``true``, the server-relative paths (those starting with "/") are |
| | | | | converted into paths relative to the generated file. |
+------------------------+---------------+-----------+-------------------------------+--------------------------------------------------------------------------------+
| ``packages`` | object | yes | none | An object containing key-value pairs that specify dependencies and their |
| | | | | associated versions. When you create a hybrid application with the command |
| | | | | ``mojito build hybridapp``, the dependencies listed in ``packages`` are added |
| | | | | to the ``packages.json`` of the built hybrid application. |
+------------------------+---------------+-----------+-------------------------------+--------------------------------------------------------------------------------+
| ``urls`` | array of | yes | none | The routing paths to views that be rendered into static pages and then cached |
| | strings | | | so that the page can be viewed offline. For example, if the running |
| | | | | application renders the view ``view.html``, you could configure the |
| | | | | application to statically create and cache ``view.html`` in |
| | | | | ``{app_dir}/artifacts/builds/hybridapp`` (default location) using the |
| | | | | following: ``urls: [ '/view.html']`` |
+------------------------+---------------+-----------+-------------------------------+--------------------------------------------------------------------------------+


.. _specs_obj:
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/quickstart/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Requirements

**System:** Unix-based system.

**Software:** `Node.js (>= 0.6.0 < 0.8) <http://nodejs.org/>`_, `npm (> 1.0.0) <http://npmjs.org/>`_
**Software:** `Node.js (>= 0.6.0 < 0.9.0) <http://nodejs.org/>`_, `npm (> 1.0.0) <http://npmjs.org/>`_

.. _mojito_quickstart-install:

Expand Down
39 changes: 10 additions & 29 deletions docs/dev_guide/reference/mojito_cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ Mojito offers the following three archetypes for applications and mojits.
specified. It is a happy medium between ``simple`` and ``full``.
- ``full`` - Provides the most comprehensive configuration and code for
applications.
- ``hybrid`` - Creates a hybrid HTML5 application that can be plugged into
a future component of Cocktails that will allow HTML5/JavaScript applications
to access the features of native devices.


.. _mj_cmdlne-testing:

Expand Down Expand Up @@ -258,37 +256,20 @@ specifying the pages in the ``"builds": "html5app"`` object in
object lets you add the ``manifest`` attribute to the ``html`` element,
configure relative paths, and specify a list of URLs to pages to generate.

.. _build_types-hybridapp:

hybridapp
#########


To build a hybrid application, use either of the following.

``$ mojito build hybridapp [--context <context>] --snapshotName <snapshot_name> --snapshotTag <snapshot_tag> [<path/to/app/>]``

``$ mojito build hybridapp [-c <context>] -n <snapshot_name> -t <snapshot_tag> [<path/to/app/>]``


This generates a HTML5 application that is customized to work with a future
component of the Cocktails suite that will allow you to write HTML5/JavaScript
applications that can access native features of mobile devices.

The generated application contains Mojito, frame mojits, the default mojit
``top_frame``, your created mojits, and application configuration. The command
will also create a ``snapshot.json`` file that can be used tracking and updating
applications.



.. _mj_cmdlne-compile_sys:

Compile System
==============
Compile System (Deprecated)
===========================

The ``compile`` command for generating files to optimize an application for
production has been **deprecated** and may not be available in the future.

Mojito comes with a compile command for generating files to optimize an application for
production.
We recommend that you use the npm module `Shaker <https://github.com/yahoo/mojito-shaker>`_,
which lets you compile (i.e., create rollups of) one or more input files. See the
`Shaker documentation <http://developer.yahoo.com/cocktails/shaker/>`_
to learn how to use Shaker in Mojito applications.

.. _compile_sys-syntax
Expand Down
4 changes: 2 additions & 2 deletions docs/dev_guide/resources/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Presentations/Slidecasts
| Title | Topics Covered | Description | Presenter |
+========================================================+========================================================+========================================================+======================+
| `Mojito: Tale of Two Runtimes | basic architecture of Mojito, mojits, MVC in | Provides a quick overview of Mojito and its core | Matt Taylor |
| <http://www.slideshare.net/rhyolight/mojito- | Mojito, ActionContext object, addons, binders, | components. | |
| sl-2011>`_ | client/server execution | | |
| <http://www.infoq.com/presentations/Mojito-A-Tale-of- | Mojito, ActionContext object, addons, binders, | components. | |
| Two-Runtimes>`_ | client/server execution | | |
+--------------------------------------------------------+--------------------------------------------------------+--------------------------------------------------------+----------------------+
| `JS Conf 2012 - Bruno Fernandez-Ruiz | device connectivity, network latency, progressive | Discusses how Mojito can solve the problem of serving | Bruno Fernandez-Ruiz |
| <http://blip.tv/file/6125446>`_ | enhancement, JavaScript on client/server, YUI3, | content to different devices, handle connectivity | |
Expand Down
2 changes: 2 additions & 0 deletions docs/dev_guide/topics/mojito_run_dyn_defined_mojits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Mojito also provides the ``dispatch`` method that can be called from the
``ActionContext`` object to run a dynamically defined child mojit. The
``dispatch`` method also allows you to define your own ``flush``,
``done``, and ``error`` functions for the child mojit instance.
The ``done`` and ``error`` methods are executed synchronously,
but the ``flush`` method is executed asynchronously.

.. _dyn_defined_mojits-use_cases:

Expand Down
10 changes: 8 additions & 2 deletions docs/dev_guide/topics/mojito_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ Required Software
- `Java <http://www.java.com/en/download/manual.jsp>`_
- `Node.js 0.6 or higher (packaged with npm) <http://nodejs.org/>`_
- `Git <http://git-scm.com/downloads>`_
- `Firefox v20 <http://www.mozilla.org/en-US/products/download>`_

.. _func_unit_reqs-macs:

Expand Down Expand Up @@ -632,15 +633,20 @@ Installing Selenium (recommended)

The following instructions work for both Macs and Linux.

#. `Download the Selenium JAR executable <http://selenium.googlecode.com/files/selenium-server-standalone-2.22.0.jar>`_.
#. `Download the Selenium v2.13.0 JAR executable <http://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar>`_.
#. Start the Selenium server:

``$ java -jar path/to/selenium-server.jar``
``$ java -jar path/to/selenium-server-standalone-2.31.0.jar``
#. Confirm Selenium is running by going to the following URL:

`http://localhost:4444/wd/hub/static/resource/hub.html <http://localhost:4444/wd/hub/static/resource/hub.html>`_
#. Shut down the Selenium server with ``Ctrl-C`` command.

.. warning:: If you are not using Firefox v20 and the Selenium Standalone Server v2.31.0, you
may run into backward compatibility issues. Please see the
`Platforms Supported by Selenium <http://docs.seleniumhq.org/about/platforms.jsp>`_
to learn what Selenium and browser versions are compatible.

.. _func_unit-run:

Running Tests
Expand Down
3 changes: 1 addition & 2 deletions docs/dev_guide/topics/mojito_yui_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ structure and then make assumptions. From this analysis, the synthetic modules
create application metadata that can be used by YUI Loader to load the application and
Mojito modules on demand. Without this metadata, the application cannot function.

Synthetic modules are not physical files except in the case of hybrid applications,
when synthetic modules are generated as files during the build process. If you need
Synthetic modules are not physical files. If you need
to generate physical files for a CDN from the synthetic modules, you can
use `Shaker <http://developer.yahoo.com/cocktails/shaker/>`_.
For production, we recommend using Shaker, especially in the case that your mojits contain
Expand Down
2 changes: 2 additions & 0 deletions examples/quickstartguide/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
artifacts/
node_modules/
5 changes: 5 additions & 0 deletions examples/quickstartguide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Quickstart Guide


Please see [Mojito Quickstart Guide](https://github.com/yahoo/mojito/wiki/Mojito-Quickstart-Guide)
for a quick overview and instructions for running the application.
65 changes: 65 additions & 0 deletions examples/quickstartguide/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
# Copyright (c) 2011-2013, Yahoo! Inc. All rights reserved.
# Copyrights licensed under the New BSD License.
# See the accompanying LICENSE file for terms.

# Both the server and client runtimes of an application can be configured. The application is configured in the
# application.json file in the application directory. The file consists of an array of zero or more configuration
# objects.
# For details on every configuration, visit: http://developer.yahoo.com/cocktails/mojito/docs/intro/mojito_configuring.html#application-configuration

# YAML supports commenting, JSON doesn't
- settings:
# "master" setting is the default context. If other context is specified, the attributes here will be overwritten
- master

# Declares Instances
specs:
# For routing info on this instance, visit: https://git.corp.yahoo.com/Mojits/quickstartguide/blob/master/src/routes.yaml#L15-L20
shelf:
# "base" will inherit the setting from specified instance
base: _frame
config:
child:
# Puts your mojit under a child of HTMLFrameMojit
# Mojit name by default will be the name of the folder. Can be specified in mojit's package.json
type: Shelf
config:
# Includes css or other javascript files
assets:
# top: loads before other renderings from the view; buttom: loads afterwards
top:
css:
- /static/Shelf/assets/shelf.css
# For routing info on this instance, visit: https://git.corp.yahoo.com/Mojits/quickstartguide/blob/master/src/routes.yaml#L21-L25
read:
base: _frame
config:
# Overwrites HTML header title
title: Mojito Quickstart Guide » Read
child:
type: Read
config:
assets:
top:
css:
- /static/Read/assets/read.css
_frame:
type: HTMLFrameMojit
# HTMLFrameMojit is a handy way to help you create HTML skelton
config:
# Deploy = true for binder to be executed
deploy: true
# HTML header title
title: Mojito Quickstart Guide
assets:
top:
blob:
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
css:
# Loads a global css
- /static/yahoo_application_quickstartguide/assets/reset.css
# Set up static name such as app name and prefix
staticHandling:
appName: yahoo_application_quickstartguide
...
File renamed without changes.
7 changes: 7 additions & 0 deletions examples/quickstartguide/assets/reset.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 746af30

Please sign in to comment.