Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more specific annotation of json #65

Merged
merged 1 commit into from
Jun 1, 2014
Merged

more specific annotation of json #65

merged 1 commit into from
Jun 1, 2014

Conversation

WardCunningham
Copy link
Member

We annotate json as we serve it so that the
client can adjust rendering. Example: green
border for pages served from plugins.

This commit moves the logic for applying the
plugin annotation to a point where we know
for sure that we are looking for plugin pages.

This fixes one issue mentioned in fedwiki/wiki-plugin-calculator#2

This pull is pending testing. @nrn has promised to help me straighten out my server build when he returns from jsconf tonight.

We annotate json as we serve it so that the 
client can adjust rendering. Example: green 
border for pages served from plugins.

This commit moves the logic for applying the
plugin annotation to a point where we know 
for sure that we are looking for plugin pages.
@WardCunningham
Copy link
Member Author

This commit has been tested and been shown to work as expected. Merge at will.

My problem testing has been resolved by @nrn. Thanks.

I used npm link to connect the wiki-node and wiki-node-server repos. This causes the packageDir to point to the enclosing directory by default. If this directory also had all the plugins checked out then that would work ok. I didn't. The short term solution is to specify the packageDir on the command line.

 node bin/server.js -p 3090 --packageDir node_modules

This was enough to show that the revised server works correctly annotating normal plugins. I also tested the case where -d referred to a plugin repo (which I had checked out in ./test)

 node bin/server.js -p 3090 --packageDir node_modules -d ../test/wiki-plugin-calculator/

I've asked @nrn to explain how npm link interferes with the packageDir parameter and perhaps suggest a modification. If I misunderstand its purpose please let me know.

paul90 added a commit that referenced this pull request Jun 1, 2014
more specific annotation of json
@paul90 paul90 merged commit 5ac43ae into master Jun 1, 2014
@paul90 paul90 deleted the ward/plugin branch June 1, 2014 10:43
@nrn nrn mentioned this pull request Jun 1, 2014
@nrn
Copy link
Member

nrn commented Jun 1, 2014

Found it easier to submit a pr for what I was thinking than try to explain it, think it's a little cleaner this way and the issue is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants