art-object-tree-factory
Create Declarative frameworks that output tree structures with properties (e.g. ArtReact)
Last updated 10 days ago by shanebdavis .
ISC · Original npm · Tarball · package.json
$ cnpm install art-object-tree-factory 
SYNC missed versions from official npm registry.

art-object-tree-factory

Fast, easy way to create declarative APIs for data-structures which consist of per-node-properties and per-node-ordered-children. This is how Art.React has such nice syntax.

Example: React

You can easily create all your React factories:

# CaffeineScript
import &ArtStandardLib, &ArtObjectTreeFactory, &React

createObjectTreeFactories
  w lowerCase "
    A Abbr Acronym Address Applet Area Article Aside Audio B Base BaseFont Bdi Bdo
    Big BlockQuote Body Br Button Canvas Caption Center Cite Code Col ColGroup
    DataList Dd Del Details Dfn Dialog Dir Div Dl Dt Em Embed FieldSet FigCaption
    Figure Font Footer Form Frame FrameSet H1 H2 H3 H4 H5 H6 Head Header Hr Html I IFrame Img Input
    Ins Kbd KeyGen Label Legend Li Link Main Map Mark Menu MenuItem Meta Meter Nav
    NoFrames NoScript Object Ol OptGroup Option Output P Param Pre Progress Q Rp Rt
    Ruby S Samp Script Section Select Small Source Span Strike Strong Style Sub
    Summary Sup Table TBody Td TextArea TFoot Th THead Time Title Tr Track Tt U Ul
    Var Video Wbr"

  (nodeName, props, children) -> createElement nodeName, props, children...

Use:


render: ->
  Div
    "Everything you need "
    Link "is here" src: "http://wikipedia.org"

Current Tags

  • 2.1.7                                ...           latest (10 days ago)

11 Versions

  • 2.1.7                                ...           10 days ago
  • 2.0.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 19
Last Day 0
Last Week 1
Last Month 3
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |