Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
manneredboor committed Aug 7, 2018
1 parent b5f0bd6 commit bfc6a36
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 17 deletions.
136 changes: 120 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,141 @@

###### _GNARLY CODE_ Presents

# Create Gnarly App
# 💀 CREATE GNARLY APP 💀

Create React app targeted to opinionated stack.
Powered by [@gnarlycode/react-app-tools](https://github.com/gnarlycode/react-app-tools)
Want to create **`universal`** web apps with **`SSR`** or just generate **`static site`** super easy and fast?

## How to create app
**The tool is here!**

## WHAT?

Those lovely tools of contemporary web development:

**[`⚛️ React`](https://reactjs.org/)** for sure!!!

**[`💅 Styled Components`](https://www.styled-components.com/)** for swag!

**[`🚗 React Router`](https://reactjs.org/)** for traffic!

**[`🎯 Typescript`](https://www.typescriptlang.org)** for bulletproof!

**[`🌌 Redux`](https://redux.js.org/)** for state! \*

_The \* mark means optional_

## INSTALL?

To create an app, run:

```sh
npm init @gnarlycode/gnarly-app app-name
# wait... choose

cd app-name
```

## COMMANDS?

> **`npm run dev`** — dev server (hot reload, watch mode etc)
> **`npm run build`** — build the app
> **`npm run build-static`** — build the app with static html's
> **`npm start`** — serve builded app
## WHAT'S NEXT?

You got next file structure for your app:

```
my-app/
├── gnarly.config.js
├── package.json
├── README.md
├── tsconfig.json
├── tslint.json
├── .gitignore
├── .editorconfig
├── .prettierignore
├── .prettierrc
├── src
│ ├── config.ts
│ ├── routes.tsx
│ │
│ ├── components
│ │ └── <Components>.tsx
│ │
│ ├── entries
│ │ ├── client.tsx
│ │ └── server.tsx
│ │
│ └── utils
│ ├── defaultStyles.tsx
│ ├── index.ts
│ ├── links.ts
│ └── styles.ts
├── static
│ └── favicon.ico
└── typings
└── svg.d.ts
```

Configuration is inside of `gnarly.config.js`

```js
module.exports = {
// Server listening
host: '0.0.0.0',
port: 8080,

## How to use app
// Url prefix
baseUrl: '/base-url',

> `npm run prettier` — run prettier
// For static renderer, used when you run `npm run build-static` or `build-all`
routerConfig: './src/routes',

> `npm run dev` — development server
// Serve static with express (do not enable if static served with nginx for example)
serveStatic: true,

> `npm run build` — build the app
// Add extra express app
expressApp: './api/index.js',

// Add babel transform runtime
babelRuntime: true,

// Browsers list
browsers: ['last 2 versions', '>= 1%'],
}
```

> `npm run build-static` — build static html's
You can create `gnarly.config.local.js` for local environment and don't commit it.

> `npm run build-all` — build the app and then static html's
Also you can create `_env` and `.env` for extra configurations.

> `npm start` — serve builded app
## POWERED BY AND MORE INFO

> `npm run tsint` — check linter rules
**[`@gnarlycode/react-app-tools`](https://github.com/gnarlycode/react-app-tools)**

## Target stack:
## MORE CREDITS

- [TypeScript](https://www.typescriptlang.org)
- [React](https://reactjs.org/)
- [Styled Components](https://www.styled-components.com/)
[`tslint`](https://palantir.github.io/tslint/)
[`react-helmet`](https://github.com/nfl/react-helmet)
[`react-hot-loader`](https://github.com/gaearon/react-hot-loader)
[`express`](https://expressjs.com/)
[`dotenv`](https://github.com/motdotla/dotenv)
[`dotenv-webpack`](https://github.com/mrsteele/dotenv-webpack)
[`webpack`](https://webpack.js.org/)
[`babel`](https://babeljs.io/)
[`svg-react-loader`](https://github.com/jhamlet/svg-react-loader)
[`awesome-typescript-loader`](https://github.com/s-panferov/awesome-typescript-loader)
[`webpack-hot-server-middleware`](https://www.npmjs.com/package/webpack-hot-server-middleware)
[`@gnarlycode/react-route-fetch`](https://github.com/gnarlycode/react-components/tree/master/packages/react-route-fetch)
[`@gnarlycode/react-scroll-state`](https://github.com/gnarlycode/react-components/tree/master/packages/react-scroll-state)
[`inquirer`](https://github.com/SBoudrias/Inquirer.js/)
[`commander`](https://github.com/tj/commander.js)

###### Author: Dmitry Podlesny
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gnarlycode/create-gnarly-app",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit bfc6a36

Please sign in to comment.