Comments (7)
Since the www
directory is built by grunt
I would leave it out of the repository. Now the platforms
are built by cordova
but some people modify code in platforms/
directory. My experience is that this should be a last resort.
Take a look at including the merges/
directory with your repo if you haven't already - http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface_customize_each_platform
Let's leave this open so others can chime in if they so desire.
from generator-ionic.
Here's a cool approach that uses a Cordova hook to install the plugins needed for a platform, so you can ignore the plugins
directory as well.
http://stackoverflow.com/questions/21791323/cordova-cli-using-git-and-saving-plugins-platforms
This might be a good addition to the generator to help enforce best practices.
from generator-ionic.
it is a little trickier than that, cordova is kinda finicky about updating the proper files. We are working with multiple developers and getting everyone's environment to stay consistent is really a pain in the ass.
it is almost like we need to recreate the entire platform every time a new person checks the code out. delete the platform directory, add it again, remove and reinstall all plugins and re-copy the icons & splash directory back into platforms.
if we don't follow this process, something usually doesn't work.
i am certain some combination of scripts and hooks will make this work, but haven't had the time to get a script created to handle everything
from generator-ionic.
I think there should be a .gitkeep
file in the platforms
directory, but still have the contents of the platforms
directory git-ignored by default.
Because if you clone the project from git, and then try to run the cordova build
command, or the platform add
command, you'll get an error. The platforms directory must exist before running those commands, so that directory should probably be committed to git, (but just not the contents by default).
from generator-ionic.
Since the entire platforms/
directory is built by Cordova, you should never manually modify its contents! Best practices dictate not committing assets that are generated by a build system.
If you need to modify files inside of platforms/
you should really be using Cordova hooks. Specifically, after_platform
is great for installing plugins, and after_prepare
for copying icons and splashscreens are quite useful.
This way you can commit your hooks/
and merges/
directories, and each developer cloning your repository will be able to run grunt platform:add:<target>
and be ready to get to work.
Here's a great post on Cordova Hooks by one of Adobe's Developer Evangelists - http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/
I'm thinking of opening a new enhancement issue because I think it would benefit the community if these hooks were installed as part of the generator. Thoughts?
from generator-ionic.
hooks were installed as part of the generator
+1
from generator-ionic.
Opened #72
from generator-ionic.
Related Issues (20)
- Workflow Post Development
- update_platform_config.js terminates when there is a browser platform HOT 4
- Is this project dead? HOT 6
- sudo npm install -g generator-ionic blow up HOT 13
- grunt run:android --livereload messes up with multiple networks HOT 1
- install cor dova in mac 10.10.5 HOT 2
- install cordova in mac 10.10.5 HOT 1
- grunt serve issue HOT 1
- I am installing [email protected] in my mac and I have added the camera plugin also. But I don't know how to configure xcode to Cordova and how to call xcode methods to html files. Note: Xcode version 7.2 Cordova version 6.0.0 Please help me! HOT 1
- Cordova camera plug in for ios HOT 1
- Resources not included
- Is "grunt emulate:ios --livereload" supposed to update the emulator image on changes?
- simple error in template tabs
- Yo ionic throws error HOT 1
- Request: Port to Angular 2.0 HOT 1
- Alternative: Generator-M-Ionic
- ionic upload lib folder problem
- grunt doesn't work HOT 2
- yo ionic unable to scaffold an Ionic Project! HOT 3
- ionic build android HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-ionic.