Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Docs: Update setup/installation instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Apr 19, 2016
1 parent 172c68b commit aeee838
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
56 changes: 35 additions & 21 deletions docs/content/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
title: How to setup Phenomic
---

Phenomic uses
[Node.js >= 4.2.0](http://nodejs.org/)/[npm](http://npmjs.com/)
and requires a minimal boilerplate, in order to provide you some
Phenomic require at least
[Node.js@^4.2.0](http://nodejs.org/) / [npm@^3.0.0](http://npmjs.com/).

It need a minimal boilerplate, in order to provide you some

This comment has been minimized.

Copy link
@thangngoc89

thangngoc89 Apr 19, 2016

Contributor

*It needs

flexibility.
Here is a quick way to setup the boilerplate in a minute:
Here is how to setup the boilerplate in a minute.

## Create a new folder

Expand All @@ -17,24 +18,21 @@ $ DIR=your-website-folder
$ mkdir $DIR && cd $DIR
```

## Setup boilerplate
## Get Phenomic

```console
$ npm init --force
$ npm install phenomic
$ ./node_modules/.bin/phenomic setup
```
You will need to install Phenomic first, to generate the required boilerplate.
You can install Phenomic from npm to get latest stable version, or install
it from git to get latest bleeding edge updates.

After you answer some questions, you are setup with **Phenomic**.
_By installing it locally, you ensure that several projects can rely on
different versions of Phenomic.
Anyway, Phenomic will probably not work installed globally._

We use `npm init` with the `force` option because npm needs a valid `package.json`
file to work; as you will overwrite this file anyway, it is a good choice for a
faster setup.
### Install from npm

_Tip:_ You can open `package.json` and adjust some values to fit your needs.

_Check out [Configuration](../usage/configuration/) for more information about
the configuration options._
```console
$ npm install phenomic
```

### Install from git

Expand All @@ -45,6 +43,20 @@ $ npm install babel-cli babel-preset-react babel-preset-es2015 babel-preset-stag
$ npm install https://github.com/MoOx/phenomic.git
```

## Setup boilerplate

```console
$ ./node_modules/.bin/phenomic setup
```

After you answer some questions, your boilerplate is ready.
_Note that it will create (and overwrite) any existing ``package.json``._

_Tip:_ You can open `package.json` and adjust some values to fit your needs.

_Check out [Configuration](../usage/configuration/) for more information about
the configuration options._

## Install dependencies

When you are done the setup, it's time to get all dependencies.
Expand All @@ -59,7 +71,7 @@ of what you use and are not locked in to using packages that you don't want to.

Now it's time to...

## START the engine
## Start the engine

```console
$ npm start
Expand All @@ -69,10 +81,12 @@ It's that simple.

This command calls the `start` command from the `scripts` section of your
`package.json`.
As you can see this will execute a Node.js script that will load the
configuration (`scripts/build.js`) and run Phenomic in development mode.
As you can see this will execute ``phenomic start`` command that will load the
configuration (`scripts/build.js`) and run the development mode.

Now just wait for your browser to show up (yes this development mode should open
your development server in your favorite browser).

[This can take more than 30s for now, but we are working on this](https://github.com/MoOx/phenomic/issues/301).

When you get the hello world, you will be able to [start hacking!](../usage/)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"engines": {
"node": ">=4.2.0",
"npm": ">=2.0.0"
"npm": ">=3.0.0"
},
"dependencies": {
"babel-polyfill": "^6.5.0",
Expand Down

0 comments on commit aeee838

Please sign in to comment.