Skip to content

Commit

Permalink
fix: postinstall of css artifact (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Feb 16, 2021
1 parent df9c9c7 commit c232c70
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
node_modules
test/output
output
output
template/css/main.min.css
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +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: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": "echo \"no assets to generate at the moment\"",
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION"
},
"publishConfig": {
Expand Down
File renamed without changes.
11 changes: 2 additions & 9 deletions template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if params.singleFile %}
<style type="text/css">
{% include "template/css/tailwind.min.css" %}
</style>
<style type="text/css">
{% include "template/css/atom-one-dark.min.css" %}
</style>
<style type="text/css">
{% include "template/css/main.css" %}
{% include "template/css/main.min.css" %}
</style>
{% else %}
<link href="css/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/atom-one-dark.min.css" />
<link href="css/main.min.css" rel="stylesheet">
{% endif %}
</head>
<body>
Expand Down

0 comments on commit c232c70

Please sign in to comment.