Skip to content

Commit

Permalink
updated docs and deno starter
Browse files Browse the repository at this point in the history
  • Loading branch information
aexol committed Jun 19, 2024
1 parent c266f54 commit 60f42a7
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 79 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
],
"typescript.tsdk": "node_modules/typescript/lib",
"deno.enablePaths": [
"./deno",
"./deno/adapters/deno-yoga",
"./deno/examples/beerpub-yoga",
],
}
4 changes: 2 additions & 2 deletions adapters/apollo-server/package-lock.json

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

4 changes: 2 additions & 2 deletions adapters/apollo-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/axolotl-apollo-server",
"version": "0.2.7",
"version": "0.2.8",
"private": false,
"main": "./lib/index.js",
"author": "Aexol, Artur Czemiel",
Expand All @@ -14,7 +14,7 @@
"lib"
],
"dependencies": {
"@aexol/axolotl-core": "^0.2.7",
"@aexol/axolotl-core": "^0.2.8",
"@apollo/server": "^4.9.4",
"graphql": "^16.8.1"
}
Expand Down
4 changes: 2 additions & 2 deletions adapters/graphql-yoga/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/axolotl-graphql-yoga",
"version": "0.2.7",
"version": "0.2.8",
"private": false,
"main": "./lib/index.js",
"author": "Aexol, Artur Czemiel",
Expand All @@ -14,7 +14,7 @@
"lib"
],
"dependencies": {
"@aexol/axolotl-core": "^0.2.7",
"@aexol/axolotl-core": "^0.2.8",
"graphql": "^16.8.1",
"graphql-yoga": "^4.0.5"
}
Expand Down
4 changes: 2 additions & 2 deletions adapters/stucco/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/axolotl-stucco",
"version": "0.2.7",
"version": "0.2.8",
"private": false,
"main": "./lib/index.js",
"author": "Aexol, Artur Czemiel",
Expand All @@ -14,7 +14,7 @@
"lib"
],
"dependencies": {
"@aexol/axolotl-core": "^0.2.7",
"@aexol/axolotl-core": "^0.2.8",
"stucco-js": "^0.10.19"
}
}
8 changes: 8 additions & 0 deletions docs/pages/from-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ We offer carefully crafted starter templates with all the necessary configuratio
| ------------- | ----------------- | ---------------------------------------------------------- |
| create-stucco | beerpub | [stucco.js](https://github.com/graphql-editor/stucco-js) |
| create-yoga | beerpub-yoga | [Yoga GraphQL](https://github.com/dotansimha/graphql-yoga) |
| create-deno-yoga | /deno/examples/beerpub-yoga | [Yoga GraphQL](https://github.com/dotansimha/graphql-yoga) [Deno][https://docs.deno.com] |

## 🛫 Installation

Expand All @@ -27,6 +28,13 @@ If you have already installed the CLI, you can use the `axolotl` command.
axolotl [prefix] [dir]
```

### 🦕 Deno
This is just a scaffold command but you can run it with deno to :D

```
deno run --allow-env --allow-write --allow-read npm:@aexol/axolotl [prefix] [dir]
```

## 🛬 After installation

After installation, you can easily navigate to your project directory and execute `npm run build`.
Expand Down
8 changes: 4 additions & 4 deletions examples/beerpub-apollo-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beerpub-apollo-server",
"version": "0.2.7",
"version": "0.2.8",
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
"type": "module",
Expand All @@ -17,15 +17,15 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"dependencies": {
"@aexol/axolotl-apollo-server": "^0.2.7",
"@aexol/axolotl-core": "^0.2.7",
"@aexol/axolotl-apollo-server": "^0.2.8",
"@aexol/axolotl-core": "^0.2.8",
"@apollo/server": "^4.9.4",
"graphql": "^16.8.1",
"node-fetch": "^3.2.10",
"ws": "^8.12.0"
},
"devDependencies": {
"@aexol/axolotl": "^0.2.7",
"@aexol/axolotl": "^0.2.8",
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/beerpub-yoga/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beerpub-yoga",
"version": "0.3.7",
"version": "0.3.8",
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
"type": "module",
Expand All @@ -20,15 +20,15 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"dependencies": {
"@aexol/axolotl-core": "^0.2.7",
"@aexol/axolotl-graphql-yoga": "^0.2.7",
"@aexol/axolotl-core": "^0.2.8",
"@aexol/axolotl-graphql-yoga": "^0.2.8",
"graphql": "^16.8.1",
"graphql-yoga": "^4.0.5",
"node-fetch": "^3.2.10",
"ws": "^8.12.0"
},
"devDependencies": {
"@aexol/axolotl": "^0.2.7",
"@aexol/axolotl": "^0.2.8",
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/beerpub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beerpub",
"version": "0.2.7",
"version": "0.2.8",
"private": true,
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
Expand All @@ -17,14 +17,14 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"dependencies": {
"@aexol/axolotl-core": "^0.2.7",
"@aexol/axolotl-stucco": "^0.2.7",
"@aexol/axolotl-core": "^0.2.8",
"@aexol/axolotl-stucco": "^0.2.8",
"node-fetch": "^3.2.10",
"stucco-js": "^0.10.19",
"ws": "^8.12.0"
},
"devDependencies": {
"@aexol/axolotl": "^0.2.7",
"@aexol/axolotl": "^0.2.8",
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
Expand Down
42 changes: 21 additions & 21 deletions package-lock.json

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

33 changes: 15 additions & 18 deletions packages/cli/create/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,32 @@ type T = {
example: string;
repo: `axolotl-starter-${key}`;
description: string;
isDeno?: boolean;
};
};

export type STARTERS = 'stucco' | 'yoga';
export type STARTERS = 'stucco' | 'yoga' | 'apollo' | 'deno-yoga';

/**
* ```
* example: 'beerpub',
* ```
* folder name placed at examples folder
* ```
* repo: 'axolotl-starter-stucco',
* ```
* repository name
* ```
* description: 'stucco.js starter',
* ```
* description of starter
* ```
*/
export const STARTER_DICT: T = {
stucco: {
example: 'beerpub',
example: 'examples/beerpub',
repo: 'axolotl-starter-stucco',
description: 'stucco.js starter',
},
yoga: {
example: 'beerpub-yoga',
example: 'examples/beerpub-yoga',
repo: 'axolotl-starter-yoga',
description: 'GraphQL Yoga starter',
},
'deno-yoga': {
example: 'deno/examples/beerpub-yoga',
repo: 'axolotl-starter-deno-yoga',
description: 'GraphQL Yoga starter',
isDeno: true,
},
apollo: {
example: 'examples/beerpub-apollo-server',
repo: 'axolotl-starter-apollo',
description: 'GraphQL Apollo server starter',
},
};
4 changes: 2 additions & 2 deletions packages/cli/create/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export const createApp = (program: Command) => {
.command('create-dockerfile')
.description(`${chalk.magenta('Axolotl Starter')} - docker files creator`)
.action(createDockerFile);
Object.entries(STARTER_DICT).forEach(([key, { description: _description, repo, example }]) => {
Object.entries(STARTER_DICT).forEach(([key, { description: _description, repo, example, isDeno }]) => {
const starter = key as STARTERS;
const command = `create-${starter} [dir]`;
const description = `${chalk.magenta('Axolotl Starter')} - ${_description}`;
program
.command(command)
.description(description)
.action((destination) => createAppAction({ starter, repo, example, destination }))
.action((destination) => createAppAction({ starter, repo, example, destination, isDeno }))
.on('--help', () => {
console.log('');
console.log(
Expand Down
Loading

0 comments on commit 60f42a7

Please sign in to comment.