Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(landingpage): add NX specific executors #1363

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ tmp/
.angular
.nx-cache

.nx/cache
.nx/cache
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@nx/eslint": "18.0.7",
"@nx/eslint-plugin": "18.0.7",
"@nx/js": "18.0.7",
"@nx/next": "18.0.7",
"@nx/playwright": "18.0.7",
"@nx/storybook": "18.0.7",
"@playwright/test": "^1.36.0",
Expand Down Expand Up @@ -77,6 +78,7 @@
"prettier": "^2.6.2",
"prompts": "^2.4.0",
"semver": "^7.5.4",
"serve": "^14.2.1",
"shelljs": "^0.8.4",
"shx": "^0.3.2",
"svgo": "^2.8.0",
Expand All @@ -93,6 +95,9 @@
"@angular/platform-browser": "~15.1.0",
"@angular/platform-browser-dynamic": "~15.1.0",
"@angular/router": "~15.1.0",
"next": "14.0.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
Expand Down
5 changes: 0 additions & 5 deletions packages/landingpage/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { remarkCodeHike } from '@code-hike/mdx';
import nextMdx from '@next/mdx';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import { readFile } from 'fs/promises';
import withImages from 'next-images';
import withHtml from 'next-html';
import path, { join } from 'path';
import remarkGfm from 'remark-gfm';

const theme = JSON.parse(
await readFile('../../node_modules/shiki/themes/github-light.json'),
);

const __dirname = path.resolve();
const assetsPath = join(__dirname, '..', '..', 'assets', 'logo');
const publicPath = join(__dirname, 'public');
Expand Down
3 changes: 0 additions & 3 deletions packages/landingpage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
"date-fns": "^2.29.3",
"lodash-es": "^4.17.21",
"negotiator": "^0.6.3",
"next": "14.1.0",
"next-mdx-remote": "^4.2.0",
"react": "^18.2.0",
"react-chartjs-2": "^5.0.1",
"react-dom": "18.2.0",
"react-use": "^17.4.0",
"rehype-highlight": "^6.0.0",
"remark-gfm": "^3.0.1",
Expand Down
39 changes: 22 additions & 17 deletions packages/landingpage/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,33 @@
"tags": [],
"targets": {
"build": {
"outputs": ["{projectRoot}/out"],
"executor": "nx:run-commands",
"executor": "@nx/next:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "prod",
"options": {
"cwd": "packages/landingpage",
"commands": ["next build"],
"parallel": false,
"color": true
}
},
"start": {
"executor": "nx:run-commands",
"options": {
"cwd": "packages/landingpage"
"outputPath": "{projectRoot}/out",
"nextConfig": "{projectRoot}/next.config.mjs"
},
"defaultConfiguration": "dev",
"configurations": {
"dev": {
"command": "next dev -p 4600"
"debug": true
},
"prod": {
"command": "next start -p 4600"
}
"prod": {}
}
},
"start": {
"executor": "@nx/next:server",
"defaultConfiguration": "dev",
"options": {
"buildTarget": "landingpage:build",
"dev": true
}
},
"preview": {
"executor": "@nx/web:file-server",
"options": {
"buildTarget": "landingpage:build:prod",
"port": 4600
}
},
"lint": {
Expand Down
Loading
Loading