diff --git a/.husky/pre-commit b/.husky/pre-commit index 36af219..780b9d9 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +pnpm run update-readmes npx lint-staged diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 445d474..4c315dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,17 +84,17 @@ Make sure you are set up locally by following the [Getting Started](#getting-sta - `test:raw` - Runs the binary directly. Rarely used, but can be useful for manual tests where you want to be able to specify the `app_name` argument yourself. - `clean` - Removes all generated files, including build files and the `create-next-stack-tests` directory created by the e2e tests. -3. Add a new .ts file for your plugin in the plugins directory at `packages\create-next-stack\src\main\plugins` +3. Add a new .ts file for your plugin in the plugins directory at [`packages/create-next-stack/src/main/plugins`](packages/create-next-stack/src/main/plugins) - See the [Writing a plugin section](#writing-a-plugin) below to learn how to write a Create Next Stack plugin. -4. Add new flags to the `create-next-stack` command in [`create-next-stack.ts`](packages\create-next-stack\src\main\commands\create-next-stack.ts). +4. Add new flags to the `create-next-stack` command in [`create-next-stack.ts`](packages/create-next-stack/src/main/commands/create-next-stack.ts). 5. Add the plugin to the `plugins` array in [`setup.ts`](packages/create-next-stack/src/main/setup/setup.ts). -6. Add potential plugin steps to the `steps` array in [`setup.ts`](packages/create-next-stack/src/main/setup/setup.ts). Steps are run top-to-bottom. -7. Update the [`README.md`](README.md): - - Add the technology to the technology list - - Update the `Usage` section by copy pasting the output of running `yarn print:help` -8. Consider expanding some of the e2e tests to include the new technology. See [`test.ts`](packages\create-next-stack\src\tests\e2e\test.ts) for current tests. +6. Add potential plugin steps to the `steps` array in [`steps.ts`](packages/create-next-stack/src/main/steps.ts). Steps are run top-to-bottom. +7. Consider expanding some of the e2e tests to include the new technology. See [`test.ts`](packages/create-next-stack/src/tests/e2e/test.ts) for current tests. +8. Go and add the technology to the technology selection form of the website. + - See the [TechnologiesForm](website/templates/LandingPage/components/TechnologiesForm.tsx) component. + - This component is currently pretty hideous, and updating it will be automated in the future. See [issue #188](https://github.com/akd-io/create-next-stack/issues/188). 9. Run tests using `yarn test` to ensure they all pass. 10. Submit a Pull Request on GitHub. @@ -102,7 +102,7 @@ Make sure you are set up locally by following the [Getting Started](#getting-sta Plugins aren't too scary. A Create Next Stack plugin consists of a simple TypeScript file that calls a `createPlugin()` function with JSON object. -See the [Framer Motion plugin](packages/create-next-stack/src/main/plugins/emotion.ts) for example. This plugin adds the `framer-motion` npm dependency to the generated Next.js project, as well as adding some documentation about the technology. +See the [Framer Motion plugin](packages/create-next-stack/src/main/plugins/framer-motion.ts) for example. This plugin adds the `framer-motion` npm dependency to the generated Next.js project, as well as adding some documentation about the technology. ```typescript export const framerMotionPlugin = createPlugin({ diff --git a/package.json b/package.json index ba990ec..dd749a1 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "test": "pnpm prr test", "test:cli": "pnpm prr --filter create-next-stack test", "test:web": "pnpm prr --filter create-next-stack-website test", + "update-readmes": "pnpm prr update-readme", "prr": "pnpm recursive run" }, "devDependencies": { diff --git a/packages/create-next-stack/README.md b/packages/create-next-stack/README.md index c5741bd..8fff936 100644 --- a/packages/create-next-stack/README.md +++ b/packages/create-next-stack/README.md @@ -31,60 +31,85 @@ To get started, go to [create-next-stack.com](https://www.create-next-stack.com) The table below provides an overview of the technologies currently supported by Create Next Stack. -| Name | Links | -| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [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) | -| [React](https://reactjs.org/) (Mandatory) | [Docs](https://reactjs.org/docs/getting-started.html) - [GitHub repo](https://github.com/facebook/react) | -| [TypeScript](https://www.typescriptlang.org/) (Mandatory) | [Docs](https://www.typescriptlang.org/docs/) - [GitHub repo](https://github.com/microsoft/TypeScript) | -| [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) | -| [pnpm](https://pnpm.io/) | [Docs](https://pnpm.io/motivation) - [GitHub repo](https://github.com/pnpm/pnpm) | -| [Yarn](https://yarnpkg.com/) | [CLI Docs](https://yarnpkg.com/cli) - [GitHub repo](https://github.com/yarnpkg/berry) | -| [npm](https://www.npmjs.com/) | [CLI Docs](https://docs.npmjs.com/cli/) | -| [Emotion](https://emotion.sh/docs/introduction) | [Docs](https://emotion.sh/docs/introduction) - [GitHub repo](https://github.com/emotion-js/emotion) | -| [Styled Components](https://styled-components.com/) | [Docs](https://styled-components.com/docs) - [GitHub repo](https://github.com/styled-components/styled-components) | -| [Tailwind CSS](https://tailwindcss.com/) | [Docs](https://tailwindcss.com/docs) - [GitHub repo](https://github.com/tailwindlabs/tailwindcss) | -| [CSS Modules](https://github.com/css-modules/css-modules) | [Docs](https://github.com/css-modules/css-modules) - [Next.js-specific docs](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css) | -| [Sass](https://sass-lang.com/) | [Docs](https://sass-lang.com/documentation) - [Next.js-specific docs](https://nextjs.org/docs/basic-features/built-in-css-support#sass-support) | -| [Chakra UI](https://chakra-ui.com/) | [Docs](https://chakra-ui.com/docs/getting-started) - [GitHub repo](https://github.com/chakra-ui/chakra-ui) | -| [Material UI](https://material-ui.com/) | [Docs](https://material-ui.com/getting-started/installation/) - [GitHub repo](https://github.com/mui-org/material-ui) | -| [React Hook Form](https://react-hook-form.com/) | [Docs](https://react-hook-form.com/get-started) - [GitHub repo](https://github.com/react-hook-form/react-hook-form) | -| [Formik](https://formik.org/) | [Docs](https://formik.org/docs/overview) - [GitHub repo](https://github.com/formium/formik) | -| [Framer Motion](https://www.framer.com/motion/) | [Docs](https://www.framer.com/docs/) - [GitHub repo](https://github.com/framer/motion) | -| [Prettier](https://prettier.io/) | [Docs](https://prettier.io/docs/en/index.html) - [Options](https://prettier.io/docs/en/options.html) - [GitHub repo](https://github.com/prettier/prettier) | -| [Husky](https://typicode.github.io/husky/) | [Docs](https://typicode.github.io/husky/) - [GitHub repo](https://github.com/typicode/husky) | -| [lint-staged](https://github.com/okonet/lint-staged) | [GitHub repo](https://github.com/okonet/lint-staged) | -| [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) | -| [React Icons](https://react-icons.github.io/react-icons/) | [GitHub repo](https://github.com/react-icons/react-icons) | + + +| Name | Links | +| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Next.js | [Website](https://nextjs.org/) - [Docs](https://nextjs.org/docs) - [Learn Next.js](https://nextjs.org/learn) - [GitHub](https://github.com/vercel/next.js) - [Wikipedia](https://en.wikipedia.org/wiki/Next.js) | +| React | [Website](https://reactjs.org/) - [Docs](https://reactjs.org/docs/getting-started.html) - [GitHub](https://github.com/facebook/react) - [Wikipedia]() | +| TypeScript | [Website](https://www.typescriptlang.org/) - [Docs](https://www.typescriptlang.org/docs/) - [GitHub](https://github.com/microsoft/TypeScript) - [Wikipedia](https://en.wikipedia.org/wiki/TypeScript) | +| Emotion | [Website](https://emotion.sh/) - [Docs](https://emotion.sh/docs/introduction) - [GitHub](https://github.com/emotion-js/emotion) | +| Styled Components | [Website](https://styled-components.com/) - [Docs](https://styled-components.com/docs) - [GitHub](https://github.com/styled-components/styled-components) | +| Tailwind CSS | [Website](https://tailwindcss.com/) - [Docs](https://tailwindcss.com/docs) - [GitHub](https://github.com/tailwindlabs/tailwindcss) | +| Sass | [Website](https://sass-lang.com/) - [Docs](https://sass-lang.com/documentation) - [Next.js-specific docs](https://nextjs.org/docs/basic-features/built-in-css-support#sass-support) | +| CSS Modules | [Website](https://github.com/css-modules/css-modules) - [Docs](https://github.com/css-modules/css-modules) - [Next.js-specific docs](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css) | +| CSS Modules | [Website](https://github.com/css-modules/css-modules) - [Docs](https://github.com/css-modules/css-modules) - [Next.js-specific docs](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css) | +| Mantine | [Website](https://mantine.dev/) - [Docs](https://mantine.dev/pages/getting-started/) - [GitHub](https://github.com/mantinedev/mantine) | +| Chakra UI | [Website](https://chakra-ui.com/) - [Docs](https://chakra-ui.com/docs/getting-started) - [GitHub](https://github.com/chakra-ui/chakra-ui) | +| Material UI | [Website](https://material-ui.com/) - [Docs](https://material-ui.com/getting-started/installation/) - [GitHub](https://github.com/mui-org/material-ui) | +| Framer Motion | [Website](https://www.framer.com/motion/) - [Docs](https://www.framer.com/docs/) - [GitHub](https://github.com/framer/motion) | +| React Hook Form | [Website](https://react-hook-form.com/) - [Docs](https://react-hook-form.com/get-started) - [GitHub](https://github.com/react-hook-form/react-hook-form) | +| Formik | [Website](https://formik.org/) - [Docs](https://formik.org/docs/overview) - [GitHub](https://github.com/formium/formik) | +| React Query | [Website](https://tanstack.com/query/latest) - [Docs](https://tanstack.com/query/latest/docs/react/overview) - [GitHub](https://github.com/tanstack/query) | +| React Icons | [Website](https://react-icons.github.io/react-icons/) - [GitHub](https://github.com/react-icons/react-icons) | +| ESLint | [Website](https://eslint.org/) - [Configuration](https://eslint.org/docs/user-guide/configuring/) - [Rules](https://eslint.org/docs/rules/) - [GitHub](https://github.com/eslint/eslint) | +| Prettier | [Website](https://prettier.io/) - [Docs](https://prettier.io/docs/en/index.html) - [Options](https://prettier.io/docs/en/options.html) - [GitHub](https://github.com/prettier/prettier) | +| Husky | [Website](https://typicode.github.io/husky/) - [Docs](https://typicode.github.io/husky/) - [GitHub](https://github.com/typicode/husky) | +| lint-staged | [Website](https://github.com/okonet/lint-staged) - [GitHub](https://github.com/okonet/lint-staged) | +| pnpm | [Website](https://pnpm.io/) - [Docs](https://pnpm.io/motivation) - [GitHub](https://github.com/pnpm/pnpm) | +| Yarn | [Website](https://yarnpkg.com/) - [CLI Docs](https://yarnpkg.com/cli) - [GitHub](https://github.com/yarnpkg/berry) | +| npm | [Website](https://www.npmjs.com/) - [CLI Docs](https://docs.npmjs.com/cli/) | +| GitHub Actions | [Website](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) | + + ## Usage 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` + + ``` USAGE $ create-next-stack [APP_NAME] [FLAGS] ARGUMENTS - APP_NAME The name of your app, optionally including a path prefix. Eg.: "my-app" or "path/to/my-app" + APP_NAME The name of your app, optionally including a path prefix. Eg.: + "my-app" or "path/to/my-app" FLAGS -h, --help Shows the CLI help information. -v, --version Shows the CLI version information. - --chakra Adds Chakra UI. (Component library) (Requires Emotion and Framer Motion) - --debug Show verbose error messages for debugging purposes. - --formatting-pre-commit-hook Adds a formatting pre-commit hook. (Requires Prettier) + --chakra Adds Chakra UI. (Component library) (Requires + Emotion and Framer Motion) + --debug Show verbose error messages for debugging + purposes. + --formatting-pre-commit-hook Adds a formatting pre-commit hook. (Requires + Prettier) --formik Adds Formik. (Form library) --framer-motion Adds Framer Motion. (Animation library) - --github-actions Adds a GitHub Actions continuous integration workflow. - --material-ui Adds Material UI. (Component library) - --package-manager=