Skip to content

Commit

Permalink
Improve / cleanup the templates (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 authored Sep 10, 2024
1 parent 0f309a9 commit 935213f
Show file tree
Hide file tree
Showing 64 changed files with 1,680 additions and 407 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-files-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-effect-app": patch
---

add additional cli options for controlling features and configs
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@
"check": "pnpm --recursive --parallel run check",
"lint": "eslint \"**/{src,test,examples,scripts}/**/*.{ts,mjs}\"",
"lint-fix": "pnpm lint --fix",
"changeset-version": "changeset version && node ./scripts/version.mjs && node ./scripts/examples.mjs",
"changeset-version": "changeset version && node ./scripts/version.mjs && node ./scripts/examples.mjs && node ./scripts/templates.mjs",
"changeset-publish": "pnpm build && TEST_DIST= pnpm vitest && changeset publish"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.7",
"@dprint/formatter": "^0.4.1",
"@effect/eslint-plugin": "^0.2.0",
"@effect/language-service": "^0.1.0",
"@effect/vitest": "^0.9.2",
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"@eslint/js": "^9.10.0",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"effect": "^3.7.2",
"eslint": "^9.9.1",
"eslint": "^9.10.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-codegen": "^0.28.0",
"eslint-plugin-deprecation": "^3.0.0",
Expand Down
121 changes: 121 additions & 0 deletions packages/create-effect-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Create Effect App

The `create-effect-app` command-line application is a tool which allows you to quickly bootstrap new Effect applications from either a template or from an official Effect example application.

## Getting Started

There are two main ways to use `create-effect-app`:

### Interactive

The easiest way to use `create-effect-app` is interactively via your preferred package manager:

*`npm`*

```sh
npx create-effect-app [project-name]
```

*`pnpm`*

```sh
pnpm create effect-app [project-name]
```

*`yarn`*

```sh
yarn create effect-app [project-name]
```

*`bun`*

```sh
bunx create-effect-app [project-name]
```

You will then be prompted to select the type of project you want to create and customize your project with additional options (see the full [usage](#usage) documentation below).

### Non-Interactive

You can also invoke the `create-effect-app` CLI non-interactively:

#### Usage

```sh
Create Effect App

USAGE

$ create-effect-app [(-t, --template basic | cli | monorepo) [--changesets] [--flake] [--prettier] [--eslint] [--workflows]] [<project-name>]

$ create-effect-app [(-e, --example http-server)] [<project-name>]

DESCRIPTION

Create an Effect application from an example or a template repository

ARGUMENTS

<project-name>

A directory that must not exist.

The folder to output the Effect application code into

This setting is optional.

OPTIONS

(-e, --example http-server)

One of the following: http-server

The name of an official Effect example to use to bootstrap the application

(-t, --template basic | cli | monorepo)

One of the following: basic, cli, monorepo

The name of an official Effect example to use to bootstrap the application

--changesets

A true or false value.

Initialize project with Changesets

This setting is optional.

--flake

A true or false value.

Initialize project with a Nix flake

This setting is optional.

--prettier

A true or false value.

Initialize project with Prettier

This setting is optional.

--eslint

A true or false value.

Initialize project with ESLint

This setting is optional.

--workflows

A true or false value.

Initialize project with Effect's recommended GitHub actions
This setting is optional.
```
14 changes: 8 additions & 6 deletions packages/create-effect-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"create-effect-app": "./dist/bin.cjs"
},
"engines": {
"node": ">=20.14.0"
"node": ">=18.0.0"
},
"repository": {
"type": "git",
Expand All @@ -28,13 +28,15 @@
"check": "tsc -b tsconfig.json"
},
"devDependencies": {
"@effect/cli": "^0.42.2",
"@effect/platform": "^0.63.2",
"@effect/platform-node": "^0.58.2",
"@effect/cli": "^0.43.2",
"@effect/platform": "^0.64.0",
"@effect/platform-node": "^0.59.0",
"@effect/printer": "^0.35.2",
"@effect/printer-ansi": "^0.35.2",
"effect": "^3.7.2",
"tar": "^7.4.3",
"tsup": "^8.2.4"
"tsup": "^8.2.4",
"yaml": "^2.5.1"
}
}
}

Loading

0 comments on commit 935213f

Please sign in to comment.