Skip to content

Commit

Permalink
Export paths for other recipes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Oct 10, 2023
1 parent 0af6a32 commit c294dc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lombiq.NodeJs.Extensions/build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<NpmDotnetPrebuildCommand Condition="'$(NuGetBuild)' != 'true'">node scripts/run-pnpm-script "$(MSBuildProjectDirectory)" build</NpmDotnetPrebuildCommand>
<!-- During NuGet builds, we don't lint, we only compile. -->
<NpmDotnetPrebuildCommand Condition="'$(NuGetBuild)' == 'true'">node scripts/run-pnpm-script "$(MSBuildProjectDirectory)" compile</NpmDotnetPrebuildCommand>
<NpmDotnetPostcleanCommand>pnpm clean</NpmDotnetPostcleanCommand>
<NpmDotnetPostcleanCommand>node scripts/run-pnpm-script "$(MSBuildProjectDirectory)" clean</NpmDotnetPostcleanCommand>
<!-- Don't run the NpmInstall target from NPM Targets, because InstallNodeJsExtensionsNpmPackage already takes care
of that and more. -->
<ExecNpmInstallCommand>false</ExecNpmInstallCommand>
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.NodeJs.Extensions/scripts/get-project-directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

function getProjectDirectory() {
return process.env.npm_config_local_prefix ?? path.join(require('./get-cwd')(), '..', '..');
return process.env.npm_config_local_prefix ?? process.env.LOMBIQ_NODEJS_EXTENSIONS_PROJECT_DIRECTORY;
}

module.exports = getProjectDirectory;
1 change: 1 addition & 0 deletions Lombiq.NodeJs.Extensions/scripts/run-pnpm-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if (args.length < 2) panic('USAGE: node scripts/run-pnpm-script <project-path> <
// Initialize variables.
const [projectPath, script] = args;
const packageJsonPath = path.join(projectPath, 'package.json');
process.env.LOMBIQ_NODEJS_EXTENSIONS_PROJECT_DIRECTORY = projectPath;

function call(command) {
process.stdout.write(`Executing "${command}"...\n`);
Expand Down

0 comments on commit c294dc4

Please sign in to comment.