1.0.3 • Published 5 years ago

@gnarlycode/create-gnarly-app v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago
GNARLY CODE PRESENTS
POWERED WITH @gnarlycode/react-app-tools

šŸ’€ CREATE GNARLY APP šŸ’€

Want to create universal web apps with SSR or just generate static site super easy and fast?

The tool is here!

WHAT?

Those lovely tools of contemporary web development:

āš›ļø React for sure!!!

šŸ”­ Astroturf for style!

šŸš— React Router for traffic!

šŸŽÆ Typescript for bulletproof!

🌌 Redux for state! *

The * mark means optional

INSTALL?

To create an app, run:

npm init @gnarlycode/gnarly-app 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:

šŸ“ app-name
ā”œā”€ā”€ šŸ“„ .browserlist
ā”œā”€ā”€ šŸ“„ .editorconfig
ā”œā”€ā”€ šŸ“„ .eslintignore
ā”œā”€ā”€ šŸ“„ .eslintrc.js
ā”œā”€ā”€ šŸ“„ .gitignore
ā”œā”€ā”€ šŸ“„ .prettierignore
ā”œā”€ā”€ šŸ“„ .prettierrc
ā”œā”€ā”€ šŸ“„ gnarly.config.js
ā”œā”€ā”€ šŸ“„ package.json
ā”œā”€ā”€ šŸ“„ README.md
ā”œā”€ā”€ šŸ“„ tsconfig.json
│
ā”œā”€ā”€ šŸ“ src
│   ā”œā”€ā”€ šŸ“„ config.ts
│   ā”œā”€ā”€ šŸ“„ routes.tsx
│   │
│   ā”œā”€ā”€ šŸ“ components
│   │   └── šŸ“„ <Components>.tsx
│   │
│   ā”œā”€ā”€ šŸ“ entries
│   │   ā”œā”€ā”€ šŸ“„ client.tsx
│   │   └── šŸ“„ server.tsx
│   │
│   ā”œā”€ā”€ šŸ“ styles
│   │   ā”œā”€ā”€ šŸ“„ globalStyles.ts
│   │   └── šŸ“„ styleVars.json
│   │
│   ā”œā”€ā”€ šŸ“ types
│   │   └── šŸ“„ svg.d.ts
│   │
│   └── šŸ“ utils
│       ā”œā”€ā”€ šŸ“„ index.ts
│       └── šŸ“„ links.ts
│
└── šŸ“ static
    └── šŸ“„ favicon.ico

āš™ļø Configuration is inside of gnarly.config.js

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

  // Url prefix
  baseUrl: '/base-url',

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

  // Serve static with express (do not enable if static served with nginx for example)
  serveStatic: true,
}

āš™ļø You can create gnarly.config.local.js for local environment and don't commit it.

āš™ļø Also you can create _env and .env for extra configurations.

āš™ļø If you want to include an api to your app look this example.

CREDITS šŸ™

babel commander dotenv-webpack dotenv express inquirer react-helmet react-hot-loader react-router react redux astroturf svg-sprite-loader eslint typescript webpack-hot-server-middleware webpack

Author: Dmitry Podlesny