1
0
Fork 0

Merge pull request #3 from transitive-bullshit/feature/rename-create-react-library

rename to packages/create-freesewing-pattern/create-react-library; update demo
This commit is contained in:
Travis Fischer 2018-03-07 03:05:39 -05:00 committed by Joost De Cock
parent 8fd5eea43b
commit 99c7176872
9 changed files with 26 additions and 10 deletions

View file

@ -1,14 +1,16 @@
# react-modern-library-cli # create-react-library
> CLI for easily publishing modern React modules with Rollup and example usage via create-react-app. > CLI for easily publishing modern React modules with Rollup and example usage via create-react-app.
[![NPM](https://img.shields.io/npm/v/react-modern-library-cli.svg)](https://www.npmjs.com/package/react-modern-library-cli) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![NPM](https://img.shields.io/npm/v/create-react-library.svg)](https://www.npmjs.com/package/create-react-library) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## Intro ## Intro
**The purpose of this CLI is to make publishing your own React components as simple as possible.** **The purpose of this CLI is to make publishing your own React components as simple as possible.**
![](https://raw.githubusercontent.com/transitive-bullshit/react-modern-library-cli/master/media/demo.gif) <p align="center">
<img width="600" src="https://cdn.rawgit.com/transitive-bullshit/create-react-library/master/media/demo.svg">
</p>
The CLI is based on this [boilerplate](https://github.com/transitive-bullshit/react-modern-library-boilerplate), which you can optionally read in-depth about [here](https://hackernoon.com/publishing-baller-react-modules-2b039d84bce7). The CLI is based on this [boilerplate](https://github.com/transitive-bullshit/react-modern-library-boilerplate), which you can optionally read in-depth about [here](https://hackernoon.com/publishing-baller-react-modules-2b039d84bce7).
@ -31,13 +33,13 @@ The CLI is based on this [boilerplate](https://github.com/transitive-bullshit/re
## Install ## Install
```bash ```bash
npm install -g react-modern-library-cli npm install -g create-react-library
``` ```
## Creating a New Module ## Creating a New Module
```bash ```bash
react-modern-library-cli create-react-library
``` ```
Answer some basic prompts about your module, and then the CLI will perform the following steps: Answer some basic prompts about your module, and then the CLI will perform the following steps:
@ -48,7 +50,9 @@ Answer some basic prompts about your module, and then the CLI will perform the f
At this point, your new module should resemble this screenshot and is all setup for local development. At this point, your new module should resemble this screenshot and is all setup for local development.
![](https://raw.githubusercontent.com/transitive-bullshit/react-modern-library-cli/master/media/demo.png) <p align="center">
<img width="600" src="https://cdn.rawgit.com/transitive-bullshit/create-react-library/master/media/tree.svg">
</p>
## Development ## Development

View file

@ -18,7 +18,7 @@ module.exports = async () => {
if (!module.parent) { if (!module.parent) {
meow(` meow(`
Usage Usage
$ react-modern-library-cli $ create-react-library
`) `)
module.exports() module.exports()

View file

@ -76,6 +76,11 @@ module.exports.initPackageManager = async (opts) => {
info info
} = opts } = opts
// TODO: TEMP
return new Promise((resolve) => {
setTimeout(resolve, 2000)
})
const example = path.join(dest, 'example') const example = path.join(dest, 'example')
const commands = [ const commands = [

View file

@ -11,6 +11,11 @@ module.exports = async () => {
manager: 'npm' manager: 'npm'
} }
// TODO: TEMP
defaults.author = 'transitive-bullshit'
defaults.manager = 'yarn'
return defaults
try { try {
const gitConfigPath = getGitConfigPath('global') const gitConfigPath = getGitConfigPath('global')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 71 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="840" height="581.04"><rect width="840" height="581.04" rx="5" ry="5" class="a"/><svg y="0%" x="0%"><circle cx="20" cy="20" r="6" fill="#ff5f58"/><circle cx="40" cy="20" r="6" fill="#ffbd2e"/><circle cx="60" cy="20" r="6" fill="#18c132"/></svg><svg height="521.04" viewBox="0 0 80 52.104" width="800" x="15" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="50"><style>.a{fill:#1e1f29}.h,.i{fill:#d78700;font-weight:700}.i{fill:#f6f6f6}.j{fill:#ebece6}.k{fill:#49baff;font-weight:700}</style><g font-size="1.67" font-family="Monaco,Consolas,Menlo,'Bitstream Vera Sans Mono','Powerline Symbols',monospace"><defs><symbol id="a"><path fill="transparent" d="M0 0h80v25H0z"/></symbol><symbol id="b"><path fill="#e4e4e4" d="M0 0h1.102v2.171H0z"/></symbol></defs><path class="a" d="M0 0h80v52.104H0z"/><svg width="80"><svg><use xlink:href="#a"/><use xlink:href="#b" x="41.996" y="52.079"/><text y="3.841" class="h">~/dev/temp</text><text x="11.022" y="3.841" class="i">$</text><text x="13.026" y="3.841" class="j">cd</text><text x="16.032" y="3.841" class="j">my-dope-component/</text><text y="6.012" class="i">master*</text><text x="8.016" y="6.012" class="j">in</text><text x="11.022" y="6.012" class="h">~/dev/temp/my-dope-component</text><text x="40.08" y="6.012" class="i">$</text><text x="42.084" y="6.012" class="j">tree</text><text y="8.183" class="k">.</text><text y="10.354" class="j">├──</text><text x="4.008" y="10.354" class="j">README.md</text><text y="12.525" class="j">├──</text><text x="4.008" y="12.525" class="k">example</text><text x="11.022" y="12.525" class="j">/</text><text y="14.696" class="j"></text><text x="4.008" y="14.696" class="j">├──</text><text x="8.016" y="14.696" class="j">README.md</text><text y="16.867" class="j"></text><text x="4.008" y="16.867" class="j">├──</text><text x="8.016" y="16.867" class="j">package.json</text><text y="19.038" class="j"></text><text x="4.008" y="19.038" class="j">├──</text><text x="8.016" y="19.038" class="k">public</text><text x="14.028" y="19.038" class="j">/</text><text y="21.209" class="j"></text><text x="4.008" y="21.209" class="j"></text><text x="8.016" y="21.209" class="j">├──</text><text x="12.024" y="21.209" class="j">index.html</text><text y="23.38" class="j"></text><text x="4.008" y="23.38" class="j"></text><text x="8.016" y="23.38" class="j">└──</text><text x="12.024" y="23.38" class="j">manifest.json</text><text y="25.551" class="j"></text><text x="4.008" y="25.551" class="j">├──</text><text x="8.016" y="25.551" class="k">src</text><text x="11.022" y="25.551" class="j">/</text><text y="27.722" class="j"></text><text x="4.008" y="27.722" class="j"></text><text x="8.016" y="27.722" class="j">├──</text><text x="12.024" y="27.722" class="j">App.js</text><text y="29.893" class="j"></text><text x="4.008" y="29.893" class="j"></text><text x="8.016" y="29.893" class="j">├──</text><text x="12.024" y="29.893" class="j">index.css</text><text y="32.064" class="j"></text><text x="4.008" y="32.064" class="j"></text><text x="8.016" y="32.064" class="j">└──</text><text x="12.024" y="32.064" class="j">index.js</text><text y="34.235" class="j"></text><text x="4.008" y="34.235" class="j">└──</text><text x="8.016" y="34.235" class="j">yarn.lock</text><text y="36.406" class="j">├──</text><text x="4.008" y="36.406" class="j">package.json</text><text y="38.577" class="j">├──</text><text x="4.008" y="38.577" class="j">rollup.config.js</text><text y="40.748" class="j">└──</text><text x="4.008" y="40.748" class="k">src</text><text x="7.014" y="40.748" class="j">/</text><text x="4.008" y="42.919" class="j">├──</text><text x="8.016" y="42.919" class="j">index.js</text><text x="4.008" y="45.09" class="j">├──</text><text x="8.016" y="45.09" class="j">styles.css</text><text x="4.008" y="47.261" class="j">└──</text><text x="8.016" y="47.261" class="j">test.js</text><text y="51.603" class="j">4</text><text x="2.004" y="51.603" class="j">directories,</text><text x="15.03" y="51.603" class="j">14</text><text x="18.036" y="51.603" class="j">files</text><text y="53.774" class="i">master*</text><text x="8.016" y="53.774" class="j">in</text><text x="11.022" y="53.774" class="h">~/dev/temp/my-dope-component</text><text x="40.08" y="53.774" class="i">$</text></svg></svg></g></svg></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -1,12 +1,12 @@
{ {
"name": "react-modern-library-cli", "name": "create-react-library",
"version": "1.4.3", "version": "1.4.3",
"description": "CLI for easily bootstrapping modern react libraries", "description": "CLI for easily bootstrapping modern react libraries",
"repository": "transitive-bullshit/react-modern-library-cli", "repository": "transitive-bullshit/create-react-library",
"main": "index.js", "main": "index.js",
"license": "MIT", "license": "MIT",
"bin": { "bin": {
"react-modern-library-cli": "index.js" "create-react-library": "index.js"
}, },
"dependencies": { "dependencies": {
"consolidate": "^0.15.0", "consolidate": "^0.15.0",