Skip to content

Commit 09cadf8

Browse files
committed
chore(create-compas): drop package
BREAKING CHANGE: Package unsupported.
1 parent a5b6309 commit 09cadf8

31 files changed

Lines changed: 77 additions & 1163 deletions

File tree

‎.gitignore‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ coverage
3636
/packages/*/test-generated/*
3737
/test/tmp
3838

39-
# Benchmark output on CI
40-
/benchmark_output.txt
41-
4239
# .env file for docs build
4340
/docs/.env
4441
/docs/.vitepress/cache

‎docs/.vitepress/config.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ function getHomeSidebar() {
199199
link: "/features/config-files.html",
200200
},
201201
{
202-
text: "Testing and benchmarking",
203-
link: "/features/test-and-bench-runner.html",
202+
text: "Testing",
203+
link: "/features/test-runner.html",
204204
},
205205
{
206206
text: "HTTP server",

‎docs/examples.md‎

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,13 @@
11
# Compas examples
22

3-
Examples of how to do various tasks with Compas. These examples can be used via with
4-
`create-compas` to quickly start a new project.
5-
6-
```shell
7-
# Via NPM
8-
npx create-compas@latest
9-
# Or with Yarn
10-
yarn create compas
11-
```
3+
Examples of how to do various tasks with Compas.
124

135
## Templates
146

15-
Any Compas provided template can be used via
16-
`npx create-compas@latest --template [template-name]`
17-
187
- **[default](https://github.com/compasjs/compas/tree/main/examples/default):** This is
198
the default template that is used. It contains boilerplate and conventions to create
209
your api's.
2110

2211
- **[with-auth](https://github.com/compasjs/compas/tree/main/examples/with-auth):** Based
2312
on the default teplate, adds a basic register and loginc system, using `@compas/store`
2413
powered sessions.
25-
26-
## Synopsis
27-
28-
```txt
29-
Usage: create-compas
30-
31-
Initialize Compas projects based on Compas examples or a custom repository.
32-
33-
Examples:
34-
- yarn create compas
35-
- npx create-compas@latest
36-
- npx create-compas@latest --template with-auth
37-
- npx create-compas@latest --template github:user/repo --output-directory ./my-project
38-
- npx create-compas@latest --template github:user/repo --template-path ./path/to/scaffold --template-ref v1.0
39-
40-
References:
41-
- Docs: https://compasjs.com
42-
- Provided templates: https://github.com/compasjs/compas/tree/main/examples
43-
44-
Supported templates:
45-
- Examples from the Compas repository, for example 'default'.
46-
- Your own templates via their Git repository. Currently, only 'github:user/repo' is supported.
47-
48-
Note that for templates from the Compas repository, the default value for '--template-ref'
49-
is based on the 'create-compas' version that you are using. To use the latest example version,
50-
specify '--template-ref main'.
51-
52-
Flags:
53-
--help Display information about the current command. (boolean)
54-
--template Specify Compas example or custom repository. (string)
55-
--template-path Use a subdirectory from the provided template repository. (string)
56-
--template-ref Use a specific branch, tag or commit. (string)
57-
--output-directory Use the provided directory instead of the current directory. (string)
58-
```

‎docs/features/cli.md‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ Let's create two files. Both exporting a constant and calling `mainFn`:
9393
9494
```js
9595
// src/a.js
96-
import { mainFn } from "@compas/stdlib";
96+
import { a } from "./a.js";
9797
import { b } from "./b.js";
98+
import { mainFn } from "@compas/stdlib";
99+
100+
// src/b.js
101+
import { mainFn } from "@compas/stdlib";
98102

99103
mainFn(import.meta, (logger) => logger.info({ message: "Hello from a.js", b }));
100104

101105
export const a = true;
102106

103-
// src/b.js
104-
import { mainFn } from "@compas/stdlib";
105-
import { a } from "./a.js";
106-
107107
mainFn(import.meta, (logger) => logger.info({ message: "Hello from b.js.", a }));
108108

109109
export const b = false;
@@ -136,14 +136,13 @@ called when you start your program with `node ./src/b.js`.
136136
137137
## Environment
138138
139-
The `mainFn` function from `@compas/stdlib`, and by extension `mainTestFn` and
140-
`mainBenchFn`, automatically loads the `.env.local` and `.env` files in the root of the
141-
project. The idea is that the `.env` contains default values for a quick development
142-
setup, so a new person on the team can just clone the project and run it directly. The
143-
`.env.local` values take precedence over values defined the `.env` file, and should be
144-
`.gitingore`'d. This is useful when your particular dev setup is somehow different, ie
145-
your not using the `compas docker` based Postgres instance, but need to connect to a
146-
different Postgres instance.
139+
The `mainFn` function from `@compas/stdlib`, and by extension `mainTestFn`, automatically
140+
loads the `.env.local` and `.env` files in the root of the project. The idea is that the
141+
`.env` contains default values for a quick development setup, so a new person on the team
142+
can just clone the project and run it directly. The `.env.local` values take precedence
143+
over values defined the `.env` file, and should be `.gitingore`'d. This is useful when
144+
your particular dev setup is somehow different, ie your not using the `compas docker`
145+
based Postgres instance, but need to connect to a different Postgres instance.
147146
148147
It is expected that production values for these environment variables are injected by the
149148
hosting method of choice.

‎docs/features/config-files.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
## Environment variables
44

5-
Compas lets you forget loading your `.env` files. All main entry points (`mainFn`,
6-
`mainTestFn` and `mainBenchFn`) will load both the `.env` and `.env.local` files
7-
automatically. The loader that is used is provided by the
8-
[dotenv](https://www.npmjs.com/package/dotenv) package.
5+
Compas lets you forget loading your `.env` files. All main entry points (`mainFn` and
6+
`mainTestFn`) will load both the `.env` and `.env.local` files automatically. The loader
7+
that is used is provided by the [dotenv](https://www.npmjs.com/package/dotenv) package.
98

109
Compas advises to check in a ready to go `.env.example` in your version control or
1110
preferably when using all Compas provided tooling, just a `.env` file without any actual

‎docs/features/getting-started.md‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,19 @@
33
Let's start by checking the system and project requirements;
44

55
- Running macOS or any Linux based OS
6-
- Node.js v16 or higher installed
6+
- Node.js v24 or higher installed
77
- Yarn or NPM installed
88
- Using ES Modules by adding `{ type: "module" }` in your package.json
99

10-
To initialize a new Compas project, execute one of the following command in a new
11-
directory
10+
To initialize a new Compas project add the following dependencies:
1211

1312
```shell
14-
# Via NPM
15-
npx create-compas@latest
16-
17-
# Or with Yarn
18-
yarn create compas
13+
npm install @compas/cli @compas/code-gen @compas/server @compas/stdlib @compas/store
1914
```
2015

2116
:::tip
2217

23-
Run `npx create-compas@latest --help` / `yarn create compas --help` for all the available
24-
options.
18+
Check out the [example projects](/examples).
2519

2620
:::
2721

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Testing and benchmarking
1+
# Testing
22

33
::: tip
44

@@ -96,7 +96,8 @@ const doesNotThrow = () => {};
9696
test("Function that throws", async (t) => {
9797
try {
9898
await throws();
99-
// If the function doesn't throw, no assertion is done, which results in a test failure by the runner.
99+
// If the function doesn't throw, no assertion is done, which results in a test failure by the
100+
// runner.
100101
} catch (e) {
101102
// A logger from @compas/stdlib is available
102103
t.log.error(e);
@@ -107,7 +108,8 @@ test("Function that throws", async (t) => {
107108
test("Function that does not throw", async (t) => {
108109
doesNotThrow();
109110
t.pass("The function did not throw!");
110-
// If the function does throw, the test runner catches the error and fails this test with the caught exception.
111+
// If the function does throw, the test runner catches the error and fails this test with the
112+
// caught exception.
111113
});
112114
```
113115

‎eslint.config.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,4 @@ export default defineConfig(
1212
{
1313
ignores: ["examples/**", "docs/**", "**/*.d.ts", "**/*.md/**/*.json5"],
1414
},
15-
{
16-
files: ["**/benchmark/**.js"],
17-
rules: {
18-
"no-console": "off",
19-
},
20-
},
2115
);

‎examples/crud-basic/README.md‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
# CRUD basics
22

33
This project is created using the
4-
[crud-basic](https://github.com/compasjs/compas/tree/main/examples/crud-basic)
5-
template via [create-compas](https://www.npmjs.com/package/create-compas).
6-
7-
```shell
8-
# Via NPM
9-
npx create-compas@latest --template crud-basic
10-
11-
# Or with Yarn
12-
yarn create compas --template crud-basic
13-
```
4+
[crud-basic](https://github.com/compasjs/compas/tree/main/examples/crud-basic) template.
145

156
## Getting started
167

‎examples/crud-inline/README.md‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
# CRUD basics
22

33
This project is created using the
4-
[crud-inline](https://github.com/compasjs/compas/tree/main/examples/crud-inline)
5-
template via [create-compas](https://www.npmjs.com/package/create-compas).
6-
7-
```shell
8-
# Via NPM
9-
npx create-compas@latest --template crud-inline
10-
11-
# Or with Yarn
12-
yarn create compas --template crud-inline
13-
```
4+
[crud-inline](https://github.com/compasjs/compas/tree/main/examples/crud-inline) template.
145

156
## Getting started
167

0 commit comments

Comments
 (0)