Skip to content

Commit

Permalink
chore(release): Update release directory settings (#3696)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgutride authored Aug 9, 2023
1 parent d441003 commit 2094e2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const clientConfig = async (env, argv) => {
return {
output: {
path: argv.output ? path.resolve(argv.output) : path.resolve('public'),
filename: '[name].[contenthash].bundle.js'
filename: 'js/[name].[contenthash].bundle.js'
},
devServer: {
hot: true,
Expand Down Expand Up @@ -85,7 +85,7 @@ const clientConfig = async (env, argv) => {
exclude: reactCSSRegex,
use: [
{
loader: MiniCssExtractPlugin.loader,
loader: MiniCssExtractPlugin.loader
},
{
loader: 'css-loader'
Expand Down Expand Up @@ -117,8 +117,8 @@ const clientConfig = async (env, argv) => {
'process.env.PRERENDER': false,
}),
new MiniCssExtractPlugin(!isProd ? {} : {
filename: '[name].[contenthash].css',
chunkFilename: '[name].[contenthash].css',
filename: 'css/[name].[contenthash].css',
chunkFilename: 'css/[name].[contenthash].css',
}),
new CopyPlugin({
patterns: [
Expand Down
5 changes: 4 additions & 1 deletion scripts/writeVersionPrefix.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ glob.sync(path.join(__dirname, "../build/patternfly-org/site/**"))
.filter(file => fs.lstatSync(file).isFile())
.forEach(file => {
const newPath = file.replace("patternfly-org/site", `patternfly-org/${version}`);

if (file.endsWith('.js') || file.endsWith('.html')) {
let contents = fs.readFileSync(file, 'utf8');
contents = contents.replace(/\/site/g, `/${version}`);
Expand All @@ -21,6 +21,9 @@ glob.sync(path.join(__dirname, "../build/patternfly-org/site/**"))

});

const outputDir = path.join(__dirname, "../build/patternfly-org");
fs.moveSync(`${outputDir}/${version}`, `${outputDir}/site/${version}`);

fs.writeFileSync(
path.join(__dirname, '../build/patternfly-org/versions.json'),
JSON.stringify(versions)
Expand Down

0 comments on commit 2094e2d

Please sign in to comment.