This website is a work in progress.

Installation

Installation

The react preset we are going to use will work with React and Webpack.

npm install --save-dev react react-dom react-router@^3.2.0
npm install --save-dev @phenomic/core @phenomic/cli @phenomic/preset-react-app

These lines will install Phenomic and its react app preset.

⚠️ If you don't have a package.json you can do this simple command to get a valid one:

echo '{"private":true}' > package.json

The react preset will allow you to consume Markdown and JSON files as data resources to generate your website/app.

See complete package.json (versions might be more recent)
{
  "private": true,
  "devDependencies": {
    "@phenomic/core": "^1.0.0-alpha.1",
    "@phenomic/cli": "^1.0.0-alpha.1",
    "@phenomic/preset-react-app": "^1.0.0-alpha.1",
    "react": "^16.3.0",
    "react-dom": "^16.3.0",
    "react-router": "^3.2.0"
  }
}

Configuration

Here we going to tell Phenomic the plugins we want to use via the preset. To do so, we are going to add a phenomic section in our package.json

{
  "...": "...",
  "phenomic": {
    "presets": ["@phenomic/preset-react-app"]
  }
}
See complete package.json
{
  "private": true,
  "devDependencies": {
    "@phenomic/core": "^1.0.0-alpha.1",
    "@phenomic/cli": "^1.0.0-alpha.1",
    "@phenomic/preset-react-app": "^1.0.0-alpha.1",
    "react": "^16.3.0",
    "react-dom": "^16.3.0",
    "react-router": "^3.2.0"
  },
  "phenomic": {
    "presets": ["@phenomic/preset-react-app"]
  }
}

Continue tutorial