@nativescript/nx
Version:
NativeScript Plugin for Nx
90 lines • 3.25 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFrontendFrameworkTargets = getFrontendFrameworkTargets;
exports.getProjectConfiguration = getProjectConfiguration;
function getFrontendFrameworkTargets(options) {
switch (options.framework) {
case 'angular':
return {
build: {
executor: options.buildExecutor,
options: {
noHmr: true,
production: true,
uglify: true,
release: true,
forDevice: true,
},
configurations: {
prod: {
fileReplacements: [
{
replace: `./src/environments/environment.ts`,
with: `./src/environments/environment.prod.ts`,
},
],
},
},
dependsOn: ['^build'],
},
};
default:
return {};
}
}
function getProjectConfiguration(options) {
return {
root: options.projectRoot,
sourceRoot: options.projectSourceRoot,
projectType: 'application',
targets: Object.assign(Object.assign({}, getFrontendFrameworkTargets(options)), { debug: {
executor: '@nativescript/nx:debug',
options: {
noHmr: true,
uglify: false,
release: false,
forDevice: false,
prepare: false,
},
configurations: {
build: {
copyTo: './dist/build.ipa',
},
prod: {
fileReplacements: [
{
replace: `./src/environments/environment.ts`,
with: `./src/environments/environment.prod.ts`,
},
],
},
},
dependsOn: ['^build'],
}, prepare: {
executor: '@nativescript/nx:prepare',
options: {
noHmr: true,
production: true,
uglify: true,
release: true,
forDevice: true,
prepare: true,
},
configurations: {
prod: {
fileReplacements: [
{
replace: `./src/environments/environment.ts`,
with: `./src/environments/environment.prod.ts`,
},
],
},
},
dependsOn: ['^build'],
}, clean: {
executor: '@nativescript/nx:clean',
options: {},
} }),
};
}
//# sourceMappingURL=project-json.js.map