1.2.8 • Published 6 years ago

create-argos-app v1.2.8

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Overview

yarn create (Yarn 1.0.0+)
1.yarn create argos-app my-app
2.cd my-app/
3.yarn start

Open http://localhost:3000 to view your running app. When you're ready for production, run the build then prod scripts.

Start Coding Now

You don't need to install or setup Webpack or Babel. They come packaged with next, so you can just start coding.

After running create-argos-app, you're good to go!

Getting Started

Creating an App

Follow the steps in the above table:

Minimum Requirements:

  • Node >= 8.x.x - Use nvm to easily switch Node versions between projects.

What's in an App

create-argos-app will have created a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure and install necessary dependencies:

.
├── README.md
├── actions
│   ├── actionTypes.js
│   └── actions.js
├── components
│   ├── head.js
│   └── nav.js
│   └── nav.scss
├── config
│   ├── [...]
├── lib
├── babel.config.js
├── next.config.js
├── node_modules
│   ├── [...]
├── package.json
├── pages
│   └── _app.js
│   └── examples.js
│   └── index.js
│   └── index.scss
│   └── started.js
├── reducers
│   └── reducer.js
├── static
│   └── favicon.ico
├── sagas
│   └── saga.js
├── store
│   └── store.js
└── yarn.lock

Routing in Next.js is based on the file system, so ./pages/index.js maps to the / route and ./pages/about.js would map to /about.

The ./static directory maps to /static in the next server, so you can put all your other static resources like images or compiled CSS in there.

Out of the box, we get:

  • Automatic transpilation and bundling (with webpack and babel)
  • Hot code reloading
  • Server rendering and indexing of ./pages
  • Static file serving. ./static/ is mapped to /static/
  • Redux and Redux Sagas
  • Testing with Jest
  • SCSS support with next-sass

Once the installation is finished, you can run some commands in your project:

yarn start

Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits. You will also see any errors in the console.

yarn build

Builds the app for production to the .next folder. It correctly bundles React in production mode and optimizes the build for the best performance.

yarn prod

Starts the application in production mode. The application should be compiled with `yarn build` first.

Now you're ready to code & deploy your app!

Things to do:

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago