GithubHelp home page GithubHelp logo

cordova-enyo's Introduction

cordova-enyo

A toolset for generating Cordova (PhoneGap) apps that work with the Enyo app development framework.

Apache Cordova is the engine behind Adobe PhoneGap - it enables you to create native mobile applications using HTML, CSS, and JavaScript.

Enyo is an open-source, component-based JavaScript framework for building mobile or web-based apps.

cordova-enyo is an integration of Cordova's command-line interface (CLI) and Enyo's Bootplate template app, making it easy to jumpstart a Cordova-enabled Enyo app.

Requirements

  • git
  • cordova-cli: The README provides a good overview of the installation procedure. A more detailed description, including information on how to set up all the platform-specific toolsets you might need is available here

cordova-enyo has been tested on Mac OS X, using the iOS and Android SDKs.

Quick Start

git clone [email protected]:linkmediainc/cordova-enyo.git
cd cordova-enyo
./bin/ce-create ./MyApp com.mydomain.myapp MyApp
cd MyApp  
cordova platform add ios
cordova build
cordova emulate

NOTE: To continue developing, edit the CSS and JavaScript files in the MyApp/enyo/source directory, rather than the www directory - this follows the conventions for Enyo development and is different than most Cordova apps. For more details, see "Developing Your App" below.

Details

ce-create

ce-create is the script that generates the Cordova-enabled Enyo application. To run it, make sure cordova-enyo/bin is in your $PATH, or else just specify the path (per the Quick Start example above).

ce-create takes the exact same arguments as the cordova create command; in fact, the arguments are passed in directly.

ce-create <directory> [<id> [<name>]]

If you omit the id and name arguments, the create command will generate workable defaults based on the directory name.

ce-create runs cordova create to generate the new application, then fetches the latest version of the Enyo bootplate template and places it into the enyo directory at the top of your new app directory.

Developing Your App

Once ce-create has been successfully run, you will use the standard cordova-cli commands to build and run your app, as well as to manage which platforms you want to build for. The cordova-cli page provides documentation for these commands.

IMPORTANT NOTE: Unlike most Cordova apps, you will do most of your development in the enyo/source directory. If you've done Cordova or PhoneGap development before, you're probably used to working in the www directory. This difference is due to the way that Enyo apps are built.

Enyo's bootplate template is set up to minify all of the JavaScript assets before deployment - this is a useful step as Enyo is a fairly large project, and the minification step keeps the package size small and speeds up the app's startup time. cordova-enyo takes advantages of hooks in the cordova-cli build commands, so that Enyo's build commands are run whenever cordova build is invoked. The output of the Enyo build process is then transferred to the www directory where it's picked up by Cordova's build command and transferred to the platform-specific build directory.

Running In The Browser

As a general rule, Cordova apps that rely on native APIs can't actually be run in the browser; but, if you're creating a simple app that doesn't use the native APIs, or if you're in the mockup phase and just want to do some quick tweaking/debugging, using a browser can be very handy: refreshing the page is a lot faster than relaunching the emulators, and you have access to all of browser-based developer tools.

To run your app in the browser, just open enyo/index-browser.html. This is a slightly altered version of the standard index.html with some key differences:

  • the native Cordova APIs are not available - any code you have that relies on these will not run
  • the page explicitly calls deviceReady on the app object after it's been created
  • the page uses the non-minified versions of Enyo and your own app code - this can help with debugging

Resources

cordova-enyo's People

Contributors

darinwilson avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

soapdog oneriang

cordova-enyo's Issues

Build Error on OSX

Thanks for creating this nice mixture of Enyo and Phonegap, I did have a question on a build process error that I'm troubleshooting under my OSX Environment:

[Error: Script "/Users/[USERNAME]/[MYAPPNAME]/.cordova/hooks/before_prepare/copy_enyo_assets.sh" exited with non-zero status code. Aborting.

The enyo minify jobs seem to complete properly but when attempting to copy an enyo folder under the deploy directory it halts there.

Looking at copy_enyo_asset.sh in the cordova-enyo pacakge: it references a folder under the deploy directory that doesnt exist in my deploy output:
cp -Rf $PROJECT_DIR/enyo/deploy/enyo/* $PROJECT_DIR/www/

Is this a folder path problem with this script or a local configuration issue on my end?

Thanks for your time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.