Giter Club home page Giter Club logo

oj's People

Contributors

dminkovsky avatar evanmoran avatar

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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

oj's Issues

Using OJ with Browserify

I've read in PR history that this lib supports Browserify but I can't find a working example. I'm trying:

oj = window.oj = require "ojs"

With Error: Cannot find module './oj.coffee' from '/path/to/node_modules/ojs/dist'. I've tried requiring ojs/dist/OJ but again, no luck.

Generate more clean HTML with command line tool

Command line tool embeds inline a lot of styles and scripts (especially scripts). Perhaps it does not matter in case of single page applications, but with more than one page it brings redundancy.

May be it is possible to automatically split generated code into separate .css, .js and .html (which includes them).

I think that OJ has a potential to be more universal tool than just a view component for client-side applications. It could be, for example, very elegant static site generator which requires you to write only one concise .oj/.ojs per page, instead of dealing with separate verbose .html, .css and .js files.

Express Plugin

This plugin is in the works. The main challenge is improving performance through caching.

It turns out a gigantic amount of time is taken up in require traversal (which cannot be async) and minification (which can be). Both of these can be cached but it will take time to factor out traversal and minification from compiling.

oj crashes without coffee-script

Running npm install oj followed by ./node-modules/.bin/oj throws an uncaught exception:

module.js:340
    throw err;
          ^
Error: Cannot find module 'coffee-script'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/hudon/Dropbox/MyCode/web/jsjsjs/node_modules/oj/generated/server.js:13:12)
    at Object.<anonymous> (/home/hudon/Dropbox/MyCode/web/jsjsjs/node_modules/oj/generated/server.js:1197:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

insert + click events self-triggering

hey evan, found something curious happening when there's an insert, followed by a click listener - the click listener triggers somehow during the insert.
if you change either one to another listener, or even change the order of the listeners, it works as expected.
cheers

  $("body").oj(
    div {
      insert:->
        console.log "insert"
      click:->
        alert('this runs on insert')
    }
  )

ojml: Docs about it?

Within oj.js, I saw the term ojml and a parser pop up, but did not find anything about it inside the docs, so far. Could you maybe explain or document it? Thanks!

Bower

Hey Evan,

Have you considered registering OJ into the Bower repository?

Thanks,
Dmitry

info in oj.copyProperty is undefined

The info variable in the oj.copyProperty method is occasionally undefined causing the whole app to stop.

I worked around it this way:

oj.copyProperty = function(dest, source, propName) {
        var info;
        info = Object.getOwnPropertyDescriptor(source, propName);
        if (info === undefined) {
            info = {
                value: [],
                enumerable: false,
                writable: false,
                configurable: true
            };
        }

        if (info.value != null) {
            info.value = _clone(info.value);
        }
        return Object.defineProperty(dest, propName, info);
    };

https://github.com/ojjs/oj/blob/master/src/oj.js#L344

The oj commandline tool does not work

I had install oj -g , but it's throw this error when i type oj in commandline
/usr/local/lib/node_modules/oj/oj.js:339
info = _extend({enumerable: true, configurable: true}, info)
^
TypeError: undefined is not a function

Load, ready, init

Hi Evan, one thing I've been getting stuck with is a nice way to attach events to dom elements once they're loaded.
Something like this:

span {
load: -> $(this).animate({...})
}, "hi"

What would be the way you recommend to do this?
reactive coffee made a 'init' method, in addition to the available jquery listeners, but maybe there's already a clever way to do it.
Cheers,

Release tags

OJ has release versions, but the tags don't exist on GitHub.

svg

hey evan, sorry if this is already somewhere, what would you recommend for including svg in oj syntax?
there's like a billion types of elements in that spec..
should i make a plugin? or is there a way to do something like:

div ->
  svg ->
    path {d:"M0,0L9,7L18,0"}

Form, List and Table plugins

I'm incorporating oj.Form into the core. It is just having too many dependencies with other projects (oj.Bootstrap coming soon). It turns out form validation and creation is just too fundamental to leave out. For the same reason I'm leaving oj.List and oj.Table in the core as well.

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.