Skip to content

Commit

Permalink
Merge pull request #145 from TrialAndErrorOrg/feat/next-blog
Browse files Browse the repository at this point in the history
  • Loading branch information
tefkah authored May 16, 2023
2 parents 4c4ae9b + da0df94 commit 2fa8789
Show file tree
Hide file tree
Showing 512 changed files with 18,235 additions and 115,919 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
28 changes: 22 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "prettier", "prefer-arrow"],
"plugins": ["@nx", "prettier", "prefer-arrow"],
"rules": {},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -24,7 +24,7 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript", "airbnb", "airbnb-typescript", "next", "prettier"],
"extends": ["plugin:@nx/typescript", "airbnb", "airbnb-typescript", "next", "prettier"],
"rules": {
"prefer-arrow/prefer-arrow-functions": [
"error",
Expand All @@ -34,8 +34,19 @@
"classPropertiesAllowed": false
}
],
"prefer-arrow-callback": ["error", { "allowNamedFunctions": true }],
"func-style": ["error", "expression", { "allowArrowFunctions": true }],
"prefer-arrow-callback": [
"error",
{
"allowNamedFunctions": true
}
],
"func-style": [
"error",
"expression",
{
"allowArrowFunctions": true
}
],
"react/prop-types": "off",
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": "off",
Expand All @@ -61,7 +72,12 @@
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
}
]
Expand Down
20 changes: 0 additions & 20 deletions .storybook/main.js

This file was deleted.

14 changes: 0 additions & 14 deletions .storybook/tsconfig.json

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"typescript.tsdk": "node_modules/typescript/lib",

"tailwindCSS.experimental.configFile": "apps/trialanderror.org/tailwind.config.cjs",
"exportall.config.folderListener": ["/libs/types/src/lib/github", "/libs/types/src/lib"],
"appService.defaultWebAppToDeploy": "/subscriptions/3d4dfc68-39d1-4d8e-81d5-b59ee8d8cd36/microsoft.web/sites/subscriptions/3d4dfc68-39d1-4d8e-81d5-b59ee8d8cd36/resourceGroups/centeroftrialanderror.com/providers/Microsoft.Web/sites/cote-strapi",
"appService.deploySubpath": "apps/strapi",
"exportall.config.relExclusion": ["/libs/types/src/lib/validators.ts"]
"exportall.config.relExclusion": ["/libs/types/src/lib/validators.ts"],
"eslint.validate": ["json"]
}
13 changes: 11 additions & 2 deletions apps/blog-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { defineConfig } from 'cypress'
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'

export default defineConfig({
e2e: nxE2EPreset(__dirname),
e2e: {
...nxE2EPreset(__dirname),
/**
* TODO(@nx/cypress): In Cypress v12,the testIsolation option is turned on by default.
* This can cause tests to start breaking where not indended.
* You should consider enabling this once you verify tests do not depend on each other
* More Info: https://docs.cypress.io/guides/references/migration-guide#Test-Isolation
**/
testIsolation: false,
},
})
4 changes: 2 additions & 2 deletions apps/blog-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/blog-e2e/cypress.config.ts",
"devServerTarget": "blog:dev",
"testingType": "e2e"
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/blog-e2e/**/*.{js,ts}"]
Expand Down
9 changes: 5 additions & 4 deletions apps/blog/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "blog",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/blog/src",
"targets": {
"build": {
"outputs": ["dist/apps/blog"],
"outputs": [
"dist/apps/blog"
],
"executor": "@nxtensions/astro:build",
"options": {
"config": "astro.config.ts"
Expand All @@ -18,8 +20,7 @@
"preview": {
"dependsOn": [
{
"target": "build",
"projects": "self"
"target": "build"
}
],
"executor": "@nxtensions/astro:preview",
Expand Down
2 changes: 1 addition & 1 deletion apps/email/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"plugin:@nrwl/nx/react-typescript",
"plugin:@nx/react-typescript",
"next",
"next/core-web-vitals",
"../../.eslintrc.json"
Expand Down
6 changes: 3 additions & 3 deletions apps/email/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ export default {
displayName: 'trialanderror.org',
preset: '../../jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/next/babel'] }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/apps/trialanderror.org',
}
};
4 changes: 2 additions & 2 deletions apps/email/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"command": "pnpm exec email dev --dir apps/email/emails"
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/email/jest.config.ts",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/email/**/*.{ts,tsx,js,jsx}"]
Expand Down
56 changes: 28 additions & 28 deletions apps/email/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// @ts-check
const { createGlobPatternsForDependencies } = require("@nrwl/react/tailwind")
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind');

const { join } = require("path")
const defaultTheme = require("tailwindcss/defaultTheme")
const { join } = require('path');
const defaultTheme = require('tailwindcss/defaultTheme');

/**
* @type {import('tailwindcss').Config}
*/
module.exports = {
darkMode: "class",
darkMode: 'class',
// presets: [require("../../tailwind-workspace-preset.js")],
content: [
join(__dirname, "**/*!(*.stories|*.spec).{ts,tsx,html}"),
join(__dirname, '**/*!(*.stories|*.spec).{ts,tsx,html}'),
...createGlobPatternsForDependencies(__dirname),
],
theme: {
Expand All @@ -20,7 +20,7 @@ module.exports = {
},
extend: {
fontFamily: {
sans: ["var(--font-open-sans)", ...defaultTheme.fontFamily.sans],
sans: ['var(--font-open-sans)', ...defaultTheme.fontFamily.sans],
},
boxShadow: {
'thick-1': '2px 2px 0 #000',
Expand All @@ -32,31 +32,31 @@ module.exports = {
},
colors: {
orange: {
50: "#ffe13e",
100: "#ffd734",
200: "#ffcd2a",
300: "#ffc320",
400: "#ffb916",
500: "#ffaf0c",
600: "#f5a502",
700: "#eb9b00",
800: "#e19100",
900: "#d78700",
50: '#ffe13e',
100: '#ffd734',
200: '#ffcd2a',
300: '#ffc320',
400: '#ffb916',
500: '#ffaf0c',
600: '#f5a502',
700: '#eb9b00',
800: '#e19100',
900: '#d78700',
},
blue: {
50: "#dfe4ea",
100: "#284e6a",
200: "#1e4460",
300: "#143a56",
400: "#0a304c",
500: "#002642",
600: "#001c38",
700: "#00122e",
800: "#000824",
900: "#00001a",
50: '#dfe4ea',
100: '#284e6a',
200: '#1e4460',
300: '#143a56',
400: '#0a304c',
500: '#002642',
600: '#001c38',
700: '#00122e',
800: '#000824',
900: '#00001a',
},
},
},
},
plugins: [require("@tailwindcss/typography"), require("@tailwindcss/forms")],
}
plugins: [require('@tailwindcss/typography'), require('@tailwindcss/forms')],
};
2 changes: 1 addition & 1 deletion apps/frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"plugin:@nrwl/nx/react-typescript",
"plugin:@nx/react-typescript",
"next",
"next/core-web-vitals",
"../../.eslintrc.json"
Expand Down
22 changes: 11 additions & 11 deletions apps/frontend/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const config = {
displayName: 'thesis',
preset: '../../jest.preset.ts',
displayName: "thesis",
preset: "../../jest.preset.ts",
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
"ts-jest": {
tsconfig: "<rootDir>/tsconfig.spec.json",
useESM: true,
},
},
testEnvironment: 'node',
testEnvironment: "node",
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
'^.+\\.[tj]sx?$': ['@swc/jest'],
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nx/react/plugins/jest",
"^.+\\.[tj]sx?$": ["@swc/jest"],
},
transformIgnorePatterns: [],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/apps/thesis',
extensionsToTreatAsEsm: ['.ts'],
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
coverageDirectory: "../../coverage/apps/thesis",
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
"^(\\.{1,2}/.*)\\.js$": "$1",
},
}

Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const withNx = require("@nrwl/next/plugins/with-nx")
const withNx = require("@nx/next/plugins/with-nx")

// const withBundleAnalyzer = require("@next/bundle-analyzer")({
// enabled: process.env.ANALYZE === "true",
Expand Down
12 changes: 7 additions & 5 deletions apps/frontend/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "frontend",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/frontend",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/next:build",
"executor": "@nx/next:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
Expand All @@ -17,7 +19,7 @@
}
},
"serve": {
"executor": "@nrwl/next:server",
"executor": "@nx/next:server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "frontend:build",
Expand All @@ -35,21 +37,21 @@
}
},
"export": {
"executor": "@nrwl/next:export",
"executor": "@nx/next:export",
"options": {
"buildTarget": "frontend:build:production"
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["coverage/apps/frontend"],
"options": {
"jestConfig": "apps/frontend/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/frontend/**/*.{ts,tsx,js,jsx}"]
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { createGlobPatternsForDependencies } = require("@nrwl/react/tailwind")
const { createGlobPatternsForDependencies } = require("@nx/react/tailwind")

const { join } = require("path")

Expand Down
Loading

2 comments on commit 2fa8789

@vercel
Copy link

@vercel vercel bot commented on 2fa8789 May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

under-construction – ./apps/construction

under-construction-trialanderror.vercel.app
under-construction-git-main-trialanderror.vercel.app
trialanderror-org.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 2fa8789 May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.