Skip to content

Commit

Permalink
docs: refresh docsite
Browse files Browse the repository at this point in the history
  • Loading branch information
mattem authored and alexeagle committed Aug 26, 2020
1 parent 9384420 commit ca2fee5
Show file tree
Hide file tree
Showing 85 changed files with 15,986 additions and 3,569 deletions.
6 changes: 3 additions & 3 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ tasks:
# TODO(gregmagolan): figure out how to install missing shared libs
# Without this filter the @cypress external repository will be built and that build will fail due to missing shared libs.
- "--build_tag_filters=-cypress"
# This target is tagged "manual" but we want some CI
# coverage of it to make sure it doesn't break.
- "//docs"
# Build the docs up to the point of running Jekyll as this requires some locally installed deps
# Building the stardoc targets provides a little test coverage in formatting etc
- "//docs:builtins_md"
test_flags:
# Both chrome & firefox are missing shared libs on bazelci ubuntu.
# On circleci we have the same issue but we can work around it using apt-get.
Expand Down
72 changes: 31 additions & 41 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("//tools/stardoc:index.bzl", "stardoc")
load("//tools/stardoc:index.bzl", "rules_nodejs_docs", "stardoc")

stardoc(
name = "builtins",
Expand Down Expand Up @@ -53,45 +53,35 @@ genrule(
tags = ["fix-windows"],
)

_PACKAGE_READMES = {
"Built-ins": ":builtins.doc",
"Cypress": "//packages/cypress:README.md",
"Jasmine": "//packages/jasmine:README.md",
"Karma": "//packages/karma:README.md",
"Protractor": "//packages/protractor:README.md",
"Rollup": "//packages/rollup:README.md",
"Terser": "//packages/terser:README.md",
"TypeScript": "//packages/typescript:README.md",
}

_FRONT_MATTER = "\n".join([
"---",
"title: %s",
"layout: default",
"stylesheet: docs",
"---",
"<!-- *********************",
" DO NOT EDIT THIS FILE",
" It is a generated build output from Stardoc.",
" Instead you must edit the .bzl file where the rules are declared,",
" or possibly a markdown file next to the .bzl file",
" ********************* -->",
])

[
genrule(
name = "%s_md" % readme[0],
srcs = [readme[1]],
outs = [readme[0] + ".md"],
cmd = "echo '%s' > $@;" % _FRONT_MATTER % readme[0] +
"cat $< >> $@",
tags = ["fix-windows"],
)
for readme in _PACKAGE_READMES.items()
]

filegroup(
rules_nodejs_docs(
name = "docs",
srcs = [s + ".md" for s in _PACKAGE_READMES.keys()],
tags = ["fix-windows"],
assets = glob(["images/*"]),
config = "_config.yml",
css = "//docs/css",
docs = [
"install.md",
"repositories.md",
"debugging.md",
"dependencies.md",
"stamping.md",
"index.md",
"examples.md",
"changing-rules.md",
],
includes = glob(["_includes/*"]),
layouts = glob(["_layouts/*"]),
readmes = {
"Built-ins": ":builtins.doc",
"Cypress": "//packages/cypress:README.md",
"Jasmine": "//packages/jasmine:README.md",
"Karma": "//packages/karma:README.md",
"Protractor": "//packages/protractor:README.md",
"Rollup": "//packages/rollup:README.md",
"Terser": "//packages/terser:README.md",
"TypeScript": "//packages/typescript:README.md",
},
tags = [
"fix-windows",
"manual",
],
)
2,863 changes: 2,863 additions & 0 deletions docs/Built-ins.html

Large diffs are not rendered by default.

2,864 changes: 1,827 additions & 1,037 deletions docs/Built-ins.md

Large diffs are not rendered by default.

Loading

0 comments on commit ca2fee5

Please sign in to comment.