Skip to content

Commit 30291c6

Browse files
committed
De-object the config files
1 parent 43aa024 commit 30291c6

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

files/rollup.config.mjs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ const addon = new Addon({
99
});
1010

1111
const rootDirectory = dirname(fileURLToPath(import.meta.url));
12-
const configs = {
13-
babel: resolve(rootDirectory, './babel.publish.config.cjs'),<% if (typescript) { %>
14-
ts: resolve(rootDirectory, './tsconfig.publish.json'),<% } %>
15-
};
12+
const babelConfig = resolve(rootDirectory, './babel.publish.config.cjs');<% if (typescript) { %>
13+
const tsConfig = resolve(rootDirectory, './tsconfig.publish.json');<% } %>
1614

1715
export default {
1816
// This provides defaults that work well alongside `publicEntrypoints` below.
@@ -53,7 +51,7 @@ export default {
5351
babel({
5452
extensions: ['.js', '.gjs'<% if (typescript) { %>, '.ts', '.gts'<% } %>],
5553
babelHelpers: 'bundled',
56-
configFile: configs.babel,
54+
configFile: babelConfig,
5755
}),
5856

5957
// Ensure that standalone .hbs files are properly integrated as Javascript.
@@ -65,8 +63,8 @@ export default {
6563
// Emit .d.ts declaration files
6664
addon.declarations(
6765
'declarations',<% if (packageManager === 'pnpm') { %>
68-
`pnpm glint --declaration --project ${configs.ts}`,<% } else { %>
69-
`npm exec glint -- --declaration --project ${configs.ts}`,<% } %>
66+
`pnpm glint --declaration --project ${tsConfig}`,<% } else { %>
67+
`npm exec glint -- --declaration --project ${tsConfig}`,<% } %>
7068
),<% } %>
7169

7270
// addons are allowed to contain imports of .css files, which we want rollup

0 commit comments

Comments
 (0)