chore: cleanup build setup and webpack requirements (#265)

This commit is contained in:
Robert Kaussow 2022-01-07 16:18:07 +01:00 committed by GitHub
parent 2cd92c6343
commit bf0981bcc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 15 deletions

View file

@ -28,7 +28,7 @@ steps:
- name: testbuild
image: thegeeklab/hugo:0.91.0
commands:
- mkdir exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/hugo-geekdoc
- mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/hugo-geekdoc
- hugo -s exampleSite/ -b http://localhost/
- name: html-validation
@ -111,7 +111,6 @@ steps:
- name: package
image: thegeeklab/alpine-tools
commands:
- mkdir dist/
- echo "${DRONE_TAG:-latest}" > VERSION
- tar -zcvf dist/hugo-geekdoc.tar.gz -X .tarignore .
@ -195,7 +194,7 @@ steps:
- npm install > /dev/null
- npm run build
- npm run svg-sprite-list
- mkdir exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/hugo-geekdoc
- mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/hugo-geekdoc
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
@ -285,6 +284,6 @@ depends_on:
---
kind: signature
hmac: e715545ce951b15ce1ab5f7d7f107e2ab37aa08e94a681f27646a543d1e6ac3c
hmac: d45186c01b7b530fc615420c88bd6a375ac6979758cb6e12d45412cd78fc5642
...

View file

@ -13,10 +13,10 @@
"start:hugo": "hugo server -D -F -s exampleSite/",
"svg": "run-s svg:*",
"svg:sprite": "svg-sprite -C svgsprite.config.json 'src/icons/*.svg'",
"svg:font": "svgtofont --sources build/icons --output build/fonts",
"svg:font": "svgtofont --sources build/icons/ --output build/fonts/",
"prep:clean": "shx rm -rf build/ static/",
"prep:clean-all": "shx rm -rf build/ static/ data/ assets/sprites/ exampleSite/data/sprites",
"prep:make": "mkdir -p build/icons build/fonts",
"prep:clean-all": "shx rm -rf build/ dist/ static/ data/ assets/sprites/ exampleSite/data/sprites/",
"prep:make": "mkdir -p build/icons/ build/fonts/ dist/",
"svg-sprite-list": "run-s prep:make svg ; mkdir -p exampleSite/data/sprites/ ; cp build/fonts/GeekdocIcons.json exampleSite/data/sprites/geekdoc.json",
"lint": "eslint src/js/ --color"
},

View file

@ -1,7 +1,7 @@
import { applyTheme } from "./darkmode"
import { createCopyButton } from "./copycode.js"
const { applyTheme } = require("./darkmode")
const { createCopyButton } = require("./copycode.js")
const Clipboard = require("clipboard")
import Clipboard from "clipboard"
;(() => {
applyTheme()
})()

View file

@ -1,6 +1,6 @@
import Storage from "store2"
const Storage = require("store2")
import { TOGGLE_MODES, THEME, AUTO_MODE } from "./config.js"
const { TOGGLE_MODES, THEME, AUTO_MODE } = require("./config.js")
document.addEventListener("DOMContentLoaded", (event) => {
const darkModeToggle = document.getElementById("gdoc-dark-mode")

View file

@ -1,6 +1,5 @@
import Storage from "store2"
import { DARK_MODE, THEME, AUTO_MODE } from "./config.js"
const Storage = require("store2")
const { DARK_MODE, THEME, AUTO_MODE } = require("./config.js")
document.addEventListener("DOMContentLoaded", function (event) {
let lstore = Storage.namespace(THEME)