Skip to content

snydertechnologies/nx-gatsby

This branch is 2 commits ahead of, 1 commit behind nrwl/gatsby:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6d0cf7e · Jan 16, 2021

History

56 Commits
Jun 9, 2020
Nov 27, 2020
Jan 16, 2021
Dec 23, 2020
Apr 13, 2020
Nov 27, 2020
Apr 13, 2020
Apr 13, 2020
Apr 13, 2020
Jun 11, 2020
Jun 14, 2020
Nov 27, 2020
Nov 27, 2020
Jun 11, 2020
Nov 27, 2020
Jan 16, 2021
Jul 20, 2020
Dec 23, 2020
Jan 16, 2021

Repository files navigation

Gatsby Plugin for Nx

License NPM Version Join the chat at https://gitter.im/nrwl-nx/community Join us @nrwl/community on slack

Getting started

Create a new Nx workspace:

npx create-nx-workspace --cli=nx --preset=empty

Install Gatsby plugin

# Using npm
npm install --save-dev @nrwl/gatsby

# Using yarn
yarn add -D @nrwl/gatsby

Create an app

npx nx g @nrwl/gatsby:app <app-name>

When using Nx, you can create multiple applications and themes in the same workspace. If you don't want to prefix your commands with npx, install @nrwl/cli globally.

Serve the app

npx nx serve <app-name> --open

In prod mode:

npx nx serve <app-name> --prod --open

Build/test/lint the app

npx nx build <app-name>
npx nx test <app-name>
npx nx lint <app-name>

Using components from React library

You can use a component from React library generated using Nx package for React. Once you run:

npx nx g @nrwl/react:lib ui-button --style=css

This will generate the UiButton component, which you can use in your app.

import { UiButton } from '@myorg/ui-button';

Learn more

Visit the Nx Documentation to learn more.

About

Nx plugin for Gatsby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.5%
  • JavaScript 9.8%
  • Shell 4.7%