Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/services/project-config-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
format as prettierFormat,
resolveConfig as resolvePrettierConfig,
} from "prettier";
import { cache } from "../common/decorators";
import { cache, exported } from "../common/decorators";
import { IOptions } from "../declarations";
import semver = require("semver/preload");

Expand Down Expand Up @@ -123,6 +123,7 @@ export default {
};
}

@exported("projectConfigService")
public readConfig(projectDir?: string): INsConfig {
const info = this.detectProjectConfigs(projectDir);

Expand Down Expand Up @@ -159,10 +160,12 @@ export default {
return config;
}

@exported("projectConfigService")
public getValue(key: string): any {
return _.get(this.readConfig(), key);
}

@exported("projectConfigService")
public async setValue(
key: string,
value: SupportedConfigValues
Expand Down
10 changes: 9 additions & 1 deletion lib/services/webpack/webpack-compiler-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,15 @@ export class WebpackCompilerService
Object.assign(
envData,
appPath && { appPath },
appResourcesPath && { appResourcesPath }
appResourcesPath && { appResourcesPath },
{
nativescriptLibPath: path.resolve(
__dirname,
"..",
"..",
"nativescript-cli-lib.js"
),
}
);

envData.verbose = envData.verbose || this.$logger.isVerbose();
Expand Down