Skip to content

Commit a120307

Browse files
authored
Merge pull request #158 from akd-io/release/0.2.0
Release 0.2.0
2 parents d8b71bd + ceb11f3 commit a120307

File tree

163 files changed

+3013
-2586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3013
-2586
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
node: ["14", "16"]
13+
node: ["18"]
1414
os: [ubuntu-latest, windows-latest, macOS-latest]
1515

1616
runs-on: ${{ matrix.os }}

.husky/pre-commit

100644100755
File mode changed.

.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"semi": false,
3-
"endOfLine": "lf"
2+
"semi": false
43
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"files.exclude": {}
3+
}

.vscode/snipsnap.code-snippets

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Contributing
2+
3+
## Adding support for a new technology
4+
5+
1. Fork the repository on GitHub
6+
2. Create a named feature branch (like `support_x`)
7+
3. Add a new .ts file for your plugin in `src/main/plugins`.
8+
9+
- See the [Writing a plugin section](#writing-a-plugin) below to learn how to write a Create Next Stack plugin.
10+
11+
4. Add new flags to the CLI in [`src/main/index.ts`](src/main/index.ts)
12+
5. Add the plugin to the `plugins` array in [`src/main/setup/setup.ts`](src/main/setup/setup.ts).
13+
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`:
15+
- Add the technology to the technology list
16+
- Update the `Usage` section to include the new technology
17+
8. Consider expanding some of the e2e tests to include the new technology.
18+
9. Run tests using `yarn test` to ensure they all pass
19+
10. Submit a Pull Request on GitHub
20+
21+
## Writing a plugin
22+
23+
Plugins aren't too scary. The simple Framer Motion plugin that simply adds the `framer-motion` dependency looks like this:
24+
25+
```typescript
26+
export const framerMotionPlugin = createPlugin({
27+
name: "Framer Motion",
28+
description: "Adds support for Framer Motion",
29+
active: ({ flags }) => Boolean(flags["framer-motion"]),
30+
dependencies: {
31+
"framer-motion": {
32+
name: "framer-motion",
33+
version: "^9.0.0",
34+
},
35+
},
36+
technologies: [
37+
{
38+
name: "Framer Motion",
39+
description:
40+
"Framer Motion is a popular React animation library. It allows users to create both simple animations and complex gesture-based interactions. The library implements a declarative API, otherwise known as spring animations, which lets the developer define the animation's end state, letting the library handle the rest.",
41+
links: [
42+
{ title: "Website", url: "https://www.framer.com/motion/" },
43+
{ title: "Docs", url: "https://www.framer.com/docs/" },
44+
{ title: "GitHub", url: "https://github.com/framer/motion" },
45+
],
46+
},
47+
],
48+
} as const)
49+
```
50+
51+
and the [Emotion plugin](src/main/plugins/emotion.ts) easily sets Next.js compiler options using
52+
53+
```typescript
54+
compilerOptions: {
55+
emotion: true,
56+
}
57+
```
58+
59+
and the [Prettier plugin](src/main/plugins/prettier.ts) easily adds formatting scripts to the `package.json` file using
60+
61+
```typescript
62+
scripts: [
63+
{
64+
name: "format",
65+
description: "Formats all source code in the project.",
66+
command: "prettier --write --ignore-path=.gitignore .",
67+
},
68+
{
69+
name: "format:check",
70+
description: "Checks the formatting of all code in the project.",
71+
command: "prettier --check --ignore-path=.gitignore .",
72+
},
73+
],
74+
```
75+
76+
Take a look at the `Plugin` type for documentation on each available property in [`src/main/plugin.ts`](src/main/plugin.ts).
77+
78+
Also take a look at the [other plugins](src/main/plugins) for more advanced examples.

README.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img width="100%" src="assets/banner.png" alt="Create Next Stack - The ultimate starter kit for Next.js">
1+
<img width="100%" src="assets/banner.png" alt="A screenshot of the Create Next Stack website">
22

33
<p align="center">
44
<a aria-label="NPM version" href="https://www.npmjs.com/package/create-next-stack">
@@ -13,12 +13,21 @@
1313
<a aria-label="License" href="https://github.com/akd-io/create-next-stack/blob/develop/LICENSE">
1414
<img alt="" src="https://img.shields.io/npm/l/create-next-stack?color=44cc11&style=flat-square">
1515
</a>
16+
<a aria-label="Create Next Stack Website GitHub Repository" href="https://github.com/akd-io/create-next-stack-website">
17+
<img alt="" src="https://img.shields.io/badge/Website-gray?style=flat-square&logo=github">
18+
</a>
1619
<a aria-label="GitHub Repo stars" href="https://github.com/akd-io/create-next-stack">
1720
<img alt="" src="https://img.shields.io/github/stars/akd-io/create-next-stack?style=social">
1821
</a>
22+
<a aria-label="Community Discord" href="https://discord.gg/7Ns5WwGjjZ">
23+
<img alt="" src="https://img.shields.io/badge/Discord-gray?style=flat-square&logo=discord">
24+
</a>
25+
<a aria-label="Twitter profile of the creator of Create Next Stack" href="https://twitter.com/akd_io">
26+
<img alt="" src="https://img.shields.io/badge/Twitter-gray?style=flat-square&logo=twitter">
27+
</a>
1928
</p>
2029

21-
Create Next Stack is a website and CLI tool used to easily set up the boilerplate of new [Next.js](https://github.com/vercel/next.js) apps.
30+
[Create Next Stack](https://www.create-next-stack.com/) is a website and CLI tool used to easily set up the boilerplate of new [Next.js](https://github.com/vercel/next.js) apps.
2231

2332
Where [Create Next App](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) lets you choose a single template only, Create Next Stack lets you pick and choose an array of technologies often used alongside Next.js, and free you of the pain of making them work together.
2433

@@ -44,10 +53,11 @@ The table below provides an overview of the technologies currently supported by
4453

4554
| Name | Links |
4655
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47-
| [Next.js](https://nextjs.org/)| [Docs](https://nextjs.org/docs) - [Learn Next.js](https://nextjs.org/learn) - [GitHub repo](https://github.com/vercel/next.js) |
48-
| [React](https://reactjs.org/)| [Docs](https://reactjs.org/docs/getting-started.html) - [GitHub repo](https://github.com/facebook/react) |
49-
| [TypeScript](https://www.typescriptlang.org/)| [Docs](https://www.typescriptlang.org/docs/) - [GitHub repo](https://github.com/microsoft/TypeScript) |
50-
| [ESLint](https://eslint.org/)| [Configuration](https://eslint.org/docs/user-guide/configuring/) - [Rules](https://eslint.org/docs/rules/) - [GitHub Repo](https://github.com/eslint/eslint) |
56+
| [Next.js](https://nextjs.org/) (Mandatory) | [Docs](https://nextjs.org/docs) - [Learn Next.js](https://nextjs.org/learn) - [GitHub repo](https://github.com/vercel/next.js) |
57+
| [React](https://reactjs.org/) (Mandatory) | [Docs](https://reactjs.org/docs/getting-started.html) - [GitHub repo](https://github.com/facebook/react) |
58+
| [TypeScript](https://www.typescriptlang.org/) (Mandatory) | [Docs](https://www.typescriptlang.org/docs/) - [GitHub repo](https://github.com/microsoft/TypeScript) |
59+
| [ESLint](https://eslint.org/) (Mandatory) | [Configuration](https://eslint.org/docs/user-guide/configuring/) - [Rules](https://eslint.org/docs/rules/) - [GitHub Repo](https://github.com/eslint/eslint) |
60+
| [pnpm](https://pnpm.io/) | [Docs](https://pnpm.io/motivation) - [GitHub repo](https://github.com/pnpm/pnpm) |
5161
| [Yarn](https://yarnpkg.com/) | [CLI Docs](https://yarnpkg.com/cli) - [GitHub repo](https://github.com/yarnpkg/berry) |
5262
| [npm](https://www.npmjs.com/) | [CLI Docs](https://docs.npmjs.com/cli/) |
5363
| [Emotion](https://emotion.sh/docs/introduction) | [Docs](https://emotion.sh/docs/introduction) - [GitHub repo](https://github.com/emotion-js/emotion) |
@@ -65,14 +75,6 @@ The table below provides an overview of the technologies currently supported by
6575
| [lint-staged](https://github.com/okonet/lint-staged) | [GitHub repo](https://github.com/okonet/lint-staged) |
6676
| [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) |
6777

68-
#### ⚠ Required
69-
70-
Technologies marked with ⚠ are required. If you don't want to use these technologies, you have three options:
71-
72-
1. Set up your project using Create Next Stack anyway, and make the necessary adjustments manually.
73-
1. Set up your project manually with Create Next App.
74-
1. Find and use a template repo you can clone here on GitHub.
75-
7678
## Usage
7779

7880
Below you see an overview of Create Next Stack's usage, including detailed information about arguments and options. The overview is the result of running `create-next-stack --help`
@@ -85,21 +87,25 @@ ARGUMENTS
8587
APPNAME The name of your app, optionally including a path prefix. Eg.: "my-app" or "path/to/my-app"
8688
8789
OPTIONS
88-
-h, --help Shows the CLI help information.
89-
-v, --version Shows the CLI version information.
90-
--chakra Adds Chakra UI. (Component library) (Requires Emotion and Framer Motion)
91-
--debug Show verbose error messages for debugging purposes.
92-
--formatting-pre-commit-hook Adds a formatting pre-commit hook. (Requires Prettier)
93-
--formik Adds Formik. (Form library)
94-
--framer-motion Adds Framer Motion. (Animation library)
95-
--github-actions Adds a GitHub Actions continuous integration workflow.
96-
--material-ui Adds Material UI. (Component library)
97-
--package-manager=(yarn|npm) Sets the preferred package manager. (Required)
98-
--prettier Adds Prettier. (Code formatting)
99-
--react-hook-form Adds React Hook Form. (Form library)
100-
--styling=<styling-method> Sets the preferred styling method. (Required) <styling-method> = emotion|styled-components|tailwind-css|css-modules|css-modules-with-sass
90+
-h, --help Shows the CLI help information.
91+
-v, --version Shows the CLI version information.
92+
--chakra Adds Chakra UI. (Component library) (Requires Emotion and Framer Motion)
93+
--debug Show verbose error messages for debugging purposes.
94+
--formatting-pre-commit-hook Adds a formatting pre-commit hook. (Requires Prettier)
95+
--formik Adds Formik. (Form library)
96+
--framer-motion Adds Framer Motion. (Animation library)
97+
--github-actions Adds a GitHub Actions continuous integration workflow.
98+
--material-ui Adds Material UI. (Component library)
99+
--package-manager=(pnpm|yarn|npm) Sets the preferred package manager. (Required)
100+
--prettier Adds Prettier. (Code formatting)
101+
--react-hook-form Adds React Hook Form. (Form library)
102+
--styling=<styling-method> Sets the preferred styling method. (Required) <styling-method> = emotion|styled-components|tailwind-css|css-modules|css-modules-with-sass
101103
```
102104

105+
## Contributing
106+
107+
Contributions are welcome! Please see the [contributing guidelines](CONTRIBUTING.md) for more information.
108+
103109
## License
104110

105111
Create Next Stack is released under the [MIT License](LICENSE).

bin-test/run-prod

100644100755
File mode changed.

bin-test/run-prod.cmd

100644100755
File mode changed.

bin/run

100644100755
File mode changed.

0 commit comments

Comments
 (0)