@smi-digital/create-smi-app 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +2 -0
- package/dist/index.js +633 -0
- package/package.json +76 -0
- package/templates/.husky/commit-msg +1 -0
- package/templates/.husky/pre-commit +1 -0
- package/templates/base/commitlint.config.js.template +1 -0
- package/templates/base/dependency-cruiser.cjs.template +373 -0
- package/templates/base/env.template +0 -0
- package/templates/base/eslint.config.js.template +38 -0
- package/templates/base/gitignore.template +2 -0
- package/templates/base/knip.json.template +11 -0
- package/templates/base/package-lock.json.template +4674 -0
- package/templates/base/package.json.template +48 -0
- package/templates/base/prettierignore.template +4 -0
- package/templates/base/prettierrc.template +1 -0
- package/templates/base/tsconfig.json.template +45 -0
- package/templates/integrations/strapi-astro/.github/workflows/deploy.yml.template +26 -0
- package/templates/integrations/strapi-astro/.github/workflows/pr-validation.yml.template +14 -0
- package/templates/integrations/strapi-astro/integration.config.json +57 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-smi-app",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "main.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"start": "npx tsx main.ts",
|
|
9
|
+
"prettier": "npx prettier --write .",
|
|
10
|
+
"lint": "npx eslint .",
|
|
11
|
+
"prepare": "husky",
|
|
12
|
+
"knip": "knip",
|
|
13
|
+
"depcruise": "depcruise . --exclude \"node_modules|dist|.husky|test\"",
|
|
14
|
+
"depcheck": "npm run knip && npm run depcruise",
|
|
15
|
+
"check": "npm run depcheck && npm run lint"
|
|
16
|
+
},
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@commitlint/cli": "^20.4.4",
|
|
22
|
+
"@commitlint/config-conventional": "^20.4.4",
|
|
23
|
+
"@eslint/js": "^10.0.1",
|
|
24
|
+
"@eslint/json": "^1.1.0",
|
|
25
|
+
"@types/node": "^25.5.0",
|
|
26
|
+
"dependency-cruiser": "^17.3.9",
|
|
27
|
+
"eslint": "^10.0.3",
|
|
28
|
+
"eslint-config-prettier": "^10.1.8",
|
|
29
|
+
"eslint-config-xo": "^0.50.0",
|
|
30
|
+
"globals": "^17.4.0",
|
|
31
|
+
"husky": "^9.1.7",
|
|
32
|
+
"knip": "^5.86.0",
|
|
33
|
+
"lint-staged": "^16.3.3",
|
|
34
|
+
"prettier": "3.8.1",
|
|
35
|
+
"tsx": "^4.21.0",
|
|
36
|
+
"typescript": "^5.9.3",
|
|
37
|
+
"typescript-eslint": "^8.57.0"
|
|
38
|
+
},
|
|
39
|
+
"lint-staged": {
|
|
40
|
+
"*.{js,jsx,ts,tsx,mjs,cjs,astro}": [
|
|
41
|
+
"eslint --fix",
|
|
42
|
+
"prettier --write"
|
|
43
|
+
],
|
|
44
|
+
"*.{json,md}": [
|
|
45
|
+
"prettier --write"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
// "rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "ESnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"target": "esnext",
|
|
13
|
+
"types": [],
|
|
14
|
+
// For nodejs:
|
|
15
|
+
// "lib": ["esnext"],
|
|
16
|
+
// "types": ["node"],
|
|
17
|
+
// and npm install -D @types/node
|
|
18
|
+
|
|
19
|
+
// Other Outputs
|
|
20
|
+
"sourceMap": true,
|
|
21
|
+
"declaration": true,
|
|
22
|
+
"declarationMap": true,
|
|
23
|
+
|
|
24
|
+
// Stricter Typechecking Options
|
|
25
|
+
"noUncheckedIndexedAccess": true,
|
|
26
|
+
"exactOptionalPropertyTypes": true,
|
|
27
|
+
|
|
28
|
+
// Style Options
|
|
29
|
+
// "noImplicitReturns": true,
|
|
30
|
+
// "noImplicitOverride": true,
|
|
31
|
+
// "noUnusedLocals": true,
|
|
32
|
+
// "noUnusedParameters": true,
|
|
33
|
+
// "noFallthroughCasesInSwitch": true,
|
|
34
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
35
|
+
|
|
36
|
+
// Recommended Options
|
|
37
|
+
"strict": true,
|
|
38
|
+
"jsx": "react-jsx",
|
|
39
|
+
"verbatimModuleSyntax": true,
|
|
40
|
+
"isolatedModules": true,
|
|
41
|
+
"noUncheckedSideEffectImports": true,
|
|
42
|
+
"moduleDetection": "force",
|
|
43
|
+
"skipLibCheck": true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# COPY THIS FILE TO: .github/workflows/deploy.yml in your project repository
|
|
3
|
+
# ==============================================================================
|
|
4
|
+
name: Deploy Production
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
call-central-deployer:
|
|
14
|
+
uses: smi-digital/cd-library/.github/workflows/deploy-strapi-astro.yml@main
|
|
15
|
+
with:
|
|
16
|
+
# Replace the following Variables with the actual ones
|
|
17
|
+
project_domain: __PROJECT_DOMAIN__
|
|
18
|
+
frontend_domain: __FRONTEND_DOMAIN__
|
|
19
|
+
backend_domain: __BACKEND_DOMAIN__
|
|
20
|
+
app_name: __APP_NAME__
|
|
21
|
+
include_www: __INCLUDE_WWW__
|
|
22
|
+
secrets:
|
|
23
|
+
# These secrets MUST be added to your repository settings!
|
|
24
|
+
# Go to Settings > Secrets and variables > Actions
|
|
25
|
+
ASTRO_FRONTEND_ENV: ${{ secrets.ASTRO_FRONTEND_ENV }}
|
|
26
|
+
STRAPI_BACKEND_ENV: ${{ secrets.STRAPI_BACKEND_ENV }}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: PR Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
run-ci:
|
|
9
|
+
uses: smi-digital/ci-library/.github/workflows/basic-strapi-astro-pipeline.yml@main
|
|
10
|
+
with:
|
|
11
|
+
# Define your directory paths here.
|
|
12
|
+
# If your folders are exactly 'frontend' and 'backend', you can omit these lines entirely.
|
|
13
|
+
frontend_dir: './frontend'
|
|
14
|
+
backend_dir: './backend'
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "strapi-astro",
|
|
3
|
+
"match": {
|
|
4
|
+
"projectType": "monorepo",
|
|
5
|
+
"frontendFramework": "astro",
|
|
6
|
+
"backendFramework": "strapi"
|
|
7
|
+
},
|
|
8
|
+
"cd": {
|
|
9
|
+
"question": "Should the CD deploy workflow be configured?",
|
|
10
|
+
"inputs": [
|
|
11
|
+
{
|
|
12
|
+
"key": "project_domain",
|
|
13
|
+
"message": "What is the project domain?",
|
|
14
|
+
"type": "input",
|
|
15
|
+
"default": "my-new-client.com",
|
|
16
|
+
"required": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"key": "frontend_domain",
|
|
20
|
+
"message": "What is the frontend domain?",
|
|
21
|
+
"type": "input",
|
|
22
|
+
"default": "my-new-client.com",
|
|
23
|
+
"required": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"key": "backend_domain",
|
|
27
|
+
"message": "What is the backend domain?",
|
|
28
|
+
"type": "input",
|
|
29
|
+
"default": "cms.my-new-client.com",
|
|
30
|
+
"required": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"key": "app_name",
|
|
34
|
+
"message": "What is the app name?",
|
|
35
|
+
"type": "input",
|
|
36
|
+
"default": "my-new-client",
|
|
37
|
+
"required": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"key": "include_www",
|
|
41
|
+
"message": "Include www domain?",
|
|
42
|
+
"type": "confirm",
|
|
43
|
+
"default": false
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"workflows": {
|
|
48
|
+
"prValidation": {
|
|
49
|
+
"template": ".github/workflows/pr-validation.yml.template",
|
|
50
|
+
"target": ".github/workflows/pr-validation.yml"
|
|
51
|
+
},
|
|
52
|
+
"deploy": {
|
|
53
|
+
"template": ".github/workflows/deploy.yml.template",
|
|
54
|
+
"target": ".github/workflows/deploy.yml"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|