From 197fe64fa8e159adb3483ce68e3f6a40118fd78d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 23 May 2021 18:19:46 +0200 Subject: [PATCH] docs: autogenerate sprites data file during build (#136) --- .drone.yml | 10 +++++---- exampleSite/data/sprites/geekdoc.json | 30 --------------------------- gulpfile.js | 2 +- 3 files changed, 7 insertions(+), 35 deletions(-) delete mode 100644 exampleSite/data/sprites/geekdoc.json diff --git a/.drone.yml b/.drone.yml index 8114f10..f289244 100644 --- a/.drone.yml +++ b/.drone.yml @@ -94,20 +94,19 @@ steps: commands: - npm install > /dev/null - npx gulp default - - npx gulp svg-sprite-list environment: FORCE_COLOR: true NPM_CONFIG_LOGLEVEL: error - name: package - image: alpine + image: thegeeklab/alpine-tools commands: - mkdir dist/ - echo "${DRONE_TAG:-latest}" > VERSION - tar -zcvf dist/hugo-geekdoc.tar.gz -X .tarignore . - name: checksum - image: alpine + image: thegeeklab/alpine-tools commands: - cd dist/ && sha256sum * > ../sha256sum.txt @@ -171,6 +170,8 @@ steps: - name: assets image: thegeeklab/alpine-tools commands: + - npm install > /dev/null + - npx gulp svg-sprite-list - mkdir -p exampleSite/themes/hugo-geekdoc/ - curl -sSL https://github.com/thegeeklab/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C exampleSite/themes/hugo-geekdoc/ --strip-components=1 when: @@ -183,6 +184,7 @@ steps: commands: - npm install > /dev/null - npx gulp default + - npx gulp svg-sprite-list - mkdir exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/hugo-geekdoc environment: FORCE_COLOR: true @@ -273,6 +275,6 @@ depends_on: --- kind: signature -hmac: 9aae6e48a3316cb2881f7f6ae959a7868cb727138e0bdaae927c873b6417ccaa +hmac: 127e4b738bbf810da960f10b767378793ecff2da5de7de03892ff96d4361735d ... diff --git a/exampleSite/data/sprites/geekdoc.json b/exampleSite/data/sprites/geekdoc.json deleted file mode 100644 index 5d02075..0000000 --- a/exampleSite/data/sprites/geekdoc.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - "arrow_back", - "arrow_left_alt", - "arrow_right_alt", - "bitbucket", - "bookmark", - "brightness_auto", - "brightness_dark", - "brightness_light", - "cloud_off", - "code", - "date", - "download", - "email", - "git", - "github", - "gitlab", - "heart", - "keyborad_arrow_down", - "keyborad_arrow_left", - "keyborad_arrow_right", - "link", - "menu", - "notification", - "path", - "person", - "search", - "shield", - "tags" -] \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 1db6624..7d209d5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -273,7 +273,7 @@ gulp.task("clean", function () { gulp.task("asset", gulp.series("asset-sync", "asset-rev")); -gulp.task("svg", gulp.series("svg-sprite", "svg-sprite-list")); +gulp.task("svg", gulp.series("svg-sprite")); gulp.task( "default",