kimroen / ember-cli-coffeescript Goto Github PK
View Code? Open in Web Editor NEWAdds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
License: MIT License
Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
License: MIT License
Things were working fine on 0.2.3, but then I upgraded ember-cli
and:
$ ember build
version: 0.2.5
Building.
=======================================================
Linting completed on 23 files with 0 errors.
=======================================================
Build failed.
EEXIST: file already exists, symlink '/home/igoru/dev/js/protoboard/app/app.js' -> '/home/igoru/dev/js/protoboard/tmp/coffee_script_filter-tmp_dest_dir-oy7V5pwO.tmp/protoboard/app.js'
Error: EEXIST: file already exists, symlink '/home/igoru/dev/js/protoboard/app/app.js' -> '/home/igoru/dev/js/protoboard/tmp/coffee_script_filter-tmp_dest_dir-oy7V5pwO.tmp/protoboard/app.js'
at Error (native)
at Object.fs.symlinkSync (fs.js:897:18)
at symlink (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/symlink-or-copy/index.js:82:14)
at symlinkOrCopySync (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/symlink-or-copy/index.js:58:5)
at /home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/index.js:45:11
at /home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/promise-map-series/index.js:11:14
at lib$rsvp$$internal$$tryCatch (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:489:16)
at lib$rsvp$$internal$$invokeCallback (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:501:17)
at lib$rsvp$$internal$$publish (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:472:11)
at lib$rsvp$asap$$flush (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:1290:9)
at process._tickCallback (node.js:340:13)
Maybe this is related to #78?
Looks like the workaround didn't work as intended. Taking a look at.
I get the following issue when trying to install ember-cli-coffeescript.
Any thoughts on what I may be doing wrong?
$ npm install --save-dev ember-cli-coffeescript
npm ERR! Error: ENOENT, open '/Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/mkdirp/test/race.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "--save-dev" "ember-cli-coffeescript"
npm ERR! cwd /Users/my-user/Code/my-app/client2
npm ERR! node -v v0.10.31
npm ERR! npm -v 2.0.0-beta.0
npm ERR! path /Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/mkdirp/test/race.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! Error: ENOENT, lstat '/Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/ncp/test/ncp-test.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "--save-dev" "ember-cli-coffeescript"
npm ERR! cwd /Users/my-user/Code/my-app/client2
npm ERR! node -v v0.10.31
npm ERR! npm -v 2.0.0-beta.0
npm ERR! path /Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/ncp/test/ncp-test.js
npm ERR! fstream_path /Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/ncp/test/ncp-test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:287:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/rimraf'
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/rimraf']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/Users/my-user/Code/my-app/client2/node_modules/ember-cli-coffeescript/node_modules/fs-extra/node_modules/rimraf' }
npm ERR! Error: version not found: [email protected]
npm ERR! at setData (/usr/local/lib/node_modules/npm/lib/cache/add-named.js:127:12)
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/cmd-shim/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "--save-dev" "ember-cli-coffeescript"
npm ERR! cwd /Users/my-user/Code/my-app/client2
npm ERR! node -v v0.10.31
npm ERR! npm -v 2.0.0-beta.0
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/my-user/Code/my-app/client2/npm-debug.log
npm ERR! not ok code 0
$ ember version --verbose
version: 0.0.42
http_parser: 1.0
node: 0.10.31
v8: 3.14.5.9
ares: 1.9.0-DEV
uv: 0.10.28
zlib: 1.2.3
modules: 11
openssl: 1.0.1i
npm: 1.4.24
Not sure if this can be addressed in here or by the broccoli-coffee maintainers, but source maps would be a huge help
This may not be an ember-cli-coffeescript issue per se, but I really want to make ember-cli addons more compatible for users of this excellent addon.
Steps to reproduce:
ember g my-crafty-addon
and npm install --save-dev ember-cli-coffeescript
inside the addon.
So far so good. Begin coding away.
Create (for example) a component in the addon/components
folder. (Manually since components can't be generated inside addons?).
Mirror this component in app/components
and import/export as described here: http://edgycircle.com/blog/2014-creating-a-datepicker-ember-addon/ (a common practice for merging into the application namespace while still allowing further subclassing)
addon/components/my-component:
`import Ember from 'ember'`
MyComponent = Ember.Component.extend( ... )
`export default MyComponent`
app/components/my-component:
`import MyComponent from 'my-crafty-component/components/my-component'`
`export default MyComponent`
my-crafty-addon
no longer functions! The importing app will complain about not be able to find my-crafty-addon/components/my-component
While the above steps work great for .js
files, there seems to be a globbing issue that doesn't pick up .coffee
files in the same configuration.
I believe this is an issue somewhat closer to the ember-cli core but I really would like to know what steps we can take to increase compatibility?
I feel like I'm missing something here. The README gives the impression that coffeelinting should be automatic if there is a coffeelint.json file present in the project directory. I have one:
{
"no_backticks": {
"level": "ignore"
}
}
Which is fine, I can run coffeelint app/ and get the appropriate results. However I got the impression that this should just happen when the coffeescript is preprocessed:
If you have a coffeelint.json file we will automatically pick up on it and start running linting.
So my question is really just when does this happen? The code seems to suggest that there will be a linting informational message:
https://github.com/kimroen/ember-cli-coffeescript/blob/master/lib/coffee-linter.js#L42
But I do not see that happening, when I preprocess CS by, say, starting the server. What am I missing?
When I run
ember generate resource ingredients.
I got an error saying
no such file or directory "path-to-app/my-app/app/router.js"
This happens only when I'm trying to generate a resource. When trying to generate a route all is working perfectly, a route is being added inside my router.coffee file and the route and template files are being generated perfectly as coffee.
Anyone else noticed this?
`export initializer`
breaks the build
https://github.com/toxy/ember-cli-coffeescript/commit/4e9696e01e33c14503ebced58df70cb9f3405eef
All commands that generate test files have an issue where a tests/unit/.../name.js and a tests/unit/.../name.coffee both get generated. Example:
$ ember g route library
version: 0.0.46
installing
create app/routes/library.coffee
create app/templates/library.hbs
create tests/unit/routes/library-test.coffee
installing
create tests/unit/routes/library-test.js
Error happens when building
$ ember s
version: 0.0.46
Livereload server on port 35729
Serving on http://0.0.0.0:4200
EEXIST, file already exists '/Users/.../tmp/coffee_script_filter-tmp_dest_dir-eRLGbxWm.tmp/project/tests/unit/routes/library-test.js'
Error: EEXIST, file already exists '/Users/.../tmp/coffee_script_filter-tmp_dest_dir-eRLGbxWm.tmp/project/tests/unit/routes/library-test.js'
Use this: https://github.com/ember-cli/ember-cli/blob/master/ADDON_HOOKS.md#config
Instead of the home-made, free-range, organic implementation here:
ember-cli-coffeescript/index.js
Lines 16 to 24 in 3d2d409
We'll need to help out with some abstraction to enable template variations over here, and then use it: https://github.com/ember-cli/ember-router-generator
Changes to setup
and teardown
functions, and assert
passed in to test as an arg
http://qunitjs.com/upgrade-guide-2.x/
This is what is generated:
moduleForModel '<%= dasherizedModuleName %>', '<%= classifiedModuleName %>', {
# Specify the other units that are required for this test.
<%= needs %>
}
Generating a model (and therefore also its model-test) works fine
Is there a reason that there are no http-mock/http-proxy blueprints or are they just not implemented yet?
When coffeelint is included I get output like this:
==========================================
File: vapour/components/data-map.coffee
==========================================
Line exceeds maximum allowed length (error)
Line: 22
Line exceeds maximum allowed length (error)
Line: 25
Line exceeds maximum allowed length (error)
Line: 50
Operators must be spaced properly (error)
Line: 54
Operators must be spaced properly (error)
Line: 54
Line exceeds maximum allowed length (error)
Line: 54
Line exceeds maximum allowed length (error)
Line: 64
Line exceeds maximum allowed length (error)
Line: 102
Operators must be spaced properly (error)
Line: 112
=======================================================
Linting completed on 1 files with 9 errors.
=======================================================
=======================================================
Linting completed on 0 files with 0 errors.
=======================================================
ember g route
and ember g resource
adds entries to the router.
Currently routes and resources will be correctly added with maps like this:
Router.map ->
@route 'post'
But not like this:
Router.map (->
@route 'post'
)
Both are valid and should work.
Hello,
I have a simple use case: I'd like one or two files (js objects containing i18n translations) to be in coffee-script because it's more terse. However, with my team we've agreed to not use coffee-script for application code (for various reasons).
So my question is: is there a way with this addon (or any other, by the way) to add coffee-script discovery/precompilation without having the generators outputting coffee files? If not, do you plan on adding this feature? If not, would accept a pull-request for it ?
Thanks for your time : )
I'm getting this error because in appname.js, there is no define('appname/app'
call, so when the application tries to start (require('appname/app')['default'].create({...})
), it can't find the appname/app module because it was never define
d. Why isn't this define call being output into assets/appname.js
? I see many other modules are being defined. Presumably appname/app
refers to the Ember.Application
exported in appname/app/app.js
, or in the case of using coffeescript, app.coffee
. I see that this module hasn't been updated recently, so I'm guessing ember-cli 0.2.0 broke something and this needs to be updated.
When I use a plain app.js file generated by ember init
, instead of an app.coffee
file, the issue goes away.
Note: I'm actually using coffees6 but that module ultimately just passes things onto this module.
You can see the error printed in the console on my project at this commit here: https://github.com/devinrhode2/major-domo/tree/95cfed62b88c29f07c5f4f7ef1580f43d668f390
In Ember CLI 0.1.4 both http-mock
and http-proxy
use the same server
blueprint (and do not have separate/diverged implementations). See:
ember-cli supports an argument, --silent
, that should mute all output. This is useful for running tests and reading the output, for example.
ember-cli-coffeescript ignores this, and outputs the linting output either way.
Hi all,
I'm creating an ember-cli addon in Coffeescript, and it seems that Coffeescript files in the addon/
folder aren't being pre-processed. If I put .js files there, it works fine.
Has anyone successfully built an addon in Coffeescript before? Am I missing something?
We're using ember-cli-coffescript in a workflow that makes heavy use of ember g ...
Things are working really well in that the files that are generated are very useful and the coffeescript is being generated very nicely.
However, we've run into an issue that we can't use the --pod
flag as yet. So we're pulling our files into a pods file structure manually.
Is this something that can be incorporated into the coffee generators? I wish my understanding of the problem domain were greater and I could offer some assistance in this matter.
With ember-cli 0.1.2 and ember-cli-coffeescript 0.2.0 resource generator generates js-files and look for a router.js file to update.
The generated initializer file is missing an equals-sign.
Trying to ignore some directories, and I can't find either the right place to put .coffeelintignore nor the right combination of things to put in there to do so. Using latest ember-cli-coffeescript on ember-cli 0.1.2 (works otherwise).
Upgraded application to ember-cli 0.41 according this https://github.com/stefanpenner/ember-cli/releases/tag/v0.0.41. Now got this error on application start:
ember server --proxy http://127.0.0.1:3000
version: 0.0.41
Proxying to http://127.0.0.1:3000
Livereload server on port 35729
Serving on http://0.0.0.0:4200
EEXIST, file already exists '<path to project>/tmp/coffee_script_filter-tmp_dest_dir-rlboXtgt.tmp/<project name>/app.js'
Error: EEXIST, file already exists '<path to project>/tmp/coffee_script_filter-tmp_dest_dir-rlboXtgt.tmp/<project name>/app.js'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at Object.copyPreserveSync (<path to project>/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/broccoli-kitchen-sink-helpers/index.js:165:8)
at <path to project>/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/index.js:42:19
at promise.then.then.results.(anonymous function) (<path to project>/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/promise-map-series/index.js:8:27)
at $$$internal$$tryCatch (<path to project>/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:470:16)
at $$$internal$$invokeCallback (<path to project>/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:482:17)
at $$$internal$$publish (<path to project>/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:453:11)
at $$rsvp$asap$$flush (<path to project>/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:1531:9)
at process._tickCallback (node.js:415:13)
It would be great if you could target ".litcoffee" as well. Litcoffee is the main reason I'm not switching to es6.
Try to
ember g component users-toolbar -p -path users
and result
Arguments to path.join must be strings
TypeError: Arguments to path.join must be strings
at Object.posix.join (path.js:488:13)
at __path__ (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/blueprints/component/index.js:26:23)
at /Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/models/blueprint.js:628:66
at Array.map (native)
at Class.Blueprint.generateFileMap (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/models/blueprint.js:628:37)
at Class.Blueprint._locals (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/models/blueprint.js:814:22)
at Class.Blueprint._process (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/models/blueprint.js:458:22)
at Class.Blueprint.install (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/models/blueprint.js:491:15)
at Class.module.exports.Task.extend.run (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/tasks/generate-from-blueprint.js:52:49)
at Class.module.exports.Command.extend.run (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/commands/generate.js:79:17)
at Class.<anonymous> (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/lib/models/command.js:136:17)
at lib$rsvp$$internal$$tryCatch (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:489:16)
at lib$rsvp$$internal$$invokeCallback (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:501:17)
at lib$rsvp$$internal$$publish (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:472:11)
at lib$rsvp$asap$$flush (/Users/kazar/Projects/medmedia/mimic-ember/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1290:9)
at process._tickCallback (node.js:355:11)
After remove ember-cli-coffeescript
all work fine
I'm using ember-cli 0.1.2
in tandem with the ember-cli-coffeescript
, but the doesn't register correctly in the cli registry. As a hack I manually added this line into ember-cli/lib/preprocessors.js
registry.add('js', 'broccoli-coffee', 'coffee');
then it started working. I guess it might be some issue with a recent change in the ember-cli API?
Thanks,
Alex
This is a common thing to run in to after updating ember-cli.
What happens is this:
You have an app.coffee
file, and you also have an app.js
file. This can happen when you update ember-cli, for example.
broccoli-coffee tries to generate an app.js
file from the app.coffee
file, but that file is already present, so you get an error.
What this issue is about is detecting these files (app.js
and router.js
) specificically and giving the user a warning, because they probably didn't mean to have both a js and cs version of them, it just happened accidentally. A specific error is better than the one you get now, which is kind of cryptic.
Referencing closed issue: ember-cli/ember-cli#2134 (comment)
❯ ember --version
version: 0.1.1
node: 0.11.14
npm: 2.1.2
coffee -v
1.7.1
❯ ember generate controller login
version: 0.1.1
installing
Cannot read property 'writeLine' of undefined
TypeError: Cannot read property 'writeLine' of undefined
at Class.module.exports.beforeInstall (/Users/rocky/pastoral-acts/node_modules/ember-cli/blueprints/controller/index.js:25:14)
at Class.module.exports.beforeInstall (/Users/rocky/pastoral-acts/node_modules/ember-cli-coffeescript/blueprints/controller/index.js:9:40)
at Class.module.exports.beforeInstall (/Users/rocky/pastoral-acts/node_modules/ember-cli-coffeescript/blueprints/controller/index.js:9:40)
at $$$internal$$tryCatch (/Users/rocky/pastoral-acts/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)
at $$$internal$$invokeCallback (/Users/rocky/pastoral-acts/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)
at /Users/rocky/pastoral-acts/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1066:13
at $$rsvp$asap$$flush (/Users/rocky/pastoral-acts/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)
at process._tickCallback (node.js:372:11)
Hey
I have an issue while generating routes in my app. Every time I run:
ember g route example
I'm getting the following:
create app/templates/example.emblem
ENOENT, ../app/router.js'
Error: ENOENT, no such file or directory '../app/router.js'
Thanks in advance
Can you add a license to this project? Preferably MIT to match most of the other ember-cli projects?
We have instructions in the readme and an example of how a custom coffeelint.json could look. The rule in there about allowing backticks is pretty much mandatory, so it would be nice if the user could type something like ember g coffeelint
and get one.
Should be pretty straightforward - add a new blueprint to the /blueprints
-folder with that name and a nice description.
We could expand upon this and ask about it when the user installs ember-cli-coffeescript, as discussed in #65
Using the config in config/environment.js
to turn off linting is pointless, as that part is read after the first round if linting is run.
Options:
Following ember-cli's example: ember-cli/ember-cli@fb9503f
Summary: Overriding an imported variable now has unexpected results.
Steps to reproduce:
In the latest cli (0.1.11) import a module, extend it and export using the same name:
`import MyCustomComponent from 'my-custom-component/components/my-custom-component'`
MyCustomComponent = MyCustomComponent.extend ...
`export MyCustomComponent`
This was a typical workflow in addons allowing addon modules to be merged into the source tree but also remain extensible due to not being overwritten by local copies in the parent app.
This behaviour breaks now, because instead of assigning imports to the variable defined in the import statement, (i.e. MyCustomComponent
) They are being assigned to MyCustomComponent['default']
, ostensibly to eliminate an unnecessary variable declaration.
While this is not a problem with JS blueprints which can export directly without assigning to a similarly named var (a limitation of coffee due to the need for backticks in import/export statements), it causes terrible things to happen in coffeescript whereby the local variable clobbers the import and causes the code to stop working.
Essentially it's not really safe to import a variable and then overwrite it using coffeescript and although this is an edge case I just wanted to report the issue in the hope of establishing a best practice for dealing with this.
Hi is the first time I am using this. When I start a new project and simply do ember server
(after installing this ofc npm install --save-dev ember-cli-coffeescript
) i get the following error:
The `CoffeescriptAddon` addon must implement the `treeFor` hook.Error: The `CoffeescriptAddon` addon must implement the `treeFor` hook.
at EmberApp.<anonymous> (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/broccoli/ember-app.js:122:13)
at Array.map (native)
at EmberApp.addonTreesFor (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/broccoli/ember-app.js:120:40)
at EmberApp.<anonymous> (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/broccoli/ember-app.js:198:25)
at EmberApp.memoized [as _processedAppTree] (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/lodash-node/modern/functions/memoize.js:65:28)
at EmberApp.<anonymous> (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/broccoli/ember-app.js:231:21)
at EmberApp.memoized [as appAndDependencies] (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/lodash-node/modern/functions/memoize.js:65:28)
at EmberApp.<anonymous> (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/broccoli/ember-app.js:299:34)
at EmberApp.memoized [as javascript] (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/lodash-node/modern/functions/memoize.js:65:28)
at EmberApp.toArray (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/broccoli/ember-app.js:527:10)
at EmberApp.<anonymous> (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/broccoli/ember-app.js:541:30)
at EmberApp.memoized [as toTree] (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/lodash-node/modern/functions/memoize.js:65:28)
at Object.<anonymous> (/Users/charlie/Development/pluck/node/pluckClient/Brocfile.js:20:22)
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)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.loadBrocfile (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/broccoli/lib/builder.js:147:14)
at Class.module.exports.Task.extend.setupBroccoliBuilder (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/models/builder.js:15:26)
at Class.module.exports.Task.extend.init (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/models/builder.js:32:10)
at new Class (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/models/core-object.js:18:12)
at Class.module.exports.Task.extend.run (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/tasks/serve.js:15:19)
at Class.module.exports.Command.extend.run (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/commands/serve.js:35:18)
at Class.Command.validateAndRun (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/models/command.js:74:15)
at /Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/lib/cli/cli.js:53:22
at tryCatch (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:163:16)
at invokeCallback (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:172:17)
at /Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:186:17
at flush (/Users/charlie/Development/pluck/node/pluckClient/node_modules/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/asap.js:51:9)
at process._tickCallback (node.js:415:13)
When ember-cli creates a new project, all the main files already comes in common javascript. There's a way to create an extension for ember new
to create the full project in coffee? Maybe something like ember new myApp --coffeescript
I'm using ember-cli-coffeescript
in a project that has a combination of .coffee
and .js
files (which may or not be relevant), and whenever I edit one of the coffee files, it creates a matching .js
file in the same folder, which then breaks the build:
EEXIST, file already exists '/Users/work/htdocs/onboard/client/tmp/coffee_script_filter-tmp_dest_dir-Y7vlbjlp.tmp/my-awesome-app/path/to/file.js'
Using the following versions:
ember-cli: 0.2.0-beta.1,
ember-cli-coffeescript: 0.10.0
Support for this was added in ember-cli 0.2.0. See example document for model help here: https://github.com/ember-cli/ember-cli/blob/master/blueprints/model/HELP.md
$> ember g component my-component
version: 0.0.42
installing
create app/components/project-name.coffee
create app/templates/components/project-name.hbs
create tests/unit/components/project-name-test.coffee
When I added ember-cli-mocha, my tests don't come out in coffee. (Would seem a pain to support lots of different testers, but would seem that ember-cli in general should support dependencies and peer dependencies between add-ons -- perhaps you shouldn't be supporting test generation at all, but that should be split off into an additional dependency?)
Thought I'd raise the issue....
Add a check for the generated route or resource before adding it to router.coffee
.
This has been fixed already in ember-cli, needs adopting for .coffee
. ember-cli/ember-cli#1042
kuzi@Lin64Hea7en:~/Projects/grruca$ ember g template xyz
version: 0.0.43
installing
create app/__path__/xyz.hbs
Instead of app/templates/xyz.hbs. Same with view etc.
I'm using ember-cli-coffees6
which relies on ember-cli-coffeescript
, when I run
ember generate controller <foo>
I get this error:
version: 0.1.3
Could not find watchman, falling back to NodeWatcher for file system events
installing
Cannot call method 'call' of undefined
TypeError: Cannot call method 'call' of undefined
at Class.module.exports.beforeInstall (/Users/bmckay/Ember/rew_mobile/node_modules/ember-cli-coffees6/node_modules/ember-cli-coffeescript/blueprints/controller/index.js:9:69)
at $$$internal$$tryCatch (/Users/bmckay/Ember/rew_mobile/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)
at $$$internal$$invokeCallback (/Users/bmckay/Ember/rew_mobile/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)
at /Users/bmckay/Ember/rew_mobile/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1066:13
at $$rsvp$asap$$flush (/Users/bmckay/Ember/rew_mobile/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)
at process._tickCallback (node.js:419:13)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.