Code Monkey home page Code Monkey logo

generator-flight's People

Contributors

andrewk avatar angus-c avatar cameronhunter avatar caniszczyk avatar cvrebert avatar meetwudi avatar necolas avatar passy avatar sboudrias avatar wouterj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-flight's Issues

Error on first test run (ReferenceError: Can't find variable: describeComponent)

I'm guessing I'm doing something silly here but I keep getting the following error when I create a new flight app with a new component (both using the generator):

ReferenceError: Can't find variable: describeComponent

I'm assuming that my test (untouched after being generated by generator-flight) simply cannot find this method in Jasmine-Flight (line 18). The thing I can't figure out though is the requireJS config in the Karma config looks correct (and is actually unchanged from how the generator generates it).

Am I missing something simple? any help here would be awesome because I'm really stuck.

Add ability to change generator install directory

Currently all the generators install to hard-coded locations, i.e., the component generator does this:

 this.template('component.js', 'app/js/component/' + this.name + '.js');
 this.template('spec.js', 'test/spec/component/' + this.name + '.spec.js',

It would be useful to allow a second parameter to the generator to choose another folder:

yo flight:component my_amazing_component component/ui

My thinking is it would be okay to force the parent paths to app/js and test/spec but to then allow a subfolder path, so the above would result in:

app/js/component/ui/my_amazing_component.js'
test/spec/component/ui/my_amazing_component.spec.js'

In larger apps it quickly becomes cumbersome to dump all created components into a single folder. It's easy enough to generate and move them, but a look at various implementations suggests few are following the fixed generator locations (I'm not assuming they use the generators, just that this feature would facilitate real-world use):

Peer Invalid - Fix is already on master

I was trying to use the generator-flight 0.7.2 tonight and kept coming across this error when invoking it:

npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma-requirejs@~0.2.0

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "git://github.com/flightjs/generator-flight.git"
npm ERR! cwd /source/flight-app
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /source/flight-app/npm-debug.log
npm ERR! not ok code 0

I started poking around and saw that there is already a fix for this on master that was merged in March, but it was just never released it seems. The 0.7.2 tag doesn't contain the changes at least.

I installed the master branch of the generator-flight and everything seems to install as expected now.

So just wondering if we could get a point release for the fixes that are already on master?

Recommended Build Process

Wondering if there is a recommending build process to bundle up flight apps. Looks like the pattern for requiring dependencies in the scaffolding is the var myDep = require('path/to/dep'); method which isn't compatible with the rjs optimizer as far as I can tell.

Is there a way around this which I'm missing? or better to do the array of strings method?

NPM error: karma-requirejs does not satisfy its siblings' peerDependencies

I'm getting the following error when running yo flight

npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma-requirejs@~0.2.0

npm ERR! System Linux 3.8.0-41-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/msecret/Development/flight-yql
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/msecret/Development/flight-yql/npm-debug.log
npm ERR! not ok code 0

I've fixed by changing version of karam-requirejs to 0.2.0 in package.json such as follows:

"karma-requirejs": "~0.2.0",

Duplicate logging on event trigger

All event triggers are being logged twice. I'm guessing this is due to a change in Flight - it looks like line 23 of main.js is no longer required.

Cannot find generator when trying to initialize app

Running

yo flight 

or
yo flight:app

gives

Error flight

You don't seem to have a generator with the name flight installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 8 registered generators run yo with the `--help` option.

But when I go to check out the generators I have installed I can see all the flight targets

Please choose a generator below.


Flight
  flight:lib:generators:all
  flight:lib:generators:app
  flight:lib:generators:component
  flight:lib:generators:mixin
  flight:lib:generators:page

Mocha
   mocha:app
   mocha:generator

Webapp
   webapp:app

My other generators work fine.

`npm run server` dies after serving one request

I ran the generator in a clean directory then npm run server. I hit http://127.0.0.1:8080 in a browser. The server serves the page as expected but then the server dies hard:

┌─(~/workspace/flight-app-demo-2)───>npm run server

[email protected] server /Users/ben/workspace/flight-app-demo-2
static app

serving "app" at http://127.0.0.1:8080

fs.js:1475
throw new Error('start must be <= end');
^
Error: start must be <= end
at new ReadStream (fs.js:1475:13)
at Object.fs.createReadStream (fs.js:1436:10)
at streamFile (/Users/ben/workspace/flight-app-demo-2/node_modules/node-static/lib/node-static.js:360:16)
at Server.stream (/Users/ben/workspace/flight-app-demo-2/node_modules/node-static/lib/node-static.js:382:7)
at Server.respondNoGzip (/Users/ben/workspace/flight-app-demo-2/node_modules/node-static/lib/node-static.js:332:14)
at Server.respond (/Users/ben/workspace/flight-app-demo-2/node_modules/node-static/lib/node-static.js:347:14)
at /Users/ben/workspace/flight-app-demo-2/node_modules/node-static/lib/node-static.js:144:22
at Object.oncomplete (fs.js:107:15)

npm ERR! [email protected] server: static app
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] server script.
npm ERR! This is most likely a problem with the behave-please package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! static app
npm ERR! You can get their info via:
npm ERR! npm owner ls behave-please
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "run" "server"
npm ERR! cwd /Users/ben/workspace/flight-app-demo-2
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/ben/workspace/flight-app-demo-2/npm-debug.log
npm ERR! not ok code 0

npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/0.10.24/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'server' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserver', 'server', 'postserver' ]
5 info preserver [email protected]
6 info server [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec server script
9 error [email protected] server: static app
9 error Exit status 8
10 error Failed at the [email protected] server script.
10 error This is most likely a problem with the behave-please package,
10 error not with npm itself.
10 error Tell the author that this fails on your system:
10 error static app
10 error You can get their info via:
10 error npm owner ls behave-please
10 error There is likely additional logging output above.
11 error System Darwin 13.3.0
12 error command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "run" "server"
13 error cwd /Users/ben/workspace/flight-app-demo-2
14 error node -v v0.10.24
15 error npm -v 1.3.21
16 error code ELIFECYCLE
17 verbose exit [ 1, true ]

Reproduced a bunch of times.

Sub-generators (component, mixin) run `all` generator

If you try to run yo flight:component then it will actually invoke yo flight:all. @passy, have you guys made any changes to yo that could have introduced this bug? This generator hasn't changed for a while and used to work. Any idea how to fix this?

Make package generator require a name

If I have a dir named 'flight-foo', then yo flight:package will create a component called 'flight-flight-foo', so probably just require a name is passed for the generator to run.

Fix jasmine-jquery / flight mess

FFS, jasmine-jquery made a breaking change to their API in a minor bump. Probably fix this by updating jasmine-flight to work with j-jquery 1.7.x.

Add Grunt-based tasks

Provide a way for people to automate the creation of a production-optimized build, and do things like run lint tasks. I have some thoughts:

  • Avoid grunt-karma. I haven't had a great experience using it and don't like the duplication it involves when you want to watch files. Prefer to stick to Karma au naturelle.
  • Prod build should switch out RequireJS for Almond in the optimized AMD bundle. It's an easy win and simple to configure with the grunt requirejs task.
  • We probably want most of the features of grunt-usemin - hashing inline images, etc., (see how it's used in other Yeoman generators), but it's a bit of a monolithic mess at the moment (some of that is partly my fault) and under going an opaque rewrite. Open to suggestions on what to do.

@cameronhunter, are you interested in doing this? I've hardly started on it and what I have is completely disposable. So if you want to start this afresh, that would be awesome.

Include a Gruntfile

I think it'd be good to include a Gruntfile.

It could handle the basic task like RJS minification you'll end up writing anyway.

Also, it'd be nice to have a server you can launch straight up so the app can run as soon as it is generated. Right now you must setup a server. (Ok, I just ran python simple http server, but it is not really great and don't support SVG)

Documentation for "pages"

There's a default pages/default.js and a generator for new pages, but no documentation about what exactly "pages" are supposed to do or how they're used. It's not a term that comes up in the Flight documentation either.

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.