npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

coffee-reactify

v5.1.0

Published

browserify v2 plugin for coffee-react cjsx

Downloads

193

Readme

coffee-reactify

STATUS: DEPRECATED

This tool is no longer maintained. If you need to transition your codebase from it, a codemod is available to do so: cjsx-codemod

This project started as a way for me to explore how JSX could fit into Coffeescript syntax, as a quickly hacked together prototype. While I never really promoted it, it quickly took on a life of its own, and before long people were asking for it to support all kinds of different use cases. On top of that I had no experience writing parsers, so the result is something with insurmountable limitations.

As I eventually stopped using Coffeescript I ended up neglecting this project, but as people were using it I didn't want to kill it. I really should have, however, because it meant that people were using a crappy, ill-conceived, unmaintained tool. Now, long overdue, I'm putting it out to pasture.

Original readme follows:

browserify v2 plugin for compiling coffee-react-transform CJSX markup in Coffeescript.

example

given some files written in a mix of coffee and cjsx:

neat-ui.coffee:

require './rad-component.cjsx'

React.renderComponent RadComponent({rad:"mos def"}),
	document.getElementById('container')

rad-component.cjsx:

# @cjsx React.DOM 

React = require('react')

RadComponent = React.createClass
  render: ->
    <div className="rad-component">
      <p>is this component rad? {@props.rad}</p>
    </div>

install coffee-reactify:

$ npm install -g coffee-reactify

version compatibility:

  • 2.1.x - React 0.12.1
  • 2.x - React 0.12
  • 1.x - React 0.11.2
  • 0.x - React 0.11 and below

when you compile your app, pass -t coffee-reactify to browserify:

$ browserify -t coffee-reactify neat-ui.coffee > bundle.js

you can omit the .coffee or .cjsx extension from your requires if you add the extension to browserify's module extensions:

require './component'
...
$ browserify -t coffee-reactify --extension=".cjsx" --extension=".coffee" neat-ui.coffee > bundle.js

providing the transform option coffeeout: true will passthrough the transformed output of .coffee files with the @cjsx pragma without compiling them to javascript. this means you can use a different coffee compiler transform such as icsify or coffeeify in conjunction with this transform.

note: at this stage, .cjsx files will still be compiled even with --coffeeout. this is a workaround for the fact that other transform modules like coffeeify will ignore .cjsx files due to the different file extension.

$ browserify -t [ coffee-reactify --coffeeout ] -t coffeeify neat-ui.coffee > bundle.js

install

With npm do:

npm install coffee-reactify

license

MIT