@gnarlycode/create-gnarly-app v1.0.3
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