Skip to content

Commit

Permalink
nx migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmojicatech committed Apr 7, 2024
1 parent 5dc4b94 commit 9b29daf
Show file tree
Hide file tree
Showing 23 changed files with 20,383 additions and 20,432 deletions.
6 changes: 3 additions & 3 deletions apps/disney-planner-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/disney-planner-e2e/src",
"tags": [],
"implicitDependencies": ["disney-planner"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
Expand All @@ -27,7 +29,5 @@
"lintFilePatterns": ["apps/disney-planner-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["disney-planner"]
}
}
6 changes: 3 additions & 3 deletions apps/disney-planner/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"projectType": "application",
"prefix": "disney",
"sourceRoot": "apps/disney-planner/src",
"tags": [],
"tags": [],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/disney-planner",
"index": "apps/disney-planner/src/index.html",
"index": "apps/disney-planner/src/index.html",
"polyfills": ["zone.js"],
"tsConfig": "apps/disney-planner/tsconfig.app.json",
"tsConfig": "apps/disney-planner/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"main": "apps/disney-planner/src/main.ts",
"assets": [
Expand Down
6 changes: 3 additions & 3 deletions apps/fantalytic-mobile-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/fantalytic-mobile-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["fantalytic-mobile"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
Expand All @@ -24,7 +26,5 @@
"lintFilePatterns": ["apps/fantalytic-mobile-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["fantalytic-mobile"]
}
}
4 changes: 2 additions & 2 deletions apps/fantalytic-mobile/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "application",
"sourceRoot": "apps/fantalytic-mobile/src",
"prefix": "pmt",
"tags": [],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
Expand Down Expand Up @@ -192,6 +193,5 @@
}
}
}
},
"tags": []
}
}
6 changes: 3 additions & 3 deletions apps/fantalytic-public-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/fantalytic-public-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["fantalytic-public"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
Expand All @@ -24,7 +26,5 @@
"lintFilePatterns": ["apps/fantalytic-public-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["fantalytic-public"]
}
}
4 changes: 2 additions & 2 deletions apps/fantalytic-public/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "application",
"sourceRoot": "apps/fantalytic-public/src",
"prefix": "pmt",
"tags": [],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
Expand Down Expand Up @@ -95,6 +96,5 @@
"jestConfig": "apps/fantalytic-public/jest.config.ts"
}
}
},
"tags": []
}
}
6 changes: 3 additions & 3 deletions apps/fantalytic-ssr/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/fantalytic-ssr/src",
"tags": [],
"targets": {
"build": {
"executor": "@nx/vite:build",
Expand All @@ -15,7 +16,7 @@
"options": {
"main": "apps/fantalytic-ssr/src/main.ts",
"configFile": "apps/fantalytic-ssr/vite.config.ts",
"outputPath": "dist/apps/fantalytic-ssr/client"
"outputPath": "dist/apps/fantalytic-ssr"
},
"defaultConfiguration": "production",
"configurations": {
Expand Down Expand Up @@ -65,6 +66,5 @@
"executor": "@nx/vite:test",
"outputs": ["{projectRoot}/coverage"]
}
},
"tags": []
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient } from '@angular/common/http';
import { Injectable, inject } from '@angular/core';
import { Topic, parseESPNRSSFeed } from 'libs/fantalytic-shared-v2/src';
import { Topic, parseESPNRSSFeed } from '@pmt/fantalytic-shared-v2';
import { Observable, catchError, map, throwError } from 'rxjs';

