Skip to content

Commit

Permalink
Merge pull request #157 from WildCodeSchool/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
rocambille authored Jul 23, 2024
2 parents 32839c9 + 9d7fe84 commit 51f66b0
Show file tree
Hide file tree
Showing 63 changed files with 3,464 additions and 10,574 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

[Open an issue](https://github.com/WildCodeSchool/create-harmonia/issues) if you have any request/feedback :)
[Open an issue](https://github.com/WildCodeSchool/create-js-monorepo/issues) if you have any request/feedback :)

## [7.0.0] - 2024-07-20

### Changed

- **Breaking change:** Renamed package from `create-harmonia` to `@wildcodeschool/create-js-monorepo`.

- **Breaking change:** Migrated from ESLint and Prettier to [Biome](https://biomejs.dev/).

- **Breaking change:** Migrated client and server to TypeScript.

- **Breaking change:** Refactored server from MVC to module-based architecture.

## [5.0.9] - 2024-05-06

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

- **Do not open up a GitHub issue if the bug is a security vulnerability**, and instead send an email to [email protected].

- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/wildcodeschool/create-harmonia/issues).
- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/wildcodeschool/create-js-monorepo/issues).

- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/wildcodeschool/create-harmonia/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/wildcodeschool/create-js-monorepo/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

#### **Did you write a patch that fixes a bug?**

Expand All @@ -20,9 +20,9 @@ Changes that are cosmetic in nature and do not add anything substantial to the s

#### **Do you intend to add a new feature or change an existing one?**

- **Ensure the change was not already proposed** by searching on GitHub under [Issues](https://github.com/wildcodeschool/create-harmonia/issues).
- **Ensure the change was not already proposed** by searching on GitHub under [Issues](https://github.com/wildcodeschool/create-js-monorepo/issues).

- If you're unable to find an appropriate open issue, [open a new one](https://github.com/wildcodeschool/create-harmonia/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
- If you're unable to find an appropriate open issue, [open a new one](https://github.com/wildcodeschool/create-js-monorepo/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

- Do not start writing code until you have collected positive feedback on the issue 🙂

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Harmonia
# JS Monorepo

Harmonia is a framework meant to serve as a foundation for every project following the React-Express-MySQL stack, as learned in Wild Code School.
This JS monorepo is a framework meant to serve as a foundation for every project following the React-Express-MySQL stack, as learned in Wild Code School.
It's pre-configured with a set of tools which'll help students produce industry-quality and easier-to-maintain code, while staying a pedagogical tool.

## Setup & Use

Basic usage:

```bash
npm create harmonia@latest my-project
npm create @wildcodeschool/js-monorepo@latest my-project
```

You may prefix your project name with the name of your organization:

```bash
npm create harmonia@latest my-org/my-project
npm create @wildcodeschool/js-monorepo@latest my-org/my-project
```
25 changes: 18 additions & 7 deletions bin/create-harmonia.js → bin/create-js-monorepo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ const { version } = JSON.parse(
);

console.log(`
${grey(`create-harmonia version ${version}`)}
${grey(`create-js-monorepo version ${version}`)}
`);

if (process.argv[2] == null) {
throw new Error(
"Please provide a project name, e.g. npm create harmonia@latest my-project"
"Please provide a project name, e.g. npm create @wildcodeschool/js-monorepo@latest my-project"
);
}

Expand All @@ -41,7 +41,7 @@ if (org == null) {
}
}

p.intro("Welcome to Harmonia!");
p.intro("Welcome to your JS Monorepo!");

if (name === ".") {
const dir = await p.text({
Expand Down Expand Up @@ -138,7 +138,12 @@ const sGit = p.spinner();
sGit.start("Starting git");

execSync(
`cd ${destDir} && git init && git add -A && git commit -m "Initial commit" -n`
`cd ${destDir} \
&& git init \
&& git add -A \
&& git commit -m "Initial commit" -n \
&& git switch -c staging \
&& git switch -c dev`
);

sGit.stop("Started git");
Expand All @@ -154,20 +159,26 @@ if (relative !== "") {
console.log(` ${i++}: ${bold(cyan(`cd ${relative}`))}`);
}

console.log(` ${i++}: ${bold(cyan(`git remote add origin ...`))}`);
console.log(` ${i++}: ${bold(cyan(`git push --all -u`))}`);
console.log(` ${i++}: ${bold(cyan(`npm install`))}`);
console.log(
` ${i++}: ${bold(
cyan(`cp client/.env.sample client/.env && nano client/.env`)
cyan(
`copy 'client/.env.sample' as 'client/.env' and check the contents of 'client/.env'`
)
)}`
);
console.log(
` ${i++}: ${bold(
cyan(`cp server/.env.sample server/.env && nano server/.env`)
cyan(
`copy 'server/.env.sample' as 'server/.env' and check the contents of 'server/.env'`
)
)}`
);
console.log(` ${i++}: ${bold(cyan(`npm run dev`))}`);

console.log(`\nUse ${bold(cyan("Ctrl-C"))} to halt the server.`);
console.log(
`\nStuck? Visit us at ${cyan("https://documentation-harmonia.vercel.app/")}`
`\nStuck? Visit us at ${cyan("https://wildcodeschool-js-monorepo.vercel.app/")}`
);
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"name": "create-harmonia",
"version": "5.0.10",
"name": "@wildcodeschool/create-js-monorepo",
"version": "7.0.0",
"type": "module",
"description": "Our pedagogical framework for the React-Express-MySQL cursus in Wild Code School",
"homepage": "https://github.com/wildcodeschool/create-harmonia#readme",
"homepage": "https://github.com/wildcodeschool/create-js-monorepo#readme",
"bugs": {
"url": "https://github.com/wildcodeschool/create-harmonia/issues"
"url": "https://github.com/wildcodeschool/create-js-monorepo/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/wildcodeschool/create-harmonia.git"
},
"bin": {
"create-harmonia": "./bin/create-harmonia.js"
"url": "git+https://github.com/wildcodeschool/create-js-monorepo.git"
},
"bin": "./bin/create-js-monorepo.js",
"keywords": [
"react",
"express",
"mysql",
"framework"
],
"author": "Wild Code School",
Expand Down
29 changes: 29 additions & 0 deletions template/.github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: check

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- dev

jobs:
lint:
name: Run checks
runs-on: ubuntu-latest

permissions:
checks: write
contents: write

steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Biome
uses: biomejs/setup-biome@v2

- name: Run checks
run: biome ci --error-on-warnings --changed --since="origin/${GITHUB_BASE_REF}" .
4 changes: 2 additions & 2 deletions template/.github/workflows/deploy-traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CD-traefik
on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging
types: [closed]

jobs:
Expand Down
41 changes: 0 additions & 41 deletions template/.github/workflows/lint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion template/.husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ fi
echo '----- Done!'

npx validate-branch-name
npm run lint
npm run check
Loading

0 comments on commit 51f66b0

Please sign in to comment.