This repository has been archived by the owner on Nov 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Demo): Generate examples standalone
To avoid conflicts and confusion when example HTML has existing themes CSS and JS
- Loading branch information
Showing
9 changed files
with
9,444 additions
and
9,675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# Generate article-kitchen-sink.html | ||
npx encoda convert article-kitchen-sink.json article-kitchen-sink.html | ||
npx encoda convert article-kitchen-sink.json article-kitchen-sink.html --standalone=false | ||
|
||
# Generate article-drosophila.html | ||
npx encoda convert https://elifesciences.org/articles/49574v2 article-drosophila.html | ||
npx encoda convert https://elifesciences.org/articles/49574v2 article-drosophila.html --standalone=false | ||
|
||
# Generate article-antibodies.html | ||
npx encoda convert 'https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1007207' article-antibodies.html | ||
npx encoda convert 'https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1007207' article-antibodies.html --standalone=false | ||
|
||
# Generate article-rmarkdown.html | ||
# Temporarily excluded becuase, with removal of `coerce()` call from `xmd` codec | ||
# the metadata is causing this to fail. | ||
# curl -o rmarkdown.nb.html https://raw.githubusercontent.com/stencila/examples/master/rmarkdown/rmarkdown.nb.html | ||
# npx encoda convert rmarkdown.nb.html --from rnb article-rmarkdown.html | ||
# npx encoda convert rmarkdown.nb.html --from rnb article-rmarkdown.html --standalone=false | ||
# rm rmarkdown.nb.html | ||
|
||
# Replace unpkg Thema packages with local versions for development. Swapping out JavaScript files for TypeScript | ||
perl -pi -w -e 's/https:\/\/unpkg.com\/\@stencila\/thema\@1\/dist\/(.+\/index)\.js/\.\.\/$1\.ts/g;' *.html | ||
perl -pi -w -e 's/https:\/\/unpkg.com\/\@stencila\/thema\@1\/dist/\.\./g;' *.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const examples: { [key: string]: string } = { | ||
'article-kitchen-sink': '/examples/article-kitchen-sink.html', | ||
'article-antibodies': '/examples/article-antibodies.html', | ||
'article-drosophila': '/examples/article-drosophila.html' | ||
'article-kitchen-sink': 'examples/article-kitchen-sink.html', | ||
'article-antibodies': 'examples/article-antibodies.html', | ||
'article-drosophila': 'examples/article-drosophila.html' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters