Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Sep 16, 2024
1 parent 854b72c commit c3a30cc
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions e2e/cli-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e": {
"dependsOn": [
{
"projects": "self",
"target": "setup-env",
"params": "forward"
}
Expand Down
1 change: 1 addition & 0 deletions e2e/cli-static-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e": {
"dependsOn": [
{
"projects": "self",
"target": "setup-env",
"params": "forward"
}
Expand Down
1 change: 1 addition & 0 deletions e2e/core-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e": {
"dependsOn": [
{
"projects": "self",
"target": "setup-env",
"params": "forward"
}
Expand Down
1 change: 1 addition & 0 deletions e2e/models-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e": {
"dependsOn": [
{
"projects": "self",
"target": "setup-env",
"params": "forward"
}
Expand Down
1 change: 1 addition & 0 deletions e2e/playground-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e": {
"dependsOn": [
{
"projects": "self",
"target": "setup-env",
"params": "forward"
}
Expand Down
1 change: 1 addition & 0 deletions e2e/utils-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e": {
"dependsOn": [
{
"projects": "self",
"target": "setup-env",
"params": "forward"
}
Expand Down
1 change: 0 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
],
"sharedGlobals": []
},
"nxCloudAccessToken": "YTA1MzQyZjktN2U2ZS00MmI1LThlZmMtYjE1NzFjNzYyMzZhfHJlYWQtd3JpdGU=",
"targetDefaults": {
"@nx/esbuild:esbuild": {
"cache": true,
Expand Down
1 change: 0 additions & 1 deletion static-environments/user-lists/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"sourceRoot": "projects/user-lists/src",
"projectType": "library",
"tags": [],
"// targets": "to see all targets run: nx show project user-lists --web",
"targets": {}
}
4 changes: 2 additions & 2 deletions testing/test-setup/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "testing/test-setup/src",
"projectType": "library",
"tags": ["scope:shared", "type:testing"],
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
Expand All @@ -12,5 +11,6 @@
"lintFilePatterns": ["testing/test-setup/**/*.ts"]
}
}
}
},
"tags": ["scope:shared", "type:testing"]
}
4 changes: 2 additions & 2 deletions tooling/build-env/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "tooling/build-env/src",
"projectType": "library",
"tags": ["scope:shared", "type:tooling"],
"implicitDependencies": [],
"targets": {
"build": {
Expand Down Expand Up @@ -48,5 +47,6 @@
"configFile": "tooling/build-env/vite.config.ts"
}
}
}
},
"tags": ["scope:shared", "type:tooling"]
}
16 changes: 9 additions & 7 deletions tooling/build-env/src/plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export const createNodes: CreateNodes = [
...(isNpmEnv(tags) && envTargets({ environmentRoot, projectName })),
// === dependency project
// npm-publish, npm-install
...(isPublishable(tags) &&
npmTargets(projectName, environmentRoot)),
...(isPublishable(tags) && npmTargets(projectName)),
},
},
},
Expand Down Expand Up @@ -111,29 +110,32 @@ function envTargets({
},
// runs bootstrap-env, install-env and stop-verdaccio
'setup-env': {
outputs: ['{options.environmentRoot}'],
// outputs: ['{options.environmentRoot}'],
executor: '@org/build-env:setup',
options: { environmentRoot },
},
};
}

function npmTargets(
environmentProject: string,
environmentRoot: string
environmentProject: string
): Record<string, TargetConfiguration> {
return {
'npm-publish': {
dependsOn: [
{ projects: 'self', target: 'build', params: 'forward' },
{ projects: 'dependencies', target: 'npm-publish', params: 'forward' },
],
executor: '@org/build-env:npm-publish',
options: { environmentProject, environmentRoot },
options: { environmentProject },
},
'npm-install': {
dependsOn: [
{ projects: 'self', target: 'npm-publish', params: 'forward' },
{ projects: 'dependencies', target: 'npm-install', params: 'forward' },
],
executor: '@org/build-env:npm-install',
options: { environmentProject, environmentRoot },
options: { environmentProject },
},
};
}

0 comments on commit c3a30cc

Please sign in to comment.