From b071a865800bb4d6b9e24d796b32770955617017 Mon Sep 17 00:00:00 2001 From: derberg Date: Mon, 15 Feb 2021 12:06:22 +0100 Subject: [PATCH 1/2] fix: postinstall of css artefact --- .gitignore | 3 ++- package.json | 6 +++++- template/css/{main.css => custom.css} | 0 template/index.html | 11 ++--------- 4 files changed, 9 insertions(+), 11 deletions(-) rename template/css/{main.css => custom.css} (100%) diff --git a/.gitignore b/.gitignore index 2febca2a2..4176da6b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store node_modules test/output -output \ No newline at end of file +output +template/css/main.min.css diff --git a/package.json b/package.json index 4342bdb01..01bbba1b1 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,11 @@ "develop": "ag https://raw.githubusercontent.com/asyncapi/generator/v1.1.5/test/docs/dummy.yml ./ -o test/output --force-write --watch-template", "//develop:install": "Force ag to install your local html-template source code", "develop:install": " npm run develop -- --install", - "generate:assets": "cross-env NODE_ENV=production postcss template/css/main.css -o template/css/tailwind.min.css", + "generate:atomcss": "cross-env NODE_ENV=production postcss template/css/atom-one-dark.min.css -o template/css/main.min.css", + "generate:maincss": "cross-env NODE_ENV=production postcss template/css/custom.css -o template/css/main.min.css", + "generate:tailwind.css": "cross-env NODE_ENV=production postcss template/css/tailwind.min.css -o template/css/main.min.css", + "postinstall": "rimraf \"template/css/main.min.css\" && npm run generate:atomcss && npm run generate:maincss && npm run generate:tailwind.css", + "generate:assets": "npm run postinstall", "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION" }, "publishConfig": { diff --git a/template/css/main.css b/template/css/custom.css similarity index 100% rename from template/css/main.css rename to template/css/custom.css diff --git a/template/index.html b/template/index.html index 631dbc93a..cde8b3c20 100644 --- a/template/index.html +++ b/template/index.html @@ -9,17 +9,10 @@ {% if params.singleFile %} - - {% else %} - - + {% endif %} From 77f5fbab86dda83eb379e478199b5972b2c022d1 Mon Sep 17 00:00:00 2001 From: derberg Date: Mon, 15 Feb 2021 12:24:02 +0100 Subject: [PATCH 2/2] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 01bbba1b1..48a5cf041 100644 --- a/package.json +++ b/package.json @@ -22,14 +22,14 @@ "lint": "echo \"No linter specified yet\"", "test": "ava", "release": "semantic-release", - "develop": "ag https://raw.githubusercontent.com/asyncapi/generator/v1.1.5/test/docs/dummy.yml ./ -o test/output --force-write --watch-template", + "develop": "npm run postinstall && ag https://raw.githubusercontent.com/asyncapi/generator/v1.1.5/test/docs/dummy.yml ./ -o test/output --force-write --watch-template", "//develop:install": "Force ag to install your local html-template source code", "develop:install": " npm run develop -- --install", "generate:atomcss": "cross-env NODE_ENV=production postcss template/css/atom-one-dark.min.css -o template/css/main.min.css", "generate:maincss": "cross-env NODE_ENV=production postcss template/css/custom.css -o template/css/main.min.css", "generate:tailwind.css": "cross-env NODE_ENV=production postcss template/css/tailwind.min.css -o template/css/main.min.css", "postinstall": "rimraf \"template/css/main.min.css\" && npm run generate:atomcss && npm run generate:maincss && npm run generate:tailwind.css", - "generate:assets": "npm run postinstall", + "generate:assets": "echo \"no assets to generate at the moment\"", "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION" }, "publishConfig": {