Skip to content

Commit

Permalink
Add logging of exports
Browse files Browse the repository at this point in the history
  • Loading branch information
MulverineX committed Dec 1, 2023
1 parent bfc8acd commit a841b7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sandstone-build",
"version": "1.0.7",
"version": "1.0.8",
"description": "The Build component for the Sandstone CLI.",
"type": "module",
"exports": "./lib/index.js",
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async function _buildProject(cliOptions: BuildOptions, { absProjectFolder, proje
const outputFolder = path.join(rootFolder, '.sandstone', 'output')

/// OPTIONS ///
const clientPath = !cliOptions.production ? (cliOptions.clientPath || saveOptions.clientPath || await getClientPath()) : undefined
const clientPath = !cliOptions.production ? (cliOptions.clientPath || (saveOptions.clientPath as string || undefined) || await getClientPath()) : undefined
const server = !cliOptions.production && (cliOptions.serverPath || saveOptions.serverPath || cliOptions.ssh || saveOptions.ssh) ? await (async () => {
if (cliOptions.ssh || saveOptions.ssh) {
const sshOptions = JSON.stringify(await fs.readFile(cliOptions.ssh || saveOptions.ssh, 'utf8'))
Expand Down Expand Up @@ -544,7 +544,9 @@ async function _buildProject(cliOptions: BuildOptions, { absProjectFolder, proje
// Run the afterAll script
await scripts?.afterAll?.()

console.log('\nPack(s) compiled! View output in ./.sandstone/output/\n')
const exports = (server || clientPath) ? [...(server ? ['server'] : []), ...(clientPath ? ['client'] : [])].join(' and ') : false

console.log(`\nPack(s) compiled!${exports ? ` Exported to ${exports}.` : ''} View output in ./.sandstone/output/\n`)
}

/**
Expand Down

0 comments on commit a841b7d

Please sign in to comment.