瀏覽代碼

Update build scripts

simov 4 年之前
父節點
當前提交
375342fa24
共有 4 個文件被更改,包括 75 次插入13 次删除
  1. 63 13
      build/prism/prism.json
  2. 2 0
      build/remark/index.js
  3. 9 0
      build/themes/fix-github.js
  4. 1 0
      build/themes/themes.sh

+ 63 - 13
build/prism/prism.json

@@ -8,55 +8,74 @@
     "abnf",
     "actionscript",
     "ada",
+    "agda",
+    "al",
+    "antlr4",
     "apacheconf",
     "apl",
     "applescript",
+    "aql",
     "arduino",
     "arff",
     "asciidoc",
-    "asm6502",
     "aspnet",
+    "asm6502",
     "autohotkey",
     "autoit",
     "bash",
     "basic",
     "batch",
+    "bbcode",
+    "birb",
     "bison",
     "bnf",
     "brainfuck",
+    "brightscript",
     "bro",
+    "bsl",
     "c",
     "csharp",
     "cpp",
     "cil",
-    "coffeescript",
-    "cmake",
     "clojure",
-    "crystal",
+    "cmake",
+    "coffeescript",
+    "concurnas",
     "csp",
+    "crystal",
     "css-extras",
+    "cypher",
     "d",
     "dart",
+    "dax",
+    "dhall",
     "diff",
     "django",
     "dns-zone-file",
     "docker",
     "ebnf",
+    "editorconfig",
     "eiffel",
     "ejs",
     "elixir",
     "elm",
+    "etlua",
     "erb",
     "erlang",
+    "excel-formula",
     "fsharp",
+    "factor",
+    "firestore-security-rules",
     "flow",
     "fortran",
+    "ftl",
+    "gml",
     "gcode",
+    "gdscript",
     "gedcom",
     "gherkin",
     "git",
     "glsl",
-    "gml",
     "go",
     "graphql",
     "groovy",
@@ -65,11 +84,13 @@
     "haskell",
     "haxe",
     "hcl",
+    "hlsl",
     "http",
     "hpkp",
     "hsts",
     "ichigojam",
     "icon",
+    "ignore",
     "inform7",
     "ini",
     "io",
@@ -82,19 +103,22 @@
     "jq",
     "jsdoc",
     "js-extras",
-    "js-templates",
     "json",
-    "jsonp",
     "json5",
+    "jsonp",
+    "jsstacktrace",
+    "js-templates",
     "julia",
     "keyman",
     "kotlin",
     "latex",
+    "latte",
     "less",
     "lilypond",
     "liquid",
     "lisp",
     "livescript",
+    "llvm",
     "lolcode",
     "lua",
     "makefile",
@@ -103,11 +127,15 @@
     "matlab",
     "mel",
     "mizar",
+    "mongodb",
     "monkey",
+    "moonscript",
     "n1ql",
     "n4js",
     "nand2tetris-hdl",
+    "naniscript",
     "nasm",
+    "neon",
     "nginx",
     "nim",
     "nix",
@@ -121,11 +149,13 @@
     "pascal",
     "pascaligo",
     "pcaxis",
+    "peoplecode",
     "perl",
     "php",
     "phpdoc",
     "php-extras",
     "plsql",
+    "powerquery",
     "powershell",
     "processing",
     "prolog",
@@ -134,18 +164,23 @@
     "pug",
     "puppet",
     "pure",
+    "purebasic",
+    "purescript",
     "python",
     "q",
+    "qml",
     "qore",
     "r",
+    "racket",
     "jsx",
     "tsx",
-    "renpy",
     "reason",
     "regex",
+    "renpy",
     "rest",
     "rip",
     "roboconf",
+    "robotframework",
     "ruby",
     "rust",
     "sas",
@@ -154,23 +189,34 @@
     "scala",
     "scheme",
     "shell-session",
+    "smali",
     "smalltalk",
     "smarty",
+    "sml",
+    "solidity",
+    "solution-file",
     "soy",
+    "sparql",
     "splunk-spl",
+    "sqf",
     "sql",
+    "stan",
+    "iecst",
     "stylus",
     "swift",
+    "t4-templating",
+    "t4-cs",
+    "t4-vb",
     "tap",
     "tcl",
+    "tt2",
     "textile",
     "toml",
-    "tt2",
+    "turtle",
     "twig",
     "typescript",
-    "t4-cs",
-    "t4-vb",
-    "t4-templating",
+    "typoscript",
+    "unrealscript",
     "vala",
     "vbnet",
     "velocity",
@@ -178,12 +224,16 @@
     "vhdl",
     "vim",
     "visual-basic",
+    "warpscript",
     "wasm",
     "wiki",
     "xeora",
+    "xml-doc",
     "xojo",
     "xquery",
-    "yaml"
+    "yaml",
+    "yang",
+    "zig"
   ],
   "markdown-viewer": [
     "actionscript",

+ 2 - 0
build/remark/index.js

@@ -5,8 +5,10 @@ module.exports = {
   parse: require('remark-parse'),
   stringify: require('remark-stringify'),
   // plugins
+  gfm: require('remark-gfm'),
   breaks: require('remark-breaks'),
   html: require('remark-html'),
   slug: require('remark-slug'),
+  footnotes: require('remark-footnotes'),
   frontmatter: require('remark-frontmatter'),
 }

+ 9 - 0
build/themes/fix-github.js

@@ -0,0 +1,9 @@
+
+var fs = require('fs')
+
+var github = fs.readFileSync('./themes/github.css', 'utf8')
+fs.writeFileSync(
+  'themes/github.css',
+  github.replace(/\.markdown-body :root/g, ':root'),
+  'utf8'
+)

+ 1 - 0
build/themes/themes.sh

@@ -20,3 +20,4 @@ npx csso --input ../markdown-themes/solarized-dark.css --output themes/solarized
 npx csso --input ../markdown-themes/solarized-light.css --output themes/solarized-light.css
 npx csso --input ../markdown-themes/torpedo.css --output themes/torpedo.css
 npx csso --input ../markdown-themes/vostok.css --output themes/vostok.css
+node build/themes/fix-github.js