Code Monkey home page Code Monkey logo

cocoabean's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocoabean's Issues

Improve code quality (Refactor some ruby code)

[DONE] Most commands need to be in app dir and requires existance of Beanfile, move the corresponding method and vars to CocoaBean::Command
[TODO] Fix Beanfile is not generated bug
[TODO] Use a optional template language style. -> If the template of the file to be generated has suffix .erb, then process it with erb, otherwise just copy it.
[TODO] There are several generator subclasses, refactor it to two: TemplateGenerator and BlockGenerator. Means: generate with template files / generate with a block of constructions with some dependencies.

View rendering

View rendering is compatible with iOS native API.

CB.Renderer is responsible for DOM manipulation.
CB.View is the base view class. It has a property named 'layer', and layer is a jQuery DOM object.
CB.Window is a subclass of CB.View, and it represents $("body").
CB.Rect is analogous with CGRect.
CB.Point is analogous with CGPoint.
CB.Size is analogous with CGSize.

Command line interface

cocoabean new APP_PATH --lang=[coffee|es6] DONE
cocoabean test [web | ios | osx] to unit test DONE
cocoabean preview [web | ios | osx] to preview DONE
cocoabean dist to generate web page or app archive DONE
cocoabean open to open project in user's favorite editor DONE
cocoabean about to show information of a project Need improve
configurable through ~/.cocoabeanrc CocoaBean::Preferences do end DONE
cocoabean add platform to generate platform specific code TODO
cocoabean update -> sync settings to platform projects e.g. app version
cocoabean check to check setting sync status

Image on all platforms

On every platform, image should be supported.
However, there are differences between platforms. For web platform, images are fetched from web, for local platform, some are, some are not.

Local images are always part of UI, while web images are always related to content and are dynamic.

On local platform, images gets its width and height just on create, however there is no way to get image's intrinsic size before the image is fetched.

Also, on local platform, different size versions of an image are provided, made it easy to work for different displays.

By using ImageMetadata, on web platform, we can get the behavior of local image.
Get width and height just on create.
Support @2x, default, @3x even much more!

For web images, native platform should support asynchronous loading and resizing.

Implement CB.Button for web platform

This is equivalent to UIButton,
but several subclasses may be added.
CB.TextButton which is similar to hyper link
CB.ImageButton, may show some text if image is not fully loaded

view overflow show scroll bar

Shouldn't show scroll bar if view is overflow.
Since view is not scroll view.

Maybe use max-width calculation to fix?

Local variables used when generating application with erb

instance variable meaning example
@author_name the name of the creator "John Appleseed"
@created_at the date the application is created "1995-06-18"
@module_name the js module name "MYFANCYAPP"
@app_name the app name used in code "my_fancy_app"
@app_readable_name the app name which is read by human "My Fancy App"

'dist' command

By running 'cocoabean dist' inside application directory, user get the newest generated app.js into target applications.

Color output of cli

When error happens, show message and exit.

When generating app.

When about app.

In a word, all command should have output colored and good-formatted.

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.