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

Using respec for non-w3c specs #950

Closed
riannella opened this issue Oct 24, 2016 · 13 comments
Closed

Using respec for non-w3c specs #950

riannella opened this issue Oct 24, 2016 · 13 comments

Comments

@riannella
Copy link

Hi, I would like to use respec for a non-w3c specification. I assume that is allowed?

I have used the "base" SpecStatus, but it still automatically produces some W3C-specific stuff:
1 - includes "W3C Document " under the document title.
2 - includes the full "Copyright W3C....MIT/etc...." line in the header
3 - forces you to have an Abstract
4 - auto includes the SOTD section (with W3C mentioned)

Is there anyway to turn these off (or replace them with non-w3c terms).

@riannella
Copy link
Author

Also:
5 - When I use the "logos" config, it places the logo above the main Title, not on the far right horiz aligned with the title (as per the normal w3c logo).

@halindrome
Copy link
Contributor

There isn't really a value for "specStatus" that means "use ReSpec but remove all the W3C stuff". As far as I know when people do this they make their own profile. @marcoscaceres do you have any other ideas?

@marcoscaceres
Copy link
Member

This definitely sounds like custom profile. @riannella, easiest way to create a custom profile is to fork this repository, then edit js/profile-w3c-common.js and comment out any W3C stuff you don't need (the names should be fairly obvious).

Then you will need to run:

npm install
./tools/build-w3c-common.js

That will build you a custom profile. You can find more details here: https://github.com/w3c/respec/wiki/Developers-Guide

@marcoscaceres
Copy link
Member

I should mention, the custom profile will be located "builds/respec-w3c-common.js". You can rename that file something else to deploy it.

If you want to go further, you will need to change some other things (e.g., the builder tool) and make custom plugins.

Hope that helps!

@riannella
Copy link
Author

Thanks @marcoscaceres. I will see how well I do at this 😀

@cconcolato
Copy link
Collaborator

Is this still the recommended approach to use ReSpec for non-W3C specs? We are thinking about using it for AOM documents. I'm concerned about divergences if we have to maintain our own fork. I wonder if an approach like the one chosen by Bikeshed could be used, i.e. have organization-specific statuses that trigger or not specific features.

@dontcallmedom
Copy link
Member

I don't know about the policy, but I'll note that there are 3 maintained profiles in this repo (W3C, DINI & Geonovum)

@cconcolato
Copy link
Collaborator

For reference, I found this example that indeed uses ReSpec without the W3C styles https://geonovum.github.io/praktijkrichtlijn-vector-tiling/

@sidvishnoi
Copy link
Member

@cconcolato Creating status like bikeshed could add to the size of profiles that don't use them. So, creating a new profile is preferable. We can help you set up a new profile in this repo: we will make sure the core plugins and build process continue to work, while you can maintain code related to your profile.

Though, I think it might be a good option if we can create a respec-base npm package with core plugins and build setup. Then everyone can build their profiles in their repo separately without worrying much about divergences. WDYT @marcoscaceres ? It's somewhat similar to using a git submodule though.

@marcoscaceres
Copy link
Member

For large orgs, having your own profile in /profiles/ is best (along with any appropriate tests for any custom code + a commitment to maintain any added code, as @sidvishnoi said).

I don't have strong opinion on creating a respec-base module... could even be a profile (respec-core.js, no W3C stuff), then people can use the appropriate hooks to add whatever they need.

@cconcolato
Copy link
Collaborator

I forked the repo and tried to created an AOM profile mimicking one of the existing profiles, but I'm not sure what modules are required or not. I could use some help, see https://github.com/cconcolato/respec/tree/aom_profile

@marcoscaceres
Copy link
Member

The ones you added all look ok to me, @cconcolato.

@marcoscaceres
Copy link
Member

marcoscaceres commented Apr 22, 2021

@cconcolato, to package.json, under scripts:, you just need to add:

    "build:aom-debug": "node run build:aom -- --debug",
    "build:aom": "node ./tools/builder.js aom",

And that should be (almost) good to go... you can then copy/paste example/basic.html, replace the reference to w3c profile, and modify it to suit AOM's needs. That should show you your profile working.

Give me should if you want to go over stuff together. Happy to have a quick Zoom call or whatever to answer any questions.

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

No branches or pull requests

6 participants