Closed halkeye closed 11 years ago
Awesome. But I don't think I'll be able to test all this before tonight (French time), don't hold your breath too long ;-)
No worries. I'm on America/Pacific time. I'll be looking into either tarball or #17 next (tomorrow), maybe even #20. If you haven't merged by then, i'll just add onto this merge request.
Where am I supposed to setup connect.options.port
required by the mocha task ?
You can probably just add a connect: { options: { port: 8123} } }
into the gruntfile inside the init block.
I kinda forgot that was in there. It was part of the original yeoman template. I am really not sure how unit tests are supposed to be setup using angular yet.
Ok. We'll see that later.
About the .couchapp_deploy, maybe we can just let couchapp use its .couchapprc file (see http://couchapp.org/page/couchapp-config), have it deploy to the 'default' env and specify another env (prod) on the command line when needed ?
Oh! I was trying to find if they had a file to mange credentials. That works better. My only concern is that since .couchapprc is included in git, its very easy to accidentally commit. For now I can put the content in ~/.couchapp.conf
but since the db name is included there, it doesn't seem like a great plan.
One solution to that is that grunt build
and grunt couchapp
could create empty files before trying to push/build and then not include .couchapprc in git?
Actually, what happens if we add .couchapprc to gitignore now? Will it keep it in the repo but make it hard to commit it?
I think we can git rm .couchapprc and add it to .gitignore.
without the .couchapprc couchapp push reports [ERROR] couchapp error: You aren't in a couchapp.
so you'd need at least the "{}" version. or at least be in setup instructions.
http://blog.pagebakers.nl/2009/01/29/git-ignoring-changes-in-tracked-files/ is the closest i could find to being useful.
Even in .gitignore, if a file is already tracked (committed/added at some point) it'll continue to be tracked.
Then I prefer adding complexity (documentation) to our developers process rather than Acralyzer users.
On another topic, when running a fresh grunt build
the script/config.js
file is not copied to dist/_attachments/script/config.js
.
So don't include .couchapprc in the root, but do add one to the dist directory? Or include it and suggest developers untrack it?
I'll look into config.js again right now. I was trying to exclude it from minification as it needs to be edited before install (I would like to change that eventually too)
I think we can include it and suggest developers to untrack it.
What would you suggest about the config.js ?
I just added ,'script/config.js'
in copy.dist.files.src
to fix the build.
I think we can include it and suggest developers to untrack it.
Awesome. I'll pull out the weird couchapp code now.
What would you suggest about the config.js ?
I don't have a solution in mind yet. Right now i'm just fixing build script to include it as is. I'm thinking either it scans available dbs to start and picks one (meh), or store configs in couch itself (per user? and site wide?).
I just added ,'script/config.js' in copy.dist.files.src to fix the build.
I'm committing that right now.
This is another discussion but yes, I think we would better store the default app per user in couchdb. That was my initial idea but I started with this config.js to have something working early.
This is another discussion but yes, I think we would better store the default app per user in couchdb. That was my initial idea but I started with this config.js to have something working early.
Agreed. I don't think it should hold up buildscript.
Merged fixes.
Also, for documentation purposes:
git update-index --assume-unchanged .couchapprc
git ls-files -v.couchapprc # <-- should be h not H
I just updated the build script with the following:
grunt couchapp
: deploy dev files to default couchapprc env. (unchanged)grunt couchapp:prod
: deploy dev files to prod couchapprc env.grunt couchapp:prod:dist
: deploy dist files to prod couchapprc env.deploy
task chaining build
and couchapp:prod:dist
Buildscript support - #14
Started out with yeoman webapp grunt file. Removed stuff we don't use.
Added a .couchapp_deploy file (optional) so
grunt couchapp
will deploy to the right place. Example options are (if not provided it'll use a localhost:5984 default):grunt watch
will monitor for file changes and do agrunt jshint
and/orgrunt couchapp
as appropriateDown the road todo:
17 - Add jsduck support for build script
20 - Unit tests support