-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Spec markdoen build refactor #1554
Conversation
@gregsdennis It occurred to me that since we have all the specs in one place now, the |
The output spec is still in |
The output spec was moved like the rest of the spec files. It's in |
39a092b
to
49acf09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one thing. Otherwise ✔️
49acf09
to
fc42081
Compare
✔️ |
After talking with @gregsdennis about some of the shortcomings of the build system, I looked into what improvements I could make and fell down a bit of a rabbit hole. I found that there's a Remark language server and VSCode extension that we can use to get linting in our editors while writing! I had to define the build in a little different way to make it compatible with those tools. I also broke the build down into three parts to facilitate the different actions that need to run on spec markdown files.
So we an use spec+lint for linting and spec+build for generating HTML. Later, if we want, we can add a "github" configuration and use github+lint to lint Github markdown files with the same linting rules we use for the spec. The main reason I didn't do that yet is because of all the changes that would be needed to get the Github markdown to pass the linter. I'd rather do that separately.
Some other things to know:
lint
command now lints both javascript and markdown instead of just javascript.build
andbuild-all
commands now don't lint, they just build.specs
folder. This allows us to separate spec markdown files from the Github markdown. This is good practice anyway, but it's necessary in this case because the spec markdown is effectively its own flavor of markdown due to our customizations and needs to be handled differently from Github markdown.propertyDependencies
proposal links to the spec. In order for that link to work once built, it needs to point to live version on the website (html), which doesn't exist yet. But, if it points to the website, it might not take into account anchor changes in the document and think a link is invalid when it's not. (I hope that explanation sort of made sense.) I think the solution is to make the links point to the markdown version and then add a build processing step that rewrites links to where they will be published. Then the links work when built and the link checker can do its job. For now, I'm leaving the link pointing to the markdown file because it's the only solution that doesn't involve disabling the link checker entirely, but this needs a real solution at some point.<!-- lint ignore rule-name -->
to ignore a rule on a block or<!-- lint disable rule-name -->
and<!-- lint enable rule-name -->
to ignore a rule within those comments. I used this a couple times for really long headings instead of globally disabling the rule.