-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add preview, build, and playbook scripts #10
base: main
Are you sure you want to change the base?
Conversation
@@ -40,5 +52,5 @@ function faviconsTags(htmlWebpackPlugin) { | |||
.filter((tag) => tag.tagName !== 'script') | |||
.join('') | |||
// It must be Handlebars template with root path as variable | |||
.replaceAll('uiRootPath', '{{{uiRootPath}}}') | |||
.replace(/uiRootPath/g, '{{{uiRootPath}}}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need a regexp?
@@ -5,10 +5,19 @@ const ZipPlugin = require('zip-webpack-plugin'); | |||
const FaviconsPlugin = require('favicons-webpack-plugin') | |||
const CopyPlugin = require('copy-webpack-plugin') | |||
const HtmlPlugin = require('html-webpack-plugin') | |||
const { CleanWebpackPlugin } = require('clean-webpack-plugin') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't using a style that uses a few lines above? 🤔
I think CleanPlugin
is more good name.
@@ -5,10 +5,19 @@ const ZipPlugin = require('zip-webpack-plugin'); | |||
const FaviconsPlugin = require('favicons-webpack-plugin') | |||
const CopyPlugin = require('copy-webpack-plugin') | |||
const HtmlPlugin = require('html-webpack-plugin') | |||
const { CleanWebpackPlugin } = require('clean-webpack-plugin') | |||
const path = require('path'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we merge this line with line 3 that already has a require('path')
?
@@ -1,4846 +1,8 @@ | |||
{ | |||
"name": "taymyr-antora-ui", | |||
"version": "1.0.0", | |||
"lockfileVersion": 2, | |||
"lockfileVersion": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we downgrade a lockfile version? 🤔
"scripts": { | ||
"preview": "npm-run-all -s build playbook", | ||
"playbook": "antora antora-playbook.yml", | ||
"build": "webpack" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that bundle
is more semantic name and known to those who using Antora Default UI.
"build": "webpack" | |
"bundle": "webpack" |
@@ -7,16 +7,24 @@ | |||
"type": "git", | |||
"url": "https://github.com/taymyr/taymyr-antora-ui.git" | |||
}, | |||
"scripts": { | |||
"preview": "npm-run-all -s build playbook", | |||
"playbook": "antora antora-playbook.yml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think antora
or site
are more suitable. playbook
doesn't mean anything 🤷♂️
Fixed #4