Skip to content

Commit

Permalink
fix original version
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Sep 7, 2024
1 parent d7aad39 commit 23eae7f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion e2e-examples/cli-e2e-original/setup/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function setup() {
command: 'nx',
args: objectToCliArgs({
_: ['run-many'],
targets: 'original-npm-publish,!tag:type:testing',
targets: 'original-npm-publish',
exclude: 'tag:type:testing',
skipNxCache: true,
}),
Expand Down
17 changes: 4 additions & 13 deletions e2e-examples/cli-e2e-original/tooling/original.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,18 @@ export const createNodes: CreateNodes = [
if (projectName == null) {
throw new Error('Project name required');
}

// only execute for the -original example projects e.g. `cli-e2e-original`, `e2e-models-original`
if (!projectName.endsWith('-original')) {
return {
projects: {
[root]: {},
},
};
}

const isRoot = root === '.';
const isPublishable = (projectConfiguration?.tags ?? []).some(
(tag) => tag === 'publishable'
);
const isRoot = root === '.';


return {
projects: {
[root]: {
targets: {
...(isRoot && verdaccioTargets()),
...(isPublishable &&
npmTargets({ ...projectConfiguration, root, name: projectName })),
...(isPublishable && npmTargets({ ...projectConfiguration, root, name: projectName })),
},
},
},
Expand All @@ -55,6 +45,7 @@ function verdaccioTargets(): Record<string, TargetConfiguration> {
options: {
config: '.verdaccio/config.yml',
storage: `tmp/local-registry/storage`,
port: 4200
},
},
};
Expand Down
5 changes: 4 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@
}
}
},
"plugins": ["./tooling/build-env/src/plugin/verdaccio-env.plugin.ts"],
"plugins": [
"./tooling/build-env/src/plugin/verdaccio-env.plugin.ts",
"./e2e-examples/cli-e2e-original/tooling/original.plugin.ts"
],
"release": {
"version": {
"preVersionCommand": "npx nx run-many -t build"
Expand Down

0 comments on commit 23eae7f

Please sign in to comment.