@Injectable({
Expand Down
12 changes: 10 additions & 2 deletions apps/fantalytic-ssr/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@

import analog from '@analogjs/platform';
import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig, Plugin, splitVendorChunkPlugin } from 'vite';
import { defineConfig, Plugin } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
root: __dirname,
publicDir: 'src/public',

optimizeDeps: {
include: ['@angular/common', '@angular/forms'],
},
build: {
outDir: '../../dist/apps/fantalytic-ssr/client',
reportCompressedSize: true,
commonjsOptions: { transformMixedEsModules: true },
target: ['es2020'],
},
plugins: [
Expand Down Expand Up @@ -45,9 +49,13 @@ export default defineConfig(({ mode }) => {
}),
nxViteTsPaths(),
visualizer() as Plugin,
splitVendorChunkPlugin(),
],
test: {
reporters: ['default'],
coverage: {
reportsDirectory: '../../coverage/apps/fantalytic-ssr',
provider: 'v8',
},
globals: true,
environment: 'jsdom',
setupFiles: ['src/test-setup.ts'],
Expand Down
4 changes: 2 additions & 2 deletions apps/fantalytic-web-scraper-cron/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/fantalytic-web-scraper-cron/src",
"projectType": "application",
"tags": [],
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
Expand Down Expand Up @@ -47,6 +48,5 @@
"lintFilePatterns": ["apps/fantalytic-web-scraper-cron/**/*.ts"]
}
}
},
"tags": []
}
}
6 changes: 3 additions & 3 deletions apps/grocery-list-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/grocery-list-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["grocery-list"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
Expand All @@ -24,7 +26,5 @@
"lintFilePatterns": ["apps/grocery-list-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["grocery-list"]
}
}
4 changes: 2 additions & 2 deletions apps/grocery-list/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/grocery-list/src",
"projectType": "application",
"tags": [],
"targets": {
"build": {
"executor": "@nx/web:webpack",
Expand Down Expand Up @@ -78,6 +79,5 @@
"jestConfig": "apps/grocery-list/jest.config.ts"
}
}
},
"tags": []
}
}
6 changes: 3 additions & 3 deletions apps/marvel-web-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/marvel-web-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["marvel-web"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
Expand All @@ -23,7 +25,5 @@
"lintFilePatterns": ["apps/marvel-web-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["marvel-web"]
}
}
4 changes: 2 additions & 2 deletions apps/marvel-web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "application",
"sourceRoot": "apps/marvel-web/src",
"prefix": "pmt",
"tags": [],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
Expand Down Expand Up @@ -89,6 +90,5 @@
"jestConfig": "apps/marvel-web/jest.config.js"
}
}
},
"tags": []
}
}
6 changes: 3 additions & 3 deletions apps/marvintherapy-public-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/marvintherapy-public-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["marvintherapy-public"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
Expand All @@ -23,7 +25,5 @@
"lintFilePatterns": ["apps/marvintherapy-public-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["marvintherapy-public"]
}
}
4 changes: 2 additions & 2 deletions apps/marvintherapy-public/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/marvintherapy-public",
"projectType": "application",
"tags": [],
"targets": {
"build": {
"executor": "@nx/next:build",
Expand Down Expand Up @@ -48,6 +49,5 @@
"lintFilePatterns": ["apps/marvintherapy-public/**/*.{ts,tsx,js,jsx}"]
}
}
},
"tags": []
}
}
4 changes: 2 additions & 2 deletions libs/fantalytic-shared-v2/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/fantalytic-shared-v2/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "@nx/vite:build",
Expand All @@ -18,6 +19,5 @@
"lintFilePatterns": ["libs/fantalytic-shared-v2/**/*.ts"]
}
}
},
"tags": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function parseFfaRssItemResponse(item: Element): Topic {
function parseFootballersRssItemResponse(item: Element): Topic {
const title = item.getElementsByTagName('title')[0].textContent ?? '';
const description = item.getElementsByTagName('description')[0].firstChild?.textContent ?? '';
const link = item.getElementsByTagName('link')[0].firstChild?.textContent ?? '';
const link = item.getElementsByTagName('link')[0]?.firstChild?.textContent ?? '';
const publishedDate = item.getElementsByTagName('pubDate')[0].textContent ?? '';
const topic = {title, description, publishedDate, link};
return topic;
Expand Down
4 changes: 4 additions & 0 deletions libs/fantalytic-shared-v2/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import dts from 'vite-plugin-dts';
import { join } from 'path';

export default defineConfig({
root: __dirname,
cacheDir: '../../node_modules/.vite/fantalytic-shared-v2',

plugins: [
Expand All @@ -30,6 +31,9 @@ export default defineConfig({
// Configuration for building your library.
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
outDir: '../../dist/libs/fantalytic-shared-v2',
reportCompressedSize: true,
commonjsOptions: { transformMixedEsModules: true },
lib: {
// Could also be a dictionary or array of multiple entry points.
entry: 'src/index.ts',
Expand Down
24 changes: 1 addition & 23 deletions migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,29 +124,7 @@
"implementation": "./src/migrations/update-17-3-0/vitest-coverage-and-reporters",
"package": "@nx/vite",
"name": "vitest-coverage-and-reporters"
},
{
"cli": "nx",
"version": "17.2.6-beta.1",
"description": "Rename workspace rules from @nx/workspace/name to @nx/workspace-name",
"implementation": "./src/migrations/update-17-2-6-rename-workspace-rules/rename-workspace-rules",
"package": "@nx/eslint-plugin",
"name": "update-17-2-6-rename-workspace-rules"
},
{
"version": "17.2.0-beta.0",
"description": "Simplify eslintFilePatterns",
"implementation": "./src/migrations/update-17-2-0/simplify-eslint-patterns",
"package": "@nx/eslint",
"name": "simplify-eslint-patterns"
},
{
"version": "17.2.9",
"description": "Move executor options to target defaults",
"implementation": "./src/migrations/update-17-2-9/move-options-to-target-defaults",
"package": "@nx/eslint",
"name": "move-options-to-target-defaults"
},
},
{
"cli": "nx",
"version": "17.2.7",
Expand Down
6 changes: 2 additions & 4 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@
]
}
},
"affected": {
"defaultBase": "main"
},
"generators": {
"@nx/angular:application": {
"style": "scss",
Expand Down Expand Up @@ -96,5 +93,6 @@
}
}
},
"nxCloudAccessToken": "ZGNjNDliZDItYTljYy00ZjRmLWJhNWEtNmM0NDJhZGMyYjVlfHJlYWQtd3JpdGU="
"useInferencePlugins": false,
"defaultBase": "main"
}
Loading

0 comments on commit 9b29daf

Please sign in to comment.