You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How can I run the javaee-samples in 'development mode'? #3
The awestruct works with github api and javaee7-samples repository.
Is it possible to run it 'in devel mode'? I'd like to tune the asciidoc locally, before I push commit to any repo.
Or - shaving the yak from the other side - preview my Asciidoc comments before committing. I'd rather refrain from "blind commits"
awestruct in dev mode indeed rebuilds the _tmp/datacache/javaee7-samples.yml file. However, the new file is build not based on the content of _tmp/repos/javaee7-samples/ - which in my case are modified files.
After a bit of trial and errors what worked for me was:
adding new remote in _tmp/repos/javaee7-samples pointing to my fork
modify JavaDocs and push changes to my forked branch
pulling the changes from my remote to _tmp/repos/javaee7-samples
removing _tmp/datacache/javaee7-samples.yml
restarting awestruct
Sound to me a bit workaround'ish - but I haven't found a better way to go. At least I can preview my docs before a pull request.
Ok. awestruct picks up changes from source files (*.java) but when I'm naming and describing the module in pom.xml - the xml file doesn't get picked up. That was a bit misleading for me. Now I get it.
The pom changes are taken directly from github API?
I'll amend the README a bit on how to contribute :)
Activity
aslakknutsen commentedon Feb 9, 2014
Currently you need to delete _tmp/datacahce/* pr run when you do changes.
awestuct -d should keep it a live at least to view it in the browser.
kubamarchwicki commentedon Mar 9, 2014
Ok. I'm still in a n00b mode ;-)
awestruct in dev mode indeed rebuilds the
_tmp/datacache/javaee7-samples.ymlfile. However, the new file is build not based on the content of_tmp/repos/javaee7-samples/- which in my case are modified files.After a bit of trial and errors what worked for me was:
_tmp/repos/javaee7-samplespointing to my fork_tmp/repos/javaee7-samples_tmp/datacache/javaee7-samples.ymlawestructSound to me a bit workaround'ish - but I haven't found a better way to go. At least I can preview my docs before a pull request.
aslakknutsen commentedon Mar 9, 2014
Hmm, the steps that work here:
kubamarchwicki commentedon Mar 9, 2014
Ok. awestruct picks up changes from source files (
*.java) but when I'm naming and describing the module inpom.xml- the xml file doesn't get picked up. That was a bit misleading for me. Now I get it.The pom changes are taken directly from github API?
I'll amend the README a bit on how to contribute :)
aslakknutsen commentedon Mar 9, 2014
Right, that is this guy:
https://github.com/javaee-samples/javaee-samples.github.io/blob/develop/_ext/javaeesamples.rb#L114
called from here:
https://github.com/javaee-samples/javaee-samples.github.io/blob/develop/_ext/samples.rb#L81
It traverses the pom structure based on a git revision..
I think if you delete line:
https://github.com/javaee-samples/javaee-samples.github.io/blob/develop/_ext/javaeesamples.rb#L115
change line:
https://github.com/javaee-samples/javaee-samples.github.io/blob/develop/_ext/javaeesamples.rb#L116
to something alla:
pom = REXML::Document.new(IO.read("#{rev}/pom.xml"))
Then call it in:
https://github.com/javaee-samples/javaee-samples.github.io/blob/develop/_ext/samples.rb#L80
with rev = repository.clone_dir
it in theory should work :)