Add Strapi+Nuxt CMS scaffolding
This commit is contained in:
parent
2ad72bbf61
commit
f1ff6f75ad
16
packages/cms/.editorconfig
Normal file
16
packages/cms/.editorconfig
Normal file
|
@ -0,0 +1,16 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{package.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
6
packages/cms/.env.example
Normal file
6
packages/cms/.env.example
Normal file
|
@ -0,0 +1,6 @@
|
|||
HOST=0.0.0.0
|
||||
PORT=1337
|
||||
APP_KEYS="toBeModified1,toBeModified2"
|
||||
API_TOKEN_SALT=tobemodified
|
||||
ADMIN_JWT_SECRET=tobemodified
|
||||
JWT_SECRET=tobemodified
|
115
packages/cms/.gitignore
vendored
Normal file
115
packages/cms/.gitignore
vendored
Normal file
|
@ -0,0 +1,115 @@
|
|||
############################
|
||||
# OS X
|
||||
############################
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
Icon
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
._*
|
||||
|
||||
|
||||
############################
|
||||
# Linux
|
||||
############################
|
||||
|
||||
*~
|
||||
|
||||
|
||||
############################
|
||||
# Windows
|
||||
############################
|
||||
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
|
||||
############################
|
||||
# Packages
|
||||
############################
|
||||
|
||||
*.7z
|
||||
*.csv
|
||||
*.dat
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.seed
|
||||
*.so
|
||||
*.swo
|
||||
*.swp
|
||||
*.swn
|
||||
*.swm
|
||||
*.out
|
||||
*.pid
|
||||
|
||||
|
||||
############################
|
||||
# Logs and databases
|
||||
############################
|
||||
|
||||
.tmp
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
*.sqlite3
|
||||
|
||||
|
||||
############################
|
||||
# Misc.
|
||||
############################
|
||||
|
||||
*#
|
||||
ssl
|
||||
.idea
|
||||
nbproject
|
||||
public/uploads/*
|
||||
!public/uploads/.gitkeep
|
||||
|
||||
############################
|
||||
# Node.js
|
||||
############################
|
||||
|
||||
lib-cov
|
||||
lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
testApp
|
||||
coverage
|
||||
|
||||
############################
|
||||
# Strapi
|
||||
############################
|
||||
|
||||
.env
|
||||
license.txt
|
||||
exports
|
||||
*.cache
|
||||
dist
|
||||
build
|
||||
.strapi-updater.json
|
57
packages/cms/README.md
Normal file
57
packages/cms/README.md
Normal file
|
@ -0,0 +1,57 @@
|
|||
# 🚀 Getting started with Strapi
|
||||
|
||||
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html) (CLI) which lets you scaffold and manage your project in seconds.
|
||||
|
||||
### `dev`
|
||||
|
||||
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop)
|
||||
|
||||
```
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
```
|
||||
|
||||
### `start`
|
||||
|
||||
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-start)
|
||||
|
||||
```
|
||||
npm run start
|
||||
# or
|
||||
yarn start
|
||||
```
|
||||
|
||||
### `build`
|
||||
|
||||
Build your admin panel. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build)
|
||||
|
||||
```
|
||||
npm run build
|
||||
# or
|
||||
yarn build
|
||||
```
|
||||
|
||||
## ⚙️ Deployment
|
||||
|
||||
Strapi gives you many possible deployment options for your project. Find the one that suits you on the [deployment section of the documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment.html).
|
||||
|
||||
## 📚 Learn more
|
||||
|
||||
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
|
||||
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
|
||||
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
|
||||
- [Strapi blog](https://docs.strapi.io) - Official Strapi blog containing articles made by the Strapi team and the community.
|
||||
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
|
||||
|
||||
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
|
||||
|
||||
## ✨ Community
|
||||
|
||||
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
|
||||
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
|
||||
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.
|
||||
|
||||
---
|
||||
|
||||
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>
|
8
packages/cms/config/admin.ts
Normal file
8
packages/cms/config/admin.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
export default ({ env }) => ({
|
||||
auth: {
|
||||
secret: env('ADMIN_JWT_SECRET'),
|
||||
},
|
||||
apiToken: {
|
||||
salt: env('API_TOKEN_SALT'),
|
||||
},
|
||||
});
|
7
packages/cms/config/api.ts
Normal file
7
packages/cms/config/api.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
export default {
|
||||
rest: {
|
||||
defaultLimit: 25,
|
||||
maxLimit: 100,
|
||||
withCount: true,
|
||||
},
|
||||
};
|
11
packages/cms/config/database.ts
Normal file
11
packages/cms/config/database.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import path from 'path';
|
||||
|
||||
export default ({ env }) => ({
|
||||
connection: {
|
||||
client: 'sqlite',
|
||||
connection: {
|
||||
filename: path.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db')),
|
||||
},
|
||||
useNullAsDefault: true,
|
||||
},
|
||||
});
|
12
packages/cms/config/middlewares.ts
Normal file
12
packages/cms/config/middlewares.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
export default [
|
||||
'strapi::errors',
|
||||
'strapi::security',
|
||||
'strapi::cors',
|
||||
'strapi::poweredBy',
|
||||
'strapi::logger',
|
||||
'strapi::query',
|
||||
'strapi::body',
|
||||
'strapi::session',
|
||||
'strapi::favicon',
|
||||
'strapi::public',
|
||||
];
|
7
packages/cms/config/server.ts
Normal file
7
packages/cms/config/server.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
export default ({ env }) => ({
|
||||
host: env('HOST', '0.0.0.0'),
|
||||
port: env.int('PORT', 1337),
|
||||
app: {
|
||||
keys: env.array('APP_KEYS'),
|
||||
},
|
||||
});
|
0
packages/cms/database/migrations/.gitkeep
Normal file
0
packages/cms/database/migrations/.gitkeep
Normal file
BIN
packages/cms/favicon.png
Normal file
BIN
packages/cms/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 497 B |
30093
packages/cms/package-lock.json
generated
Normal file
30093
packages/cms/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
30
packages/cms/package.json
Normal file
30
packages/cms/package.json
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "@schlechtenburg/cms",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
"dev": "strapi develop",
|
||||
"start": "strapi start",
|
||||
"build": "strapi build",
|
||||
"strapi": "strapi"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/plugin-graphql": "^4.5.3",
|
||||
"@strapi/plugin-i18n": "4.5.3",
|
||||
"@strapi/plugin-users-permissions": "4.5.3",
|
||||
"@strapi/strapi": "4.5.3",
|
||||
"better-sqlite3": "7.4.6"
|
||||
},
|
||||
"author": {
|
||||
"name": "A Strapi developer"
|
||||
},
|
||||
"strapi": {
|
||||
"uuid": "d70cca4c-887b-45a7-8b2d-afb95c49a0c8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
3
packages/cms/public/robots.txt
Normal file
3
packages/cms/public/robots.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
# To prevent search engines from seeing the site altogether, uncomment the next two lines:
|
||||
# User-Agent: *
|
||||
# Disallow: /
|
0
packages/cms/public/uploads/.gitkeep
Normal file
0
packages/cms/public/uploads/.gitkeep
Normal file
35
packages/cms/src/admin/app.example.tsx
Normal file
35
packages/cms/src/admin/app.example.tsx
Normal file
|
@ -0,0 +1,35 @@
|
|||
export default {
|
||||
config: {
|
||||
locales: [
|
||||
// 'ar',
|
||||
// 'fr',
|
||||
// 'cs',
|
||||
// 'de',
|
||||
// 'dk',
|
||||
// 'es',
|
||||
// 'he',
|
||||
// 'id',
|
||||
// 'it',
|
||||
// 'ja',
|
||||
// 'ko',
|
||||
// 'ms',
|
||||
// 'nl',
|
||||
// 'no',
|
||||
// 'pl',
|
||||
// 'pt-BR',
|
||||
// 'pt',
|
||||
// 'ru',
|
||||
// 'sk',
|
||||
// 'sv',
|
||||
// 'th',
|
||||
// 'tr',
|
||||
// 'uk',
|
||||
// 'vi',
|
||||
// 'zh-Hans',
|
||||
// 'zh',
|
||||
],
|
||||
},
|
||||
bootstrap(app) {
|
||||
console.log(app);
|
||||
},
|
||||
};
|
13
packages/cms/src/admin/tsconfig.json
Normal file
13
packages/cms/src/admin/tsconfig.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "@strapi/typescript-utils/tsconfigs/admin",
|
||||
"include": [
|
||||
"../plugins/**/admin/src/**/*",
|
||||
"./"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"build/",
|
||||
"dist/",
|
||||
"**/*.test.ts"
|
||||
]
|
||||
}
|
9
packages/cms/src/admin/webpack.config.example.js
Normal file
9
packages/cms/src/admin/webpack.config.example.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
module.exports = (config, webpack) => {
|
||||
// Note: we provide webpack above so you should not `require` it
|
||||
// Perform customizations to webpack config
|
||||
// Important: return the modified config
|
||||
return config;
|
||||
};
|
0
packages/cms/src/api/.gitkeep
Normal file
0
packages/cms/src/api/.gitkeep
Normal file
0
packages/cms/src/extensions/.gitkeep
Normal file
0
packages/cms/src/extensions/.gitkeep
Normal file
18
packages/cms/src/index.ts
Normal file
18
packages/cms/src/index.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
export default {
|
||||
/**
|
||||
* An asynchronous register function that runs before
|
||||
* your application is initialized.
|
||||
*
|
||||
* This gives you an opportunity to extend code.
|
||||
*/
|
||||
register(/*{ strapi }*/) {},
|
||||
|
||||
/**
|
||||
* An asynchronous bootstrap function that runs before
|
||||
* your application gets started.
|
||||
*
|
||||
* This gives you an opportunity to set up your data model,
|
||||
* run jobs, or perform some special logic.
|
||||
*/
|
||||
bootstrap(/*{ strapi }*/) {},
|
||||
};
|
23
packages/cms/tsconfig.json
Normal file
23
packages/cms/tsconfig.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"extends": "@strapi/typescript-utils/tsconfigs/server",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": [
|
||||
"./",
|
||||
"./**/*.ts",
|
||||
"./**/*.js",
|
||||
"src/**/*.json"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"build/",
|
||||
"dist/",
|
||||
".cache/",
|
||||
".tmp/",
|
||||
"src/admin/",
|
||||
"**/*.test.*",
|
||||
"src/plugins/**"
|
||||
]
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
"license": "GPL-3.0-or-later",
|
||||
"main": "lib/index.ts",
|
||||
"scripts": {
|
||||
"dev": "npm run json-to-md:watch",
|
||||
"typecheck": "vuedx-typecheck --no-pretty ./lib",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
|
|
8
packages/example-site/.gitignore
vendored
Normal file
8
packages/example-site/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
node_modules
|
||||
*.log*
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
.output
|
||||
.env
|
||||
dist
|
42
packages/example-site/README.md
Normal file
42
packages/example-site/README.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Nuxt 3 Minimal Starter
|
||||
|
||||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install the dependencies:
|
||||
|
||||
```bash
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install --shamefully-hoist
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on http://localhost:3000
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
npm run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
5
packages/example-site/app.vue
Normal file
5
packages/example-site/app.vue
Normal file
|
@ -0,0 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<NuxtWelcome />
|
||||
</div>
|
||||
</template>
|
5
packages/example-site/nuxt.config.ts
Normal file
5
packages/example-site/nuxt.config.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { defineNuxtConfig } from 'nuxt/config';
|
||||
|
||||
export default defineNuxtConfig({
|
||||
modules: ['nuxt-graphql-client'],
|
||||
});
|
6712
packages/example-site/package-lock.json
generated
Normal file
6712
packages/example-site/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
18
packages/example-site/package.json
Normal file
18
packages/example-site/package.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "@schlechtenburg/example-site",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nuxt": "3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"nuxt-graphql-client": "^0.2.23"
|
||||
}
|
||||
}
|
4
packages/example-site/tsconfig.json
Normal file
4
packages/example-site/tsconfig.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
|
@ -22,7 +22,6 @@
|
|||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "npm run json-to-md:watch",
|
||||
"typecheck": "vuedx-typecheck --no-pretty ./lib",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "npm run json-to-md:watch",
|
||||
"typecheck": "vuedx-typecheck --no-pretty ./lib",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "npm run json-to-md:watch",
|
||||
"typecheck": "vuedx-typecheck --no-pretty ./lib",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "npm run json-to-md:watch",
|
||||
"typecheck": "vuedx-typecheck --no-pretty ./lib",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
"license": "GPL-3.0-or-later",
|
||||
"main": "lib/index.ts",
|
||||
"scripts": {
|
||||
"dev": "npm run json-to-md:watch",
|
||||
"typecheck": "vuedx-typecheck --no-pretty ./lib",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue