poetic / ember-cli-cordova Goto Github PK
View Code? Open in Web Editor NEWA tool for creating hybrid apps using a combination of ember-cli and cordova
License: MIT License
A tool for creating hybrid apps using a combination of ember-cli and cordova
License: MIT License
Ember cordova:open should support all platforms supported by cordova
<preference name="DisallowOverscroll" value="true" />
should be added to config.xml
I'd like to have some scripts for building versioned archives
ember-cdv archive 0.4.1 --environment production|staging|development
would do a few things
ember-cdv build
command with the environment passed throughIf you have the TestFlight program running with archive it'll popup and let you upload it to TestFlight.
A deploy script could be the same as archive(with env production) and you just have to open the xcode organizer to actually deploy it
Nice to have
App.io integration
It's weird that all of my tasks return an anon function that I have to execute to return the promise. It may be good to add a Task object that has some sort of run method on it
It would be nice if the ember cordova commands checked for the existence of the dist/ folder before trying to run. This would prevent errors such as 'Current working directory is not a Cordova project'. If the folder is not detected them ember cordova could run ember build to create the folder and then continue with its command.
created directory for app should be project name, not "app"
cordova.js needs to be added to the index.html for plugins and such to work
(not sure this if this is needed or not) perhaps so you dont have to remember to define environment vars to build for other environments
cordova platform add android on windows 7 64 throws error
version: 0.0.40
Running 'cordova platform add android'...
Error thrown while running shell command
Error: Command failed:
at ChildProcess.exithandler (child_process.js:647:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Socket. (child_process.js:966:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
add a command that will open the xcode project for you
I'll just use open
behind the scenes so this will be mac only for now
I want to open up this issue for anyone who has any ideas of features that should be added to this project. I feel that it's in a pretty good place but would love to expand on it and make it even more useful.
So if you have any ideas that you think should be added please leave a comment and we can discuss!
When i run the cordova:init on windows i get
C:\Users\davidga\Desktop\ember_test\my-new-app\config>ember cordova:init poetic.myapp
version: 0.0.39
Installing npm dependencies...done
Removing default ember-cli files...done
Copying custom ember files to new ember-cli project...done
Update index.html with cordova.js ...done
Creating Cordova project...done
Copying default cordova hooks to cordova project...done
Adding ios platform to cordova...
Error thrown while running shell command
Error: Command failed: Error: C:\Users\davidga.cordova\lib\ios\cordova\3.5.
n\create: Command failed with exit code ENOENT
at ChildProcess.whenDone (C:\Users\davidga\Desktop\ember_test\my-new-app
e_modules\ember-cli-cordova\node_modules\cordova\node_modules\cordova-lib\sr
rdova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:787:12)
at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
Update config.xml with your project settings...done
Symlinking ember dir to cordova www...done
This looks like an error. I don't find a way to add just an android platform.
When i try afterwards to add the android platform i get
C:\Users\davidga\Desktop\ember_test\my-new-app\config>ember cordova:build --envi
ronment production --platform android
version: 0.0.39
Symlinking ember dir to cordova www...done
Building cordova project for platform android with environment production...
Error thrown while running shell command
Error: Command failed: Current working directory is not a Cordova-based project.
at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
What can i do?
I use the latest ember--cli(0.39) and the latest ember-cli-cordova
I’m unsure which bits of the cordova directory should and shouldn’t be under version control but it seems like there are some build artefacts we could definitely gitignore. Could the generator add some best practice entries to the project .gitignore?
Disclaimer: I'm fairly ignorant of the implications of the Cordova/PhoneGap separation, so this might be out of scope for this project.
I just started an Ember-based PhoneGap app. I'm excited to use ember-cli, but my team is more excited about the PhoneGap live-reload thing.
Finding this project seemed like the perfect bridge between the two worlds, but it seems just one step short of what we ultimately need, which is to have all of the dist files end up in the www/ directory.
Is there a simple way to extend this project to conform to PhoneGap's expectations (AFAIK, just that built files end up under www/)?
Perhaps more importantly, is there a more fundamental mismatch between the existing Cordova target and my desired PhoneGap target?
My ideal use case is to use ember serve
to live-reload in my browser while using phonegap serve
to live-reload on my device.
There should be an option to toggle this in the config.
I'm thinking it should be opt-in for now instead of default on. For upgrading it can be a pain and it's honestly a little confusing how it all works right now and I don't want to turn people off from this project because of it.
Do do this you just need to update this if statement: https://github.com/poetic/ember-cli-cordova/blob/master/app/initializers/in-app-livereload.js#L8
PR welcome
Getting a cryptic error while building a project.
Error thrown while running shell command
Error thrown while setting up project:
Any ideas on what's happening? I'll try to send a PR if I find the issue.
After debugging this more, it's happening while setting up Ember (specifically when installing the npm dependencies) resulting in:
[TypeError: invalid data]
Edit: I guess the first error was a permission issue, but running any command, after the project is generated, fails (ember-cdv build
, for example). Running the command natively errors at: Current working directory is not a Cordova-based project.
created project with
ember-cdv new anthem com.poeticsystems.anthem --git
and got an ENV not defined error because it was named anthemENV
instead of AnthemENV
initial proposal for how this would work
Add a single icon file under cordova root directory
Add a single splash screen image (2048x2048) under cordova root directory
Cordova Splash Screen and Icon documentation
code reference https://gist.github.com/LinusU/7515016
It's annoying to have to cd into the cordova directory and just confusing to people who aren't aware. I'll add a "proxy" command that passes in the argument to the cordova command so that you don't have to cd into the cordova dir
This will be useful if I need to do some ui specific output that I can do it in a singular place. For the time being it will probably just be similar to
write: function() {
console.log.apply(console, arguments)
}
I would like to have a command to open up an android project, whether eclipse, android studio, etc from the command line. But I have no idea how to do this and quick googling doesn't work. If anyone wants to submit a pr for this or simply tell me how I'd be glad to add it
Could you guys tag and release 0.0.9?
HEAD master works great but 0.0.8 causes an infinite recursion with ember-cli 0.0.45.
In windows 7 i have to be an administrator in order to create symlinks. If i don't do this i get a failure. The interesting issue here is that when ember-cli-cordova fails, router.js disappears.
ember new foo
cd foo
npm install --save-dev ember-cli-cordova
Now router.js exist.
After this command the router.js disappears:
C:\Users\davidga\Desktop\ember\foo>ember cordova:init com.exlibris.nextgen --pla
tform android
version: 0.0.39Installing npm dependencies...done
Removing default ember-cli files...done
Copying custom ember files to new ember-cli project...done
Update index.html with cordova.js ...done
Creating Cordova project...done
Copying default cordova hooks to cordova project...done
Adding ios platform to cordova...
Error thrown while running shell commandError: Command failed: Error: C:\Users\davidga.cordova\lib\ios\cordova\3.5.0\bi
n\create: Command failed with exit code ENOENT
at ChildProcess.whenDone (C:\Users\davidga\Desktop\ember\foo\node_modules\em
ber-cli-cordova\node_modules\cordova\node_modules\cordova-lib\src\cordova\supers
pawn.js:135:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:807:12)at ChildProcess.exithandler (child_process.js:647:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
Update config.xml with your project settings...done
Symlinking ember dir to cordova www...done
It may be connected with the issue #37 but i cannot check it because i have not the ability to build ember-cli-cordova from master.
May you please make a new release with the fix of the issue #37 and i will check if the issue persists?
This will allow us to stream the output of the commands through rather than delaying it till the command finishes. It's just better UX really
In the current implementation of cordova:init it tries to create the ios platform. In our case we want to add android platform but not ios platform. It would be nice to have an option to tell cordova:init to add a specific platform. (maybe with the --platform option?)
Add an option to initialize a git project when creating a new project
Hi,
I have an application which i want to convert into a cordova application.
When running:
ember cordova:init com.x.a --platform android
there is a lot of code which is added.
As i see in the code it adds the ember-animated-outlet-mobile project.
This is not what all the people want. At least part of them just want their project converted into a cordova project.
It is unclear which code is really needed for cordova and which code was added as a template for an example project.
How do i just get a cordova project with my www application without that it adds code like modal etc.
Thanks,
David
ember-cdv new -n MyApp -i com.poetic.myapp
should be
ember-cdv new MyApp com.poetic.myapp
Rather than keeping lots of open issues, I'll have this one to manage things that would be nice but aren't currently possible or need to be thought through
what this mean?
i run this command in the ember-cli project:
ember generate cordova-init ru.plugbank
When you run the init command in a project it should prompt for whether or not to override. Currently it just does and can cause problems
I need to figure out how to write some tests for this. I want to use mocha but I'm somehow going to need to mock out how ember-cli works as well as cordova since I don't want to have to download all the packages and stuff to do it and make testing slow.
waiting for PR to be accepted and I can work on implementing this. These are just thoughts of how I'm thinking it will be.
Usage changes:
You will generate a project using ember-cli normally, then you can run the generator for the cordova part of it. This potentially allows you to turn any cli app into a cordova compatible one
Command changes:
ember generate cordova com.poetic.myapp
this is run inside of a cli appember cdv:build --environment production --platform ios
build cordova projectember cdv:archive 0.0.2 --environment staging --commit --tag
archive ios project with xcodeember cdv:prepare
needs to be run after cloning a projectThe cordova/www
symlink is created and committed with an absolute path.
i.e. cordova/www -> /Users/someone/Code/some-project/dist
This leads to some confusion when cloning on other people’s machines.
Ideally it should be cordova/www -> ../dist
.
Incredible addon by the way. Thanks so much for your hard work.
This would be awesome for not overriding prod apps when people test them. I can just update the config.xml id before building it with cordova
Cordova serves static assets so I need it to be rebuild on file changes
First let me say, this is a really cool project! Please read the rest of this issue while assuming a positive tone.
Although I love experimentation and do not want to stifle innovation, large amounts of this code-base originated from https://github.com/stefanpenner/ember-cli but have lost original authorship and licensing.
Some have nice little remarks: https://github.com/poetic/ember-cordova-cli/blob/master/lib/models/core-object.js#L1-L2 which I appreciate. It is likely best if the rest of the files which originated from ember-cli also had this shoutout. Until they have diverged significantly.
I would like to encourage you to continue to innovate.
I also acknowledge that ember-cli should begin to be broken into smaller modules so others can easily consume the parts they want.
Another idea would be to work on improving the addon extensibility of ember-cli: #28
it would be great to see if we can expose the appropriate hooks in ember-cli proper for this to merely be an addon.
I have them being installed but I still need them to be injected with ember-cli's app.import. docs at http://iamstef.net/ember-cli/#managing-dependencies
after running ember init the project name is always being set to ember-cli-cordova. it should be set to what the user passes in
I cloned a repo onto my computer and I notice that the symlink, of course, is broken, but since it points to a dist folder that I do not have I cannot restore the link. Looking in bitbucket I see that the repo does have the symlink path but I understand that git will not add the destination's contents to the repo. The merges folder is also not carried over.
When I try ember-cdv build from the project's root it tells me that the directory is not a Cordova-based project.
When I try ember server from the ember directory I am told
'cannot find module ember-cli/lib/broccoli/ember-app'
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.