Skip to content

Commit e303c09

Browse files
authored
Merge pull request #166 from akd-io/release/0.2.1
v0.2.1
2 parents a120307 + f8cceec commit e303c09

31 files changed

+224
-154
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
build:
9-
name: "Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}"
9+
name: "${{ matrix.os }}"
1010

1111
strategy:
1212
matrix:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
4. Add new flags to the CLI in [`src/main/index.ts`](src/main/index.ts)
1212
5. Add the plugin to the `plugins` array in [`src/main/setup/setup.ts`](src/main/setup/setup.ts).
1313
6. Add potential plugin steps to the `steps` array in [`src/main/setup/setup.ts`](src/main/setup/setup.ts). Steps are run top-to-bottom.
14-
7. Update the `README.md`:
14+
7. Update the [`README.md`](README.md):
1515
- Add the technology to the technology list
16-
- Update the `Usage` section to include the new technology
16+
- Update the `Usage` section by copy pasting the output of running `yarn print:help`
1717
8. Consider expanding some of the e2e tests to include the new technology.
1818
9. Run tests using `yarn test` to ensure they all pass
1919
10. Submit a Pull Request on GitHub

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Anders Kjær Damgaard
3+
Copyright (c) Anders Kjær Damgaard
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<img alt="" src="https://img.shields.io/npm/v/create-next-stack?style=flat-square">
66
</a>
77
<a aria-label="Build status" href="https://github.com/akd-io/create-next-stack/actions/workflows/main.yml?query=branch%3Adevelop">
8-
<img alt="" src="https://img.shields.io/github/workflow/status/akd-io/create-next-stack/CI/develop?style=flat-square">
8+
<img alt="" src="https://img.shields.io/github/actions/workflow/status/akd-io/create-next-stack/main.yml?branch=develop&style=flat-square">
99
</a>
1010
<a aria-label="Last commit" href="https://github.com/akd-io/create-next-stack/commits/develop">
1111
<img alt="" src="https://img.shields.io/github/last-commit/akd-io/create-next-stack/develop?style=flat-square">
@@ -33,13 +33,7 @@ Where [Create Next App](https://github.com/vercel/next.js/tree/canary/packages/c
3333

3434
This repository covers the CLI tool, while [create-next-stack-website](https://github.com/akd-io/create-next-stack-website) covers the site.
3535

36-
To get started, go to [create-next-stack.com](https://www.create-next-stack.com) or run:
37-
38-
```bash
39-
npx create-next-stack
40-
```
41-
42-
If using the CLI, you'll be prompted to pick a project name, and your preferred technologies like so:
36+
To get started, go to [create-next-stack.com](https://www.create-next-stack.com). Here you'll be able to choose the technologies you want to use and get the corresponding CLI command.
4337

4438
<p align="center">
4539
<img width="600" alt="Screenshot of Create Next Stack running in a terminal" src="assets/screenshot.png">
@@ -74,6 +68,7 @@ The table below provides an overview of the technologies currently supported by
7468
| [Husky](https://typicode.github.io/husky/) | [Docs](https://typicode.github.io/husky/) - [GitHub repo](https://github.com/typicode/husky) |
7569
| [lint-staged](https://github.com/okonet/lint-staged) | [GitHub repo](https://github.com/okonet/lint-staged) |
7670
| [GitHub Actions](https://github.com/features/actions) | [Docs](https://docs.github.com/en/actions) - [Workflow syntax](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions) |
71+
| [React Icons](https://react-icons.github.io/react-icons/) | [GitHub repo](https://github.com/react-icons/react-icons) |
7772

7873
## Usage
7974

@@ -99,6 +94,7 @@ OPTIONS
9994
--package-manager=(pnpm|yarn|npm) Sets the preferred package manager. (Required)
10095
--prettier Adds Prettier. (Code formatting)
10196
--react-hook-form Adds React Hook Form. (Form library)
97+
--react-icons Adds React Icons. (Icon library)
10298
--styling=<styling-method> Sets the preferred styling method. (Required) <styling-method> = emotion|styled-components|tailwind-css|css-modules|css-modules-with-sass
10399
```
104100

assets/screenshot.png

75.8 KB
Loading

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "create-next-stack",
33
"description": "Create Next Stack is a website and CLI tool used to easily set up the boilerplate of new Next.js apps.",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"author": "Anders Kjær Damgaard @akd-io",
66
"bugs": "https://github.com/akd-io/create-next-stack/issues",
77
"homepage": "https://github.com/akd-io/create-next-stack",
@@ -51,6 +51,8 @@
5151
"test:small": "yarn build && node lib/tests/e2e/manual-test.js --debug --package-manager=pnpm --styling=css-modules",
5252
"test:large": "yarn build && node lib/tests/e2e/manual-test.js --debug --package-manager=pnpm --styling=emotion --react-hook-form --formik --prettier --formatting-pre-commit-hook --chakra --framer-motion --github-actions",
5353
"test:cna": "yarn build && node lib/tests/e2e/test-cna.js",
54+
"print:help": "yarn build && ./bin-test/run-prod --help",
55+
"print:version": "yarn build && ./bin-test/run-prod --help",
5456
"version": "oclif-dev readme && git add README.md",
5557
"format": "prettier --write --ignore-path=.prettierignore .",
5658
"format:check": "prettier --check --ignore-path=.prettierignore .",

prod-assets/templates/LandingPage/LandingPageTemplate.tsx

Lines changed: 0 additions & 121 deletions
This file was deleted.

src/main/create-next-stack-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type CreateNextStackArgs = UnknownObject // Change to ParserOutput["args"
2626
export type CreateNextStackFlags = Partial<CreateNextStackParserOutput["flags"]> // Change to CreateNextStackParserOutput["flags"] if it becomes strongly typed in the future. (Currently not a Partial.)
2727

2828
// Package manager flag:
29-
export const packageManagerOptions = ["yarn", "npm", "pnpm"] as const
29+
export const packageManagerOptions = ["pnpm", "yarn", "npm"] as const
3030
export type PackageManager = typeof packageManagerOptions[number]
3131
export const writablePackageManagerOptions = packageManagerOptions as Writable<
3232
typeof packageManagerOptions

src/main/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ class CreateNextStack extends Command {
9292
"formatting-pre-commit-hook": flags.boolean({
9393
description: "Adds a formatting pre-commit hook. (Requires Prettier)",
9494
}),
95+
96+
// Icons
97+
"react-icons": flags.boolean({
98+
description: "Adds React Icons. (Icon library)",
99+
}),
95100
}
96101

97102
async run(): Promise<void> {

src/main/plugins/chakra-ui/chakra-ui.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,13 @@ export const chakraUIPlugin = createPlugin({
4040
slots: {
4141
app: {
4242
imports: endent`
43-
import { ChakraProvider, ColorModeProvider } from "@chakra-ui/react";
43+
import { ChakraProvider } from "@chakra-ui/react";
4444
import { chakraTheme } from "../chakra-theme";
4545
`,
4646
componentsStart: endent`
47-
<ChakraProvider resetCSS theme={chakraTheme}>
48-
<ColorModeProvider
49-
options={{
50-
initialColorMode: chakraTheme.config.initialColorMode,
51-
useSystemColorMode: chakraTheme.config.useSystemColorMode,
52-
}}
53-
>
47+
<ChakraProvider theme={chakraTheme}>
5448
`,
5549
componentsEnd: endent`
56-
</ColorModeProvider>
5750
</ChakraProvider>
5851
`,
5952
},

0 commit comments

Comments
 (0)