Skip to content

Commit

Permalink
naming and use output path from config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakeii committed Jan 13, 2025
1 parent ee6893f commit 36202e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,6 @@ jobs:
configPath: ./riff-raff.yaml
contentDirectories: |
frontend-static/commercial:
- dist/riff-raff/js/commercial
- dist/prod/artifacts/commercial
commercial-bundle-path:
- dist/riff-raff/cloudformation
- dist/prod/cloudformation
2 changes: 1 addition & 1 deletion webpack.config.prod.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default merge(config, {
output: {
filename: `commercial/${prefix}graun.standalone.commercial.js`,
chunkFilename: `commercial/${prefix}graun.[name].commercial.js`,
path: join(import.meta.dirname, 'dist', 'riff-raff', 'js'),
path: join(import.meta.dirname, 'dist', 'prod', 'artifacts'),
publicPath: 'auto',
clean: true,
},
Expand Down
20 changes: 2 additions & 18 deletions webpack/prout-plugin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,11 @@ export class PROutPlugin {
* @param {import('webpack').Compiler} compiler
*/
apply = (compiler) => {
compiler.hooks.afterEmit.tap('AfterEmitPlugin', () => {
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
const commitSHA = execSync('git rev-parse HEAD').toString().trim();

compiler.outputFileSystem.mkdirSync(
join(
import.meta.dirname,
'..',
'dist',
'riff-raff',
'js',
'commercial',
),
{ recursive: true },
);

const outputPath = join(
import.meta.dirname,
'..',
'dist',
'riff-raff',
'js',
compilation.outputOptions.path,
'commercial',
`prout`,
);
Expand Down
8 changes: 2 additions & 6 deletions webpack/update-parameter-store-plugin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,16 @@ export class UpdateParameterStorePlugin {

const output = JSON.stringify(cloudformation, null, 2);
const outputPath = join(
import.meta.dirname,
compilation.outputOptions.path,
'..',
'dist',
'riff-raff',
'cloudformation',
`${stage}.json`,
);

compiler.outputFileSystem.mkdirSync(
join(
import.meta.dirname,
compilation.outputOptions.path,
'..',
'dist',
'riff-raff',
'cloudformation',
),
{ recursive: true },
Expand Down

0 comments on commit 36202e6

Please sign in to comment.