Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softchris/gatsby-cli
helps to scaffold things like component, page components and different plugins
https://github.com/softchris/gatsby-cli
Last synced: about 1 month ago
JSON representation
helps to scaffold things like component, page components and different plugins
- Host: GitHub
- URL: https://github.com/softchris/gatsby-cli
- Owner: softchris
- License: mit
- Created: 2020-05-14T17:40:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T06:15:56.000Z (almost 2 years ago)
- Last Synced: 2024-03-29T22:04:18.931Z (8 months ago)
- Language: JavaScript
- Size: 6.12 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
![Coverage](./badges/coverage.svg)
[![npm version](https://badge.fury.io/js/gatsby-scaffolder.svg)](https://www.npmjs.com/package/gatsby-scaffolder)
[![npm downloads](https://img.shields.io/npm/dm/gatsby-scaffolder?color=blue&label=npm%20downloads&style=flat-square)](https://www.npmjs.com/package/gatsby-server)
[![The MIT License](https://img.shields.io/badge/license-MIT-orange.svg?color=blue&style=flat-square)](http://opensource.org/licenses/MIT)A command line tool that scaffolds different files and projects when working with Gatsby.
![Demo of command line tool](gatsby-cli.png)
## Install
- **Global install**, Either install as a global library:
```
npm install -g gatsby-scaffolder
```This will install an executable `gtsf`.
- **Run with NPX**
Or run it with NPX, like so:```
npx gtsf
```## Commands
NOTE, the commands `component` and `page` assume there is an existing Gatsby project scaffolded already. (Thereby existing directories `src/components/` and `src/pages/`). The `plugin` command assumes you are standing in an empty directory when running it.
The following commands are supported
- `component`
```
npx gtsf component
```example
```
npx gtsf component hello
```This creates the React component `hello.js` in the `Components/` dir.
- `page````
npx gtsf page
```example
```
npx gtsf page hello
```This creates the React component `hello.js` in the `Pages/` dir.
- `plugin source````
npx gtsf plugin
```example
```
npx gtsf plugin source
```This creates scaffolds out a new source plugin. This includes `package.json` and `gatsby-node.js`.
- `plugin transform````
npx gtsf plugin
```example
```
npx gtsf plugin transform
```This scaffolds out a new transformer plugin. This includes `package.json`, `gatsby-node.js`, `parseContent.js` and a test directory.