GithubHelp home page GithubHelp logo

broccoli-coffee's People

Contributors

alubbe avatar jakesjews avatar joliss avatar rwjblue avatar sandstrom avatar thoov avatar truffula avatar

Stargazers

 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

broccoli-coffee's Issues

Document pass-through behavior

This plug-in appears to pass through all non-coffee files as is, while swapping out coffee files to JavaScript files. I found that surprising, and ended up chaining on another plug-in to strip out all but the JavaScript files.

Is the right idiom that a Broccoli build process should pass essentially all files through a series of plug-ins, each of which transparently passes along everything it doesn't care about? Or is the right idiom that one should use a bunch of plug-ins to process different kinds of things, then merge together the results in at the end? Maybe the former seems more suitable if most plug-ins will make a one to one file mapping? Maybe the latter seems more suitable if most plug-ins will return a tree of substantially different shape than what they accept?

I don't know the answer to the idiom question; but I do know this:

It would be easier to understand while getting started, if plug-ins would state in their documentation what they do with files they don't care about.

If you would rather have a pull request than this wall of text, just say so :-)

[Perf] consider upgrading to broccoli-persistent-filter

Several individuals have come to me with ember-cli build performance issues, of them, broccoli-coffee using broccoli-filter is a common source of problem.

broccoli-persistent-filter supports:

  • persistent rebuilds (opt-in)
  • patch based (\w persistent output) rebuilds

and otherwise is API compatible with broccoli-filter. I would love to upstream the work into broccoli-filter, until that is accepted we should likely update this plugin, or fork a persistent variant. I would prefer not to continue to bifurcate the eco-system.

Upgrading from ember-cli 0.0.34 to 0.0.40 breaks compilation

I'm not sure if this is entirely a broccoli-coffee issue or an ember-cli issue, but I have a case where CoffeeScript doesn't seem to be compiling at the correct times. I recently upgraded an app from ember-cli 0.0.34 to 0.0.40.

When I run ember serve I get the following error:

Error: Cannot find module '/Users/mikepack/Documents/Work/exercism/server'

This is because my express server is written in CS, not JS. I've converted server/index.js to server/index.coffee, which has worked thus far.

When I convert index.coffee back to index.js, I no longer receive this error, but receive others associated to CS files that ember-cli is looking for as JS files (eg the routes themselves). I also received this error for other CS files like config/application.coffee. Similarly, converting back to JS circumvented the error.

Any ideas on how to approach this problem and retain the CS files? I'm not terribly familiar with broccoli.

Can't make it work with ember-cli 0.0.44

Been trying to follow the steps outlined here:

http://blogs.visoftinc.com/2014/07/24/setting-up-ember-cli-with-emblem-and-coffeescript/
and here http://www.ember-cli.com/asset-compilation/#coffeescript

But I always get:

$ ember serve
version: 0.0.44
Livereload server on port 35729
Serving on http://0.0.0.0:4200
ENOENT, no such file or directory '/Users/kmandrup/private/ember-projects/capuchino/tmp/tree_merger-tmp_dest_dir-HMFvzN7o.tmp/capuchino/app.js'
Error: ENOENT, no such file or directory '/Users/kmandrup/private/ember-projects/capuchino/tmp/tree_merger-tmp_dest_dir-HMFvzN7o.tmp/capuchino/app.js'
  at Object.fs.statSync (fs.js:695:18)
  at addModule (/Users/kmandrup/private/ember-projects/capuchino/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/index.js:83:46)
  at addModule (/Users/kmandrup/private/ember-projects/capuchino/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/index.js:126:9)
  at /Users/kmandrup/private/ember-projects/capuchino/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/index.js:59:7
  at $$$internal$$tryCatch (/Users/kmandrup/private/ember-projects/capuchino/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)
  at $$$internal$$invokeCallback (/Users/kmandrup/private/ember-projects/capuchino/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)
  at $$$internal$$publish (/Users/kmandrup/private/ember-projects/capuchino/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:453:11)
  at $$rsvp$asap$$flush (/Users/kmandrup/private/ember-projects/capuchino/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)
  at process._tickCallback (node.js:419:13)

I even tried this... but alas, to no avail ;(

/// Brocfile.js
var filterCoffeeScript = require('broccoli-coffee');
module.exports = filterCoffeeScript(app.toTree());
// package.json

  "devDependencies": {
    "body-parser": "^1.2.0",
    "broccoli-asset-rev": "0.0.17",
    "broccoli-coffee": "^0.1.1",
    "broccoli-ember-hbs-template-compiler": "^1.6.1",
    "ember-cli": "0.0.44",
    "ember-cli-ember-data": "0.1.0",
    "ember-cli-ic-ajax": "0.1.1",
    "ember-cli-inject-live-reload": "^1.0.2",
    "ember-cli-qunit": "0.1.0",
    "express": "^4.8.5",
    "glob": "^4.0.5"
  }

Add CoffeeLint

I have a local version running which CoffeeLints files as well. Before I submit a pull request, I have a few questions on what you think would be the best implementation:

  • Should CoffeeLinting happen automatically (without the developer having to make any changes)?
  • What do you think is the best way to handle options:
    1. allow passing in a config file in Brocfile.js, as a sub-setting of the coffeeFilter options:

      var coffeelintConfig = require('./coffeelint.json'),
      filterCoffeeScript = require('broccoli-coffee');
      tree = filterCoffeeScript(tree, {coffeelint: coffeelintConfig});

    2. look for coffeelint.json in the root of the project automatically

    3. look for coffeelint.json in the containing folder and parent folders up to the project root

    4. fall back to CoffeeLint defaults

My current implementation does i and iv, happy to add or remove options based on feedback before submitting a PR. Any thoughts?

Source map support

I was curious if there was a blocker for supporting source maps? I'd like to help out, but just wanted to gauge if there is something that I'm not thinking about or unaware of.

Thanks!

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.