Skip to content

Commit

Permalink
chore: nx init
Browse files Browse the repository at this point in the history
  • Loading branch information
geromegrignon committed Dec 6, 2022
1 parent f5bcf51 commit 279e243
Show file tree
Hide file tree
Showing 97 changed files with 19,471 additions and 22,662 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
24 changes: 0 additions & 24 deletions .github/workflows/deploy-documentation.yml

This file was deleted.

18 changes: 11 additions & 7 deletions .github/workflows/test-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
name: test-documentation

on:
workflow_dispatch:
pull_request:
branches: [main]

jobs:
gh-release:
test-documentation:
runs-on: ubuntu-latest
defaults:
run:
working-directory: documentation
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npm run build
cache: 'yarn'
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: nx build documentation
70 changes: 43 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules
.yarn/*
!.yarn/releases
!.yarn/plugins
.pnp.*

# IDE files #
.idea/
.vscode/
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

# Dependency directories
node_modules/
# Generated Docusaurus files
.docusaurus/
.cache-loader/
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.prettierignore
.docusaurus/
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"nrwl.angular-console",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"dbaeumer.vscode-eslint"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';

# Introduction

<a href="https://demo.realworld.io/"><img src={useBaseUrl('/img/conduit_l.png')} align="right" width="250px" /></a>
<a href="/docs/intro"><img src={useBaseUrl('/img/conduit_l.png')} align="right" width="250px" /></a>

> See how *the exact same* Medium.com clone (called [Conduit](https://demo.realworld.io)) is built using different [frontends](https://codebase.show/projects/realworld?category=frontend) and [backends](https://codebase.show/projects/realworld?category=backend). Yes, you can mix and match them, because **they all adhere to the same [API spec](specs/backend-specs/introduction)** 😮😎
Expand Down
File renamed without changes.
123 changes: 123 additions & 0 deletions apps/documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'RealWorld',
tagline: 'The mother of all demo apps',
url: 'https://realworld-docs.netlify.app/',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'gothinkster',
projectName: 'realworld',

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/gothinkster/realworld/tree/main/docs/docs/',
},
blog: {
showReadingTime: true,
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/gothinkster/realworld/tree/main/docs/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'RealWorld',
logo: {
alt: 'RealWorld Logo',
src: 'img/realworld-logo.png',
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Documentation',
},
/* {to: '/blog', label: 'Blog', position: 'left'}, */
{
position: 'right',
to: 'docs/implementation-creation/introduction',
html: '<a>contribute</a>',
className: "header-contribute-link",
},
{
href: 'https://github.com/gothinkster/realworld',
"aria-label": 'GitHub repository',
className: "header-github-link",
position: 'right',
}
],
},
footer: {
style: 'dark',
links: [
{
title: 'Community',
items: [
{
label: 'CodebaseShow',
href: 'https://codebase.show/projects/realworld'
},
{
label: 'GitHub Discussions',
href: 'https://github.com/gothinkster/realworld/discussions',
},
/*
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},
*/
],
}
/*
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/gothinkster/realworld',
},
],
},
*/
]
},
colorMode: {
disableSwitch: true
}
}),
};

module.exports = config;

21 changes: 21 additions & 0 deletions apps/documentation/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "documentation",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/documentation/src",
"targets": {
"build": {
"executor": "@nx-plus/docusaurus:browser",
"options": {
"outputPath": "dist/apps/documentation"
}
},
"serve": {
"executor": "@nx-plus/docusaurus:dev-server",
"options": {
"port": 3000
}
}
},
"tags": []
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {

@media screen and (min-width: 997px) {
.header-contribute-link a {
background-color: #8ab903;
color: #000 !important;
background-color: #6e2c6e;
color: #FFF !important;
font-weight: 700;
padding: 0.7rem 2rem;
border-radius: 6.4px;
Expand All @@ -160,5 +160,6 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {

.header-contribute-link a:hover {
background-color: #d4d5d8;
color: #000 !important;
}
}
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
20 changes: 20 additions & 0 deletions apps/documentation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"jsx": "react",
"lib": ["DOM"],
"noEmit": true,
"noImplicitAny": false,
"types": [
"node",
"@docusaurus/module-type-aliases",
"@docusaurus/theme-classic"
],
"baseUrl": ".",
"paths": {
"@site/*": ["./*"]
}
}
}
Loading

0 comments on commit 279e243

Please sign in to comment.