stefanpenner / ember-app-kit Goto Github PK
View Code? Open in Web Editor NEWdeprecated: see https://github.com/stefanpenner/ember-cli
License: MIT License
deprecated: see https://github.com/stefanpenner/ember-cli
License: MIT License
currently one needs to muck with.
It appears everytime I add a 'debugger' to my code, my files stop getting compiled and I have to restart the server.
Should we stick with using Karma for testing, or make it optional? Karma's not too complicated and has some nice benefits, but is also a somewhat large dependency. On the other hand, making it optional introduces another layer of complexity to the Gruntfile, as we'd have to add a grunt-contrib-qunit task for CI, as well as set the npm test
script to not use Karma by default.
idea:
store intermediate files so we can jshint + transpile only what changed, fallowed by a concat.
Is it possible to export a project down to a single HTML file, with magnification, and all JS and CSS resources inline? Are there some flags or preprocessor tasks I could configure to do this?
Use case:
Contemplating trying to develop a HTML + JS app that needs to be sent to C pre-parser and compile to C code that goes into an embedded system.
Would like to make the source file as streamline and small as possible (under 2 MB for total project).
Embedded system developer environment is a bit of a hassle to work with and so would like to not have to deal with a large number of output files before moving them over to the project to be converted to C code.
As in this PR ..
How to refer posts.post
controller in the following cases.
needs: ['posts.post']
{{controllers.posts.post.}}
this.get('controllers.posts.post')
Right now it looks something like controllers/posts
instead of controllers/posts/post
When running the tests by going to http://0.0.0.0:8000/tests/ they fail.
Running tests using karma in all its variations works.
Is the intention to keep the browser-based test flow working, or switch over to just supporting terminal-based testing out of the box?
Ember-App-Kit does a great job of allowing you to write modular Ember code..
I'm just struggling to understand how to import other libraries. For example, I would like use SockJS or SocketIO for websocket communications and twitter bootstrap.
I can include them as bower dependencies, importing the scripts directly in index.html and access them through the global namespace, but jshint complains that it can find the classes that I'm referring to in my routes and controllers.
Previously I've always relied on the Rails asset pipeline to organise my imports into the global namespace.. so just not quite sure how to do this. If anyone could steer me in the right direction it would be very much appreciated.
How much effort would it take to have ember-app-kit export in a format that is easy to share or drop into a JSBin example?
Or even better work on integration with the folks building
http://www.embersandbox.com/
Use case is is that it would be handy to take transpiled source code and quickly dump to a paste bin type tool.
If there were hook to auto deploy or post from command line that would be great too.
Hi,
Awesome work on Ember-App-Kit.. Really exciting project. I'm just struggling to override the nested routes automatically generated by Ember. My routes.js looks like:
function Routes() {
this.route('bob');
this.resource('projects', function() {
this.route('index');
});
}
export default Routes;
I'm able to override the ApplicaitonRoute, BobRoute and ProjectsRoute, however I'm unable to override the ProjectsIndex route.
I've tried files named projectsIndex.js and index.js. I've placed them in the routes folder and in the routes/projects folder. I've tried a few other permuations of this.
Could anyone give me a pointer on how to name the .js file and where to put it in the directory structure. I'm assuming the actual route will be defined as:
var ProjectsIndexRoute = Ember.Route.extend({
init: function() {
console.log('hello pr index');
}
});
export default ProjectsIndexRoute;
I'm working on documentation here. At some point it might get merged into the readme, but I wanted to keep it separate for now so that there's not a ton of tiny commits to the repo while it's being worked on.
Stuff to add:
We need to figure out how users are supposed to keep their application's tasks up to date. My thinking was ember-app-kit should actually be an NPM module rather than an "app skeleton".
/controllers/users/new.js
/controllers/users/edit.js
/templates/users/new.hbs
/templates/users/edit.hbs
etc should work.
(cc: @ghempton)
obviously app/helpers/**/*.js
but we need to make ember's helper lookup container aware, and then EAK should just work.
I'm getting an error message from Ember:
Assertion failed: Your model must not be anonymous. It was (subclass of DS.Model)
My model looks as follows:
var Project = DS.Model.extend({
name: DS.attr('string')
});
export default Project;
I also find that in my controllers / routes, I cannot simply import 'models/project' but need to use the fully qualified name 'appkit/models/project'
I think for most of us these are the most common places we're hosting our Ember applications. I want it to be dead simple for me to push my app to these hosting providers.
Should be pretty easy to reproduce, I have to constantly restart it.
Just saw this question on stack-overflow.
Anyone know of a good solution?
this.controllerFor()
this.routerFor()
this.container.lookup()
this.container.lookupFactory()
needs
property in controllerssee #87 (comment)
Whenever grunt server
rebuilds after detecting a file change, Finder suffers from extreme hangs (beach ball of death) where it becomes unusable for 10+ seconds.
My best initial guess is it's being caused by the files being locked and Finder of course trying to access these files meta data to update the window.
Software: OS X 10.8.4 (12E55)
Model Name: MacBook Air
Model Identifier: MacBookAir4,1
Processor Name: Intel Core i5
Processor Speed: 1.6 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Memory: 4 GB
Installed:
Node v0.10.12 (via NVM)
Total Finder
Dropbox
Google Drive
CS5
VMWare
Parallels
VirtualBox
XCode
etc
Time Machine is DISABLED, no other backup software, no antivirus (duh)
Maybe it would be better to copy the files temporarily instead of locking them, if you can't keep them in memory otherwise?
Two parts to this:
#37 was a quickfix, bower handlebars build doesn't provide handlebars.runtime this prevents us from easily bundling handlebars.runtime
Currently templates are bundled into a single templates module, they should instead each be in there own module.
Followed the instructions laid out here: https://github.com/stefanpenner/ember-app-kit/wiki/Getting-Started but even with a fresh checkout (and npm install), if you do grunt build:dist
then grunt server:dist
, as the guide suggests, when you pull up localhost a bunch of the files are 404 presumably because vendor is in the project root but the server is mounted in tmp/public. Briefly looking to the grunt setup, it looks like build:debug has copy:vendor but build:dist does not?
GET http://localhost:8000/vendor/jquery/jquery.js 404 (Not Found) localhost/:12
GET http://localhost:8000/vendor/handlebars/handlebars.runtime.js 404 (Not Found) localhost/:12
GET http://localhost:8000/vendor/ember/index.js 404 (Not Found) localhost/:12
GET http://localhost:8000/vendor/loader.js 404 (Not Found)
Maybe I am or the guide is missing a step?
Hi all,
I'm feeling a bit dumb as this has me completely beat. I've checked the docs (https://github.com/stefanpenner/ember-app-kit/wiki/Referencing-Views) but this doesn't seem to work for me.
Without going into too much detail im trying the following.
in controllers/index.js
import Someview from 'appkit/views/some_view'
in views/some_view.js
var SomeView = Ember.View.extend({
init: function(){
console.log('Hi from the sub view');
}
});
in templates/index.hbs
{{view App.SomeView}}
The errors I receive are:
Assertion failed: Unable to find view at path 'App.SomeView' ember.js:361
Assertion failed: You must pass a view to the #view helper, not App.SomeView () ember.js:361
Uncaught TypeError: Cannot read property 'proto' of undefined
I added a breakpoint into the compiled app.js and SomeView is certainly not in scope at all.
Compiled code looks like:
define("appkit/views/index",
["appkit/views/some_view"],
function(__dependency1__) {
"use strict";
var SomeView = __dependency1__.SomeView;
var IndexView = Ember.View.extend({
...blah
What am i doing wrong? :(
Just random thoughts after spending an hour with it:
I can't seem to do a very common use case for my Ember apps:
I don't see any app kit code added to resolve these, and the AMD modules aren't appended to the application namespace obviously. My best guess is that this just isn't something appkit supports yet?
Even though I didn't think they'd work, I also tried:
In vanilla ember app, I can easily perform
App.Blog.find()
or App.Blog.create()
.
But after using EAK. Unable to find App
or AppKit
....
How to debug from browser console?
Rather then an explicit map, we should pluralize these. This would us to easily map container.lookup('foo:bar')
to 'foos/bar.js'
https://github.com/stefanpenner/ember-app-kit/blob/master/vendor/loader.js#L57-L63
likely just a simple + s
Currently whenever we add a new bower component, we have to go into 3 files to include it: tests/index.html, public/index.html and karma.conf.js. Has anyone found a way to make this a little easier?
I am having the kinds of issues with grunt and npm that everybody complains about with ruby, rvm and gems.
So can you node guys please refrain from creating, albeit unintentionally, the illusion that the node workflow is "easier". It is just different, and can be just as frustrating if you don't know some of the tricks already. Anyway, sorry for the rant. Trust me there is a point here, with a smidge of trolling.
I am having some issues getting this running, still new to node js stuff.
I had previously installed grunt-cli globally but with sudo because that was the only way I could get it to install. But perhaps this was a mistake.
To reset and try again I did
sudo npm uninstall -g grunt
sudo npm uninstall -g grunt-cli
now
npm list
/Users/gpotter
└── (empty)
grunt-cli
zsh: command not found: grunt-cli
grunt
grunt-cli: The grunt command line interface. (v0.1.9)
Fatal error: Unable to find local grunt.
...
OK where is grunt?
which grunt
/usr/local/bin/grunt
go to https://github.com/gruntjs/grunt/wiki/Getting-started
read the docs, find
npm uninstall -g grunt
npm WARN uninstall not installed in /usr/local/lib/node_modules: "grunt"
Uggh!!!
Rage starts to bubble up...
Chillax this is unix we are talking about there is a way. Maybe the global flag is the issue.
npm uninstall grunt
npm WARN uninstall not installed in /usr/local/bin/node_modules: "grunt"
Ugh ok so what is going on
cd /usr/local/bin/node_modules
no such file or directory: /usr/local/bin/node_modules
ok makes sense
cd /usr/local/lib/node_modules
ls
grunt-cli npm
Ahh we have something.
npm uninstall grunt-cli
unbuild [email protected]
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/grunt-cli'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/grunt-cli']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/grunt-cli' }
....
more rage, but remembers I had used sudo before. Bad Gordon, bad Gordon, just let some untrusted installer root your box while you are at.
Not quite sure if I should just rm
the /usr/local/bin/grunt
maybe that will break some other strange dependency I am not thinking about at the moment. I know I have run npm install more than once.
rage is tapering off... calmer heads are prevailing, this is unix after all there is a fix.
sudo npm uninstall grunt-cli
Password:
unbuild [email protected]
ok check again
which grunt
grunt not found
Success!
Peers over at Taikado project, maybe go troll @wycats, no! We must learn Node stuff because the cool ember kids say it is good.
But have doubts when I hear @stefanpenner is afraid to run npm install
in a live demo at an ember talk. Fully justified of course.
Takes a break...
OK ready to start again based on the ember-app-kit user guide...
npm install -g grunt-cli
outputs
npm http GET https://registry.npmjs.org/grunt-cli
npm http 304 https://registry.npmjs.org/grunt-cli
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/grunt-cli'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/grunt-cli']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/grunt-cli',
...
Seems like a permission error. So thus encouraged to run sudo. Bad practice node people, bad practice.
rage, rage!, rage! Hope nobody is looking, keyboard not broken yet.
Decide to go troll github, and here I am.
Not sure how to proceed. Guess I need help on how setting this up with only local user permissions. Have not tried homebrew yet.
Tips? I can help amend the user guide if someone can help straighten me up on what is going on here.
Even good getting started resources with grunt, npm and node.
I am on OS X Mountain Lion.
Thanks
By the way what started these shenanigans was this error message
grunt server
>> Local Npm module "grunt-cli" not found. Is it installed?
should clean the unminified output & tests from tmp/public
so it can be easily deployed
Do we really need to list these globals?
https://github.com/stefanpenner/ember-app-kit/blob/master/.jshintrc#L9-L34
These are exported by testing libraries, and we are running jshint only for app/**/*.js
, not for tests/**/*.js
I'm currently trying to get the maintainer of the component for ember to pull in components/ember#32 which will update its dependency to RC6.1. If we want this automated in the future, I assume someone on the core team would need push access to the component repo. Who would that be?
routes.js
function Routes() {
this.resource('persons', {path: '/persons'}, function(){
this.route('new', {path: '/new'});
});
}
export default Routes;
routes/persons.js
var PersonsRoute = Ember.Route.extend({});
export default PersonsRoute;
templates/persons.hbs
<h3>Persons</h3>
Error in console:
Uncaught Error: There is no route named persons ember.js:23900
RouteRecognizer.handlersFor ember.js:23900
createNamedTransition ember.js:24535
doTransition ember.js:25113
Router.handleURL ember.js:24295
Ember.Router.Ember.Object.extend.handleURL ember.js:25385
Ember.Router.Ember.Object.extend.startRouting ember.js:25362
Ember.Application.Ember.Namespace.extend.startRouting ember.js:29004
Ember.Application.Ember.Namespace.extend.didBecomeReady ember.js:28962
DeferredActionQueues.flush ember.js:4901
Backburner.end ember.js:4591
Backburner.run ember.js:4630
Ember.run ember.js:5112
Ember.Application.Ember.Namespace.extend.scheduleInitialize ember.js:28708
jQuery.Callbacks.fire jquery.js:1037
jQuery.Callbacks.self.fireWith jquery.js:1148
jQuery.extend.ready jquery.js:433
completed
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.