Set up a vite pipeline
This commit is contained in:
parent
0f622a6c78
commit
80fe8ba99f
6 changed files with 1438 additions and 52 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -99,7 +99,7 @@ dist
|
||||||
.cache/
|
.cache/
|
||||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
# public
|
public
|
||||||
|
|
||||||
# vuepress build output
|
# vuepress build output
|
||||||
.vuepress/dist
|
.vuepress/dist
|
||||||
|
|
15
docs/index.html
Normal file
15
docs/index.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="Content-Language" content="en" />
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />
|
||||||
|
<meta name="superfish" content="nofish" />
|
||||||
|
<meta name="application-name" content="linguist.css" />
|
||||||
|
<link rel="stylesheet" href="index.scss"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{#data}}
|
||||||
|
{{ slug }}: {{ color }}
|
||||||
|
{{/data}}
|
||||||
|
</body>
|
||||||
|
</html>
|
2
docs/index.scss
Normal file
2
docs/index.scss
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
@import "../dist/linguist";
|
||||||
|
@import "../node_modules/bulma/bulma";
|
1448
package-lock.json
generated
1448
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -6,18 +6,23 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:data": "node scripts/build.js",
|
"build:data": "node scripts/build.js",
|
||||||
|
"build:docs": "vite build",
|
||||||
"lint:output": "stylelint dist/out.scss dist/out.css"
|
"lint:output": "stylelint dist/out.scss dist/out.css"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"bulma": "^0.9.4",
|
||||||
"change-case": "^4.1.2",
|
"change-case": "^4.1.2",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"mkdirp": "^3.0.0",
|
"mkdirp": "^3.0.0",
|
||||||
"node-fetch": "^3.3.1",
|
"node-fetch": "^3.3.1",
|
||||||
|
"sass": "^1.62.0",
|
||||||
"slugify": "^1.6.6",
|
"slugify": "^1.6.6",
|
||||||
"stylelint-config-standard": "^33.0.0",
|
"stylelint-config-standard": "^33.0.0",
|
||||||
"stylelint-config-standard-scss": "^8.0.0",
|
"stylelint-config-standard-scss": "^8.0.0",
|
||||||
|
"vite": "^4.3.1",
|
||||||
|
"vite-plugin-handlebars": "^1.6.0",
|
||||||
"yaml": "^2.2.1"
|
"yaml": "^2.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
vite.config.js
Normal file
18
vite.config.js
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
import linguist from "./dist/linguist.json";
|
||||||
|
import handlebars from 'vite-plugin-handlebars';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [handlebars({
|
||||||
|
context: {
|
||||||
|
data: Object.values(linguist)
|
||||||
|
}
|
||||||
|
})],
|
||||||
|
root: "./docs",
|
||||||
|
base: "./",
|
||||||
|
build: {
|
||||||
|
outDir: "../public",
|
||||||
|
emptyOutDir: true,
|
||||||
|
target: "es2015"
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in a new issue