Skip to content

Commit

Permalink
Starting fresh with strapi 5 and beginning to pull in old code
Browse files Browse the repository at this point in the history
  • Loading branch information
corasaurus-hex committed Aug 15, 2024
1 parent eea96b6 commit 055dc17
Show file tree
Hide file tree
Showing 115 changed files with 10,269 additions and 11,178 deletions.
7 changes: 6 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://distributeaid.org/donate', 'https://www.paypal.com/donate/?hosted_button_id=VCREWCLA6WTB4']
custom:
[
"https://distributeaid.org/donate",
"https://www.paypal.com/donate/?hosted_button_id=VCREWCLA6WTB4",
"https://www.omprakash.org/global/distribute-aid/donate",
]
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## What changed?

<!-- include a link to a GitHub issue, if applicable -->

## How can you test this?
29 changes: 29 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Checks
on:
- pull_request
jobs:
build:
runs-on: ubuntu-latest
env:
DATABASE_FILENAME: .tmp/test_data.db
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: yarn
cache-dependency-path: yarn.lock
- name: Install modules
run: corepack yarn
- name: "Configure"
run: cp .env.example .env
- name: Run type check
run: corepack yarn run check:types
- name: Run lint check
run: corepack yarn run check:lint
- name: Run format check
run: corepack yarn run check:format
- name: Run build check
run: corepack yarn run check:build
- name: Run test check
run: corepack yarn run check:test
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Ignore the generated documentation since it updates a timestamp on each build.
# Manually override the git ignore using `git add -f` in order to update the docs.
src/extensions/documentation/documentation/1.0.0/full_documentation.json

src/extensions/documentation/public/index.html

############################
# OS X
Expand Down Expand Up @@ -91,7 +91,8 @@ ssl
nbproject
public/uploads/*
!public/uploads/.gitkeep
.vscode
.tsbuildinfo
.eslintcache

############################
# Node.js
Expand All @@ -105,6 +106,20 @@ results
node_modules
.node_history

############################
# Package managers
############################

.yarn/*
!.yarn/cache
!.yarn/unplugged
!.yarn/patches
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
yarn-error.log

############################
# Tests
############################
Expand All @@ -118,10 +133,11 @@ coverage
.env
license.txt
exports
*.cache
.strapi
dist
build
.strapi-updater.json
.strapi-cloud.json

############################
# Yarn
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.16.0
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Ignore artifacts:
build
coverage
dist
.strapi
.yarn
.tmp
*.example.ts
*.example.js
types/generated/*
src/api/*/documentation
src/extensions/documentation

1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 0 additions & 4 deletions .strapi/client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
* Any modifications made will be discarded.
*/
import documentation from "@strapi/plugin-documentation/strapi-admin";
import i18N from "@strapi/plugin-i18n/strapi-admin";
import usersPermissions from "@strapi/plugin-users-permissions/strapi-admin";
import multiSelect from "strapi-plugin-multi-select/strapi-admin";
import { renderAdmin } from "@strapi/strapi/admin";

renderAdmin(document.getElementById("strapi"), {
plugins: {
documentation: documentation,
i18n: i18N,
"users-permissions": usersPermissions,
"multi-select": multiSelect,
},
});
3 changes: 2 additions & 1 deletion .strapi/client/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<!--
This file was automatically generated by Strapi.
Expand Down Expand Up @@ -58,5 +58,6 @@ <h1>JavaScript disabled</h1>
</div>
</div></noscript
>
<script type="module" src="/.strapi/client/app.js"></script>
</body>
</html>
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.1.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.1.cjs
yarnPath: .yarn/releases/yarn-4.4.0.cjs
78 changes: 49 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,39 @@
# 🚀 Getting started with Strapi
# 🚀 Aggregated Public Information

Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds.
This project uses [Strapi](https://strapi.io) as a CMS backend.

### `develop`
## Development

Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop)
1. Run this to install your packages:

```
npm run develop
# or
yarn develop
```sh
yarn
```

### `start`

Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start)
2. In one terminal, run `develop`:

```
npm run start
# or
yarn start
```sh
yarn run develop
```

### `build`
This will launch the development server. `yarn test` depends on you running this!

Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build)
3. In another terminal, run tests:

```sh
yarn test
```
npm run build
# or
yarn build
```

## ⚙️ Deployment

Strapi gives you many possible deployment options for your project including [Strapi Cloud](https://cloud.strapi.io). Browse the [deployment section of the documentation](https://docs.strapi.io/dev-docs/deployment) to find the best solution for your use case.
> [!NOTE]
> If you don't run `yarn run develop` then you must run `yarn build` before running `yarn test`. We have provided `yarn test:with-build` as a convenience in this case.
# 🚀 Getting started with Gitpod

Gitpod provides a fully automated development environment for your Strapi project, and the development environment is set up with just a single click. Follow these steps to get started:

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/distributeaid/aggregated-public-information)

1. Click the ``Open in Gitpod`` button above. Note: you'll need to have an account on [Gitpod](https://gitpod.io/login/) before proceeding with the next steps (this requires a GitHub account)..
1. Click the `Open in Gitpod` button above. Note: you'll need to have an account on [Gitpod](https://gitpod.io/login/) before proceeding with the next steps (this requires a GitHub account)..
2. Click the `Continue` button.
3. Relax, a development environment is being set up for you in the first terminal. There's currently a bug that will stop the setup from being completed, but we'll fix that in the next steps.
4. Create a new file called `.env` to store the environment variables.
Expand All @@ -54,7 +46,39 @@ Gitpod provides a fully automated development environment for your Strapi projec
11. Run `yarn develop`. This starts the development server at [http://localhost:1337/admin](http://localhost:1337/admin).
12. To access your workspace later, go to [Gitpod Workspaces](https://gitpod.io/workspaces). Pin the `aggregated-public-information` workspace to prevent auto-deletion after 14 days by clicking the three dots next to the workspace name and selecting "Pin".

## Strapi Guide

Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds.

### `develop`

Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop)

```
npm run develop
# or
yarn develop
```

### `start`

Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start)

```
npm run start
# or
yarn start
```

### `build`

Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build)

```
npm run build
# or
yarn build
```

## 📚 Learn more

Expand All @@ -71,7 +95,3 @@ Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/
- [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>
17 changes: 11 additions & 6 deletions config/admin.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
export default ({ env }) => ({
auth: {
secret: env('ADMIN_JWT_SECRET'),
secret: env("ADMIN_JWT_SECRET"),
},
autoOpen: !env.bool("NO_OPEN_BROWSER", false),
apiToken: {
salt: env('API_TOKEN_SALT'),
salt: env("API_TOKEN_SALT"),
},
transfer: {
token: {
salt: env('TRANSFER_TOKEN_SALT'),
salt: env("TRANSFER_TOKEN_SALT"),
},
},
flags: {
nps: env.bool("FLAG_NPS", true),
promoteEE: env.bool("FLAG_PROMOTE_EE", true),
},
watchIgnoreFiles: [
/* NOTE: this isn't a very specific path, but various combinations of
* "./src/scripts/**" didn't work. Might need to make it more specific
* if there's a reason to ever include script files in our Strapi server
* build. Or better yet just refactor that functioality out of the
* "src/scripts" folder and import it.
*/
'**/scripts/**'
]
*/
"**/scripts/**",
],
});
Loading

0 comments on commit 055dc17

Please sign in to comment.