iron-meteor / iron-cli Goto Github PK
View Code? Open in Web Editor NEWA scaffolding command line tool for Meteor applications.
A scaffolding command line tool for Meteor applications.
If you create a project and make it a git project only folders which contain files are checked in. A .gitkeep
file in all structor folders could help! ;)
Looks like this is behaviour out of sync with existing iron router recommendations
http://stackoverflow.com/questions/26343016/do-routecontrollers-need-to-be-defined-in-server-code-for-iron-router1-0-0-pre
hello i started like
em init --ir --js=coffee --html=jade --css=stylus
and then i got the
client/views/shared/not_found/not_found.jade
bellow my "click me" button on the browser
Why?
Hi Chris,
I just updated the em tool and realised that the em g:view has stopped working.
Hope to see it fixed soon.
Thanks :)
cc @scott-mcpherson.
I'm playing with a slightly new project structure where config stuff isn't in the app directory. It looks like this:
app/
- both/
- client/
- packages/
- public/
- server/
config/
- development/
- env.sh
- settings.json
start.sh (auto source the env.sh, cd into the app, and start it with the right settings file)
I've created a new, empty application using the following:
mrt create em-test/
cd em-test/
em init
mrt
Starting the application fails with the following:
Stand back while Meteorite does its thing
Done installing smart packages
Ok, everything's ready. Here comes Meteor!
[[[[[ /Library/WebServer/Documents/projects/em-test ]]]]]
=> Started proxy.
=> Started MongoDB.
W20140403-00:29:38.387(2)? (STDERR)
W20140403-00:29:38.456(2)? (STDERR) /Library/WebServer/Documents/projects/em-test/.meteor/local/build/programs/server/boot.js:186
W20140403-00:29:38.456(2)? (STDERR) }).run();
W20140403-00:29:38.456(2)? (STDERR) ^
W20140403-00:29:38.457(2)? (STDERR) ReferenceError: Router is not defined
W20140403-00:29:38.457(2)? (STDERR) at app/both/router/routes.js:4:1
W20140403-00:29:38.457(2)? (STDERR) at app/both/router/routes.js:19:3
W20140403-00:29:38.457(2)? (STDERR) at /Library/WebServer/Documents/projects/em-test/.meteor/local/build/programs/server/boot.js:155:10
W20140403-00:29:38.457(2)? (STDERR) at Array.forEach (native)
W20140403-00:29:38.457(2)? (STDERR) at Function._.each._.forEach (/Volumes/working/Users/stuart/.meteor/tools/c2a0453c51/lib/node_modules/underscore/underscore.js:79:11)
W20140403-00:29:38.457(2)? (STDERR) at /Library/WebServer/Documents/projects/em-test/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
Everything after the => Started MongoDB.
line is repeated three times.
Have I missed some important step? It seems to me that if an em-based app needs Router to successfully start up, there shouldn't be a broken dependency.
OS X 10.6.8
Meteor 0.8.0
People can forget to change them.
And I think scaffolding only the allow method sufficient. I usually add deny methods in very specific parts of my project.
When creating a view, it would be nice to have an option to create .less files with the view instead of .css.
I use em every day, love it! Makes my life so much easier. I was thinking I should contribute some patches when I have the time.
Anyhow just wanted to check your stance on ending newlines in files. Was it by intention that you removed the ending newline on most files in the latest release?
EM generated files today:
Code
Code <- file ends here
Better way?:
Code
Code
<- file ends here
Referring to #22 to further secure default apps I think it would be great to add a collection file for the users collection, eg server/collections/user.js
with the following scaffolding:
Meteor.users.deny({
update: function () {
return true; }
}
);
Developers can then remove this as the wish. I for one repeatedly add these lines to most of my projects.
The profile object of the logged in user can to be written to freely (by the logged in user itself), which I am sure there are not a lot of use cases for - so might as well turn it off so you don't have to think about it when you write the rest of the logic.
I guess some people like allow/deny and some prefer to rely solely on Meteor methods for DB manipulation. If you're the later you probably want these lines (turning of client direct writes to the DB completely). If you're the former you can simply remove this file if you like.
Having a collections file for the users collection server/collections/user.js
is also useful for other configuration, such as ensuring indexes, eg:
Meteor.users._ensureIndex (
{handle: 1},
{unique: true, sparse: true}
);
Where can I find a description of each directory created after em init
?
I don't understand:
Hey,
So I was looking through templates code and stumbled on the following.
Following other frameworks example - http://guides.rubyonrails.org/generators.html#generators-lookup
I propose to be able to specify custom generators path either via config (primarily for local customisation) or via an api. Second case is primarily to make support for different languages not a concern of em templates directly.
For example,
When we want to use coffee script em the only thing em will do is
em.config.paths.push('generators/coffee')
Last config path will be searched first and if there is no coffee generator provided for specific item it can fallback to default js generator.
Potentially the API can be called from a package so support for coffeescript can be extracted to em-coffee.
Want to get some thoughts on the idea before doing the PR.
Some of my collections inside /both/ folder are not visible to /client/ files and they raise an error. They should load before those files, so I think we must put them inside /lib/, correct?
At the moment "Page not found" errors return an http status of 200.
In fact it should be 404 which could be done by rendering the page on the server.
When I create a new project from scratch using $ em init --ir --css=false --js=coffee
and create a route, I still see Iron Router's initial page. Doesn't happen when using Javascript, though. Why could this be?
If I turn router.coffee into router.js it works just fine.
will stylus be supported?
why shoud i go with less instead?
As we move files around we need a way to upgrade from an existing project. This also applies to a barebones Meteor project (e.g. app.html, app.css, app.js) to an em/iron project structure.
Today I had to create a blog for my soon-to-launch startup, and one thing that was kind tedious was to create all of the admin CRUD functionality for the blog. In other words, creating a table view to list all blog posts, a form view to add and edit posts, and the methods and all of the check() functions. When using em, I though it would be kind of nice to either have an additional argument that you could pass in when executing the scaffold command:
~$ em g:scaffold:crud --fields="name:String, isVisible: Boolean, etc.."
or it could just be an entirely separate generator:
~$ em g:crud --fields="name:String, isVisible: Boolean, etc.."
I'd be happy to fork this and submit a pull request if you think this could be useful. What do you think?
$ uname -a
Darwin rmbp.local 13.2.0 Darwin Kernel Version 13.2.0: Mon Mar 24 19:18:06 PDT 2014; root:xnu-2422.100.10~2/RELEASE_X86_64 x86_64
$ npm --version
1.3.15
$ npm install -g meteor-em
npm http GET https://registry.npmjs.org/meteor-em
npm http 304 https://registry.npmjs.org/meteor-em
npm http GET https://registry.npmjs.org/cli-color/0.2.3
npm http GET https://registry.npmjs.org/minimist/0.0.8
npm http GET https://registry.npmjs.org/underscore/1.3.3
npm http GET https://registry.npmjs.org/cli-table/0.3.0
npm http GET https://registry.npmjs.org/ejs/0.8.5
npm http GET https://registry.npmjs.org/fibers/1.0.1
npm http 304 https://registry.npmjs.org/underscore/1.3.3
npm http 304 https://registry.npmjs.org/fibers/1.0.1
npm http 304 https://registry.npmjs.org/ejs/0.8.5
npm http 304 https://registry.npmjs.org/cli-color/0.2.3
npm http 304 https://registry.npmjs.org/minimist/0.0.8
npm http 304 https://registry.npmjs.org/cli-table/0.3.0
npm http GET https://registry.npmjs.org/colors/0.6.2
npm http GET https://registry.npmjs.org/es5-ext
npm http GET https://registry.npmjs.org/memoizee
> [email protected] install /usr/local/lib/node_modules/meteor-em/node_modules/fibers
> node ./build.js
CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:222:34: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> New(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared
here
class Arguments;
^
../src/fibers.cc:241:34: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Run(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared
here
class Arguments;
^
../src/fibers.cc:279:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> ThrowInto(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared
here
class Arguments;
^
../src/fibers.cc:300:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Reset(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared
here
class Arguments;
^
../src/fibers.cc:468:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Yield_(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared
here
class Arguments;
^
../src/fibers.cc:510:65: error: unknown type name 'AccessorInfo'
static Handle<Value> GetStarted(Local<String> property, const AccessorInfo& info) {
^
../src/fibers.cc:518:65: error: unknown type name 'AccessorInfo'
static Handle<Value> GetCurrent(Local<String> property, const AccessorInfo& info) {
^
../src/fibers.cc:529:66: error: unknown type name 'AccessorInfo'
static Handle<Value> GetPoolSize(Local<String> property, const AccessorInfo& info) {
^
../src/fibers.cc:533:77: error: unknown type name 'AccessorInfo'
...static void SetPoolSize(Local<String> property, Local<Value> value, const AccessorInfo& info) {
^
../src/fibers.cc:540:71: error: unknown type name 'AccessorInfo'
static Handle<Value> GetFibersCreated(Local<String> property, const AccessorInfo& info) {
^
../src/fibers.cc:202:24: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value stack(fatal_stack);
^ ~~~~~~~~~~~
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:1851:14: note: candidate constructor not
viable: no known conversion from 'Persistent<v8::Value>' to 'Handle<v8::Value>' for 1st argument
explicit Utf8Value(Handle<v8::Value> obj);
^
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:1861:5: note: candidate constructor not viable:
no known conversion from 'Persistent<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&);
^
../src/fibers.cc:229:16: error: member reference type 'Persistent<v8::FunctionTemplate>' is not a pointer
return tmpl->GetFunction()->NewInstance(1, argv);
~~~~^
../src/fibers.cc:316:18: error: no viable conversion from 'Persistent<v8::Value>' to 'Handle<v8::Value>'
Handle<Value> val = that.yielded;
^ ~~~~~~~~~~~~
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:210:26: note: candidate constructor
(the implicit copy constructor) not viable: no known conversion from 'Persistent<v8::Value>' to
'const v8::Handle<v8::Value> &' for 1st argument
template <class T> class Handle {
^
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:227:32: note: candidate template ignored:
failed template argument deduction
template <class S> V8_INLINE Handle(Handle<S> that)
^
../src/fibers.cc:383:18: error: no viable conversion from 'Persistent<v8::Value>' to 'Handle<v8::Value>'
Handle<Value> val = yielded;
^ ~~~~~~~
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:210:26: note: candidate constructor
(the implicit copy constructor) not viable: no known conversion from 'Persistent<v8::Value>' to
'const v8::Handle<v8::Value> &' for 1st argument
template <class T> class Handle {
^
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:227:32: note: candidate template ignored:
failed template argument deduction
template <class S> V8_INLINE Handle(Handle<S> that)
^
../src/fibers.cc:396:10: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
const Arguments* args = (const Arguments*)data[0];
^~~~~~~~~
v8::internal::Arguments
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared
here
class Arguments;
^
../src/fibers.cc:396:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
const Arguments* args = (const Arguments*)data[0];
^~~~~~~~~
v8::internal::Arguments
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared
here
class Arguments;
^
../src/fibers.cc:406:17: error: calling a private constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/hipertracker/.node-gyp/0.11.9/deps/v8/include/v8.h:768:13: note: declared private here
V8_INLINE HandleScope() {}
^
../src/fibers.cc:418:20: error: member reference type 'Persistent<v8::Context>' is not a pointer
that.v8_context->Enter();
~~~~~~~~~~~~~~~^
../src/fibers.cc:427:23: error: member reference type 'Persistent<v8::Function>' is not a pointer
yielded = that.cb->Call(that.v8_context->Global(), 1, argv);
~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/0.11.9/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:101:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:827:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.11.9/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/meteor-em/node_modules/fibers
gyp ERR! node -v v0.11.9
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
Build failed
Like Accounts.ui.config etc?
I usually create a folder named config inside the client/
It's a minor issue since it's easy enough to meteor create, cd, rm default files, and em init with the options.
em g:create auto --ir --css=stylus --js=coffee --html=jade
returns...
Looks like you're not in a Meteor project directory.
Installing the package iron:router... \
/usr/local/lib/node_modules/meteor-em/lib/command.js:276
self.logError("Error installing package " + package + ". " + String(er
^
ReferenceError: self is not defined
at /usr/local/lib/node_modules/meteor-em/lib/command.js:276:9
at ChildProcess.exithandler (child_process.js:652:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Socket.<anonymous> (child_process.js:969:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
Is this by design?
I am running Ubuntu 13.04. When I tried to install EM (sudo npm -g install meteor-em), I get error. Other prerequisite software are installed and I have successfully created several meteor apps on this laptop before. I get the following error in the terminal console. There is a big NPM log file too which I could email to you.
$ sudo npm -g install meteor-em
[sudo] password:
npm http GET https://registry.npmjs.org/meteor-em
npm http 304 https://registry.npmjs.org/meteor-em
npm http GET https://registry.npmjs.org/cli-color/0.2.3
npm http GET https://registry.npmjs.org/minimist/0.0.8
npm http GET https://registry.npmjs.org/underscore/1.3.3
npm http GET https://registry.npmjs.org/cli-table/0.3.0
npm http GET https://registry.npmjs.org/ejs/0.8.5
npm http GET https://registry.npmjs.org/fibers/1.0.1
npm http 304 https://registry.npmjs.org/cli-color/0.2.3
npm http 304 https://registry.npmjs.org/underscore/1.3.3
npm http 304 https://registry.npmjs.org/fibers/1.0.1
npm http 304 https://registry.npmjs.org/minimist/0.0.8
npm http 304 https://registry.npmjs.org/cli-table/0.3.0
npm http 304 https://registry.npmjs.org/ejs/0.8.5
npm http GET https://registry.npmjs.org/colors/0.6.2
npm http GET https://registry.npmjs.org/es5-ext
npm http GET https://registry.npmjs.org/memoizee
npm http 304 https://registry.npmjs.org/colors/0.6.2
[email protected] install /usr/local/lib/node_modules/meteor-em/node_modules/fibers
node ./build.js
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:65:16)
gyp ERR! stack at Object.self.commands.(anonymous function) as install
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:150:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:93:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:719:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack at maybeClose (child_process.js:991:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1058:5)
gyp ERR! System Linux 3.8.11
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/meteor-em/node_modules/fibers
gyp ERR! node -v v0.11.13-pre
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
Build failed
npm http 304 https://registry.npmjs.org/es5-ext
npm http 304 https://registry.npmjs.org/memoizee
npm http GET https://registry.npmjs.org/event-emitter
npm http GET https://registry.npmjs.org/next-tick
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/meteor-em/node_modules/cli-color/node_modules/es5-ext/test/Array/of.js'
npm ERR! at Error (native)
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 Linux 3.8.11
npm ERR! command "node" "/usr/local/bin/npm" "-g" "install" "meteor-em"
npm ERR! cwd /home/newgeek
npm ERR! node -v v0.11.13-pre
npm ERR! npm -v 1.4.4
npm ERR! path /usr/local/lib/node_modules/meteor-em/node_modules/cli-color/node_modules/es5-ext/test/Array/of.js
npm ERR! fstream_path /usr/local/lib/node_modules/meteor-em/node_modules/cli-color/node_modules/es5-ext/test/Array/of.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:97:15)
npm ERR! [email protected] install: node ./build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.11
npm ERR! command "node" "/usr/local/bin/npm" "-g" "install" "meteor-em"
npm ERR! cwd /home/newgeek
npm ERR! node -v v0.11.13-pre
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm http 304 https://registry.npmjs.org/event-emitter
npm http 304 https://registry.npmjs.org/next-tick
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/newgeek/npm-debug.log
npm ERR! not ok code 0
Is it a good idea? Or trespassing too much em borders?
Is it an idea to add .gitkeep files to all empty folders?
When I mess up too much and want to start over I ussually:
git reset --hard
git clean -f -d
This removes all empty folders. Now I manually created a .gitkeep file in every empty folder, but it's quite a chore.
Just a small suggestion:
The current setup means that view names cannot be layout
or shared
, as those names will collide with the default init setup.
Also, making these two folders start with underscore separates them from the application specific views. Not only by name, but since most of us looks at these in a sorted filelist they will also normally list on top. This would be a "good thing(tm)" I think.
The constraints will then move from not allowing creating layout
and shared
to not allowing _layout
and _shared
. Which should reduce the probability of collision.
As we've been discussing in #6 it would be nice to have an initial / default config when running em init
. I'm thinking something like Ruby on Rails. Things like:
Let's discuss.
This is more a question! If I create the scaffold for person
i'll have this folder structure:
client/controllers/person
client/controllers/person/person_index.js
client/views/person
client/views/person/person_index
client/views/person/person_index/person_index.html
client/views/person/person_index/person_index.js
client/views/person/person_index/person_index.css
Isn't that person_index
kind of redundant if it is in a folder called person
? I know that the template must be called PersonIndex
because of missing namespaces, but the folder and file names seem wrong to me. Am I missing something?
please add livescript support with .ls extension settings. It will be great fro some users like me.
thanks a lot
~/Projects/vonvo:(1h56m|git@add-roles ⚑) ± em g:scaffold resource ⏎ ✱ ✭ [Genetrix 8:31 PM]
Generate collection
created /Users/carlodicelico/Projects/vonvo/both/collections/resource.js
created /Users/carlodicelico/Projects/vonvo/server/collections/resource.js
created /Users/carlodicelico/Projects/vonvo/client/collections/resource.js
Generate methods
created /Users/carlodicelico/Projects/vonvo/both/methods/resource.js
created /Users/carlodicelico/Projects/vonvo/client/methods/resource.js
created /Users/carlodicelico/Projects/vonvo/server/methods/resource.js
Generate default route
Error creating route: TypeError: Cannot call method 'slice' of null
Using
"iron-router": {
"git": "https://github.com/EventedMind/iron-router.git",
"tag": "v0.7.1",
"commit": "d1ffb3f06ea4c112132b030f2eb1a70b81675ecb"
}
I've made sure everything is up to date and I'm working through the Building an app with Meteor and Iron Router and when I try to use em g:scaffold todos , the following are the only files generated by em
Williams-MacBook-Air-2:newtodos williamjohnson$ em g:scaffold todos
Generate collection
created /Users/williamjohnson/newtodos/both/collections/todos.js
created /Users/williamjohnson/newtodos/server/collections/todos.js
created /Users/williamjohnson/newtodos/client/collections/todos.js
It's only generating the todos.js files in the collections folders, nothing in the methods folders and no index files.
Any idea why this is happening?
Not an issue but would like to see available an alternative to html
jade for ex.
People might want to use slightly different project schemes. This can range from file extensions and whether to include a particular file (e.g. how .em/config.json works now) to also actually changing the structure completely. It might be a link in the config.json to the generator package. Also need a more modular way for handling different file types. For example, currently if I use the harmony package and have app.next.js files, em thinks it should use coffeescript.
bash-3.2# em g:view todos/todo_item
created /Users/michaelprice/Dev/meteor/class2/todos/client/views/todos
created /Users/michaelprice/Dev/meteor/class2/todos/Users
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2
created /Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos
... and so on until
Error creating view: Error: ENAMETOOLONG, name too long '/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2/todos/Users/michaelprice/Dev/meteor/class2'
Love what you're building here, keep up the great work.
[STEPS TO REPRODUCE]
both/router/routes.js
file enter a space between map (
, that is: Router.map (function () {
.em g:scaffold myObject
or em g:route myObject
[ACTUAL BEHAVIOR]
Observe that the command line returns the error: Error creating route: TypeError: Cannot call method 'slice' of null
[EXPECTED BEHAVIOR]
If you remove the space between pace between map (
, that is: Router.map(function () {
. The generator works as expected.
Today:
file.html already exists. Do you want to overwrite it? [yYnN]:
On most command line tools and bash scripts the default action is pointed out with a capital letter. To me it would make more sense if only one letter was capital (and no need to point out that you can use uppercase and lowecase letters for the input):
file.html already exists. Do you want to overwrite it? [y/N]:
or possibly even nicer
file.html already exists. Do you want to overwrite it? y/N:
Meaning 'enter', 'n' and 'N' does not overwrite the file and 'y' and 'Y' would overwrite it.
Just taking notes of what I've been thinking about, big and small, while using EM for the last couple of months. Hope to be able to contribute some code soon.
Is there a difference between the two? I tried creating a project with each method to figure which was right for me, but diff shows no difference between the two projects.
Is it an idea to add .gitkeep files to all empty folders?
When I mess up too much and want to start over I ussually:
git reset --hard
git clean -f -d
This removes all empty folders.
It would be nice to be able to check the em version without having to type npm list -g|grep meteor-em
, eg:
$ em --version
The ONLY place that lacks CoffeeScript support when em init --js=coffeescript
is called, is the both/router/routes.js
file.
Need to figure out a way to trim only the beginning of the routes and route templates. The CoffeeScript ejs conditional statements create an empty line when generating the template. The way I got around this in the past was trim the template after it was generated. But with the routes, I can't do that right now, because if there is NO empty line at the end of the routes file, new routes will be generated on top of one another inline.
For now it might be best to just set up the CoffeeScript conditional in the routes template, and just allow an empty line to created at the beginning of the routes file.
I'm used to have only one folder/file for collections. Whenever I want to do something on client side only, I use if (Meteor.isClient) {}
. I think it's way easier to have everything about the collection X in the same file.
What do you think?
I can't install this package, unfortunately.
Here is my terminal readout:
david-goldbergs-MacBook-Pro:~ davidgoldberg$ sudo npm -g install meteor-em
Password:[email protected] install /usr/local/lib/node_modules/meteor-em/node_modules/fibers
node ./build.js
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/davidgoldberg/.node-gyp/0.10.34"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/meteor-em/node_modules/fibers/.node-gyp"
/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py:873: Warning: 'as' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 11, in
import gyp
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 8, in
import gyp.input
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 873
except ImportError as e:
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/meteor-em/node_modules/fibers
gyp ERR! node -v v0.10.34
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
Build failed
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "-g" "install" "meteor-em"
npm ERR! node v0.10.34
npm ERR! npm v2.1.14
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node ./build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/davidgoldberg/npm-debug.log
david-goldbergs-MacBook-Pro:~ davidgoldberg$
There is a generator for the publish function but not one for the subscribe.
Is there a recommended place for this?
thx
paul.
Hello--when I do:
em init --ir --css=sass --js=coffee
I still get app.js and route.js, which I remove and replace with .coffee files. Is it possible to have them all be .coffee files from the start?
The Setting:
templateNameConverter: 'upperCamelCase'
breaks the accounts-entry package and possible others. With this I must rename all generated Templates from "Dashboard"
to "dashboard"
and comment out the templateNameConverter
setting. Is there an better option?
Loving em so far, only issue I have run into so far in terms of functionality is that sometimes I make a typo or a mistake, and it's a bit messy to clean up after it.
So to make things easier I would suggest:
em remove:[template] [path]
Which would undo the added files/folders and lines in the routing file.
hello if i use
em init --js=coffee ....etc
i get a coffee scaffolding
however running meteor gives me an error in my browser
App is not defined
i see in chrome console this red line
_.extend(App, {});
if i use the standard javascript it runs ok
What is the problems with the coffee version?
Thank u
It would be cool if em would support CoffeeScript. I know there are quite some people who don't like it but something like a --coffee flag would be cool. Any opinions?
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.