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

Update boilerplate to be a base theme #698

Merged
merged 9 commits into from
Sep 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[ignore]
.*/node_modules/.*
.*/docs/node_modules/.*
.*/test-boilerplate/.*
.*/test-phenomic-theme-base/.*
.*/lib/.*
.*/coverage/.*
.*/.nyc_output/.*
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ docs/node_modules
docs/dist
docs/content/assets/showcases/*

# boilerplate files to work on it
boilerplate/package.json
boilerplate/dist
test-boilerplate
# phenomic-theme-base files to work on it
themes/phenomic-theme-base/package.json
themes/phenomic-theme-base/dist
test-phenomic-theme-base

# logo
logo/*.png
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ matrix:
cache:
directories:
- node_modules
- test-boilerplate/node_modules
- test-phenomic-theme-base/node_modules
- docs/node_modules

before_install:
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
# HEAD

- Removed: ``BodyContainer`` now avoid wrapping content in a ``<div>`` if a
single string is passed as a child.
(@MoOx)
- Removed: ``PageContainer`` does not wrap its child into a ``<div>``
([#691](https://github.com/MoOx/phenomic/pull/691) - @MoOx,
based on @DavidWells [idea](https://github.com/MoOx/phenomic/pull/690))
- Added: 🚀 Hard source Webpack plugin to improve performance by more than 300%
You can enable this **experimental** feature by add
``"webpackHardCache": true`` in your ``package.json`` ``phenomic`` section.
- Changed: ``phenomic/lib/PageContainer`` has been relocated.
To prevent issue in the future, is now accessible by doing
``import { PageContainer } from "phenomic"``.
If you want to import it with a different name, you can do it this way:
```js
import { PageContainer as PhenomicPageContainer } from "phenomic"
```
([ref #433](https://github.com/MoOx/phenomic/issues/433) - @MoOx)

## Boilerplate

- Changed: new default tree structure.
We encourage you to update to a similar structure if you were using the previous one.
Main changes:

- ``web_modules/layouts`` => ``src/layouts``
- ``web_modules/{Components}`` => ``src/components/*``
- ``web_modules/app/*`` => ``src/*``
- ``web_modules/LayoutContainer`` => ``src/AppContainer.js``

# 0.16.2 - 2016-08-23

Expand Down
2 changes: 1 addition & 1 deletion __tests__/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This folder is for integration tests only.

See `src/**/__tests__/*.js` for unit tests.

Tests here need to be run with a valid `test-boilerplate` folder.
Tests here need to be run with a valid `test-phenomic-theme-base` folder.
2 changes: 1 addition & 1 deletion __tests__/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { join } from "path"

import { exec } from "child_process"

const target = join(__dirname, "..", "test-boilerplate")
const target = join(__dirname, "..", "test-phenomic-theme-base")
const execOpts = { cwd: target }

const phenomic = "node ./node_modules/.bin/phenomic"
Expand Down
4 changes: 2 additions & 2 deletions __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { join } from "path"

import globby from "globby"

const testFolder = "../test-boilerplate/dist"
const testFolder = "../test-phenomic-theme-base/dist"
const files = globby.sync("**/*", {
cwd: testFolder,
nodir: true,
Expand Down Expand Up @@ -72,7 +72,7 @@ test("should have html files", (t) => {
t.truthy(includes(
"index.html",
[
">Phenomic default boilerplate",
">Phenomic base theme",
"window.__INITIAL_STATE__ = {\"pages\":{\"/\"",
]
))
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ matrix:

cache:
- node_modules -> package.json
# - test-boilerplate/node_modules -> package.json
# - test-phenomic-theme-base/node_modules -> package.json
# - docs/node_modules -> package.json

install:
Expand Down
5 changes: 0 additions & 5 deletions boilerplate/content/404.md

This file was deleted.

19 changes: 0 additions & 19 deletions boilerplate/content/index.md

This file was deleted.

39 changes: 0 additions & 39 deletions boilerplate/web_modules/Footer/index.js

This file was deleted.

9 changes: 0 additions & 9 deletions boilerplate/web_modules/LayoutContainer/index.css

This file was deleted.

2 changes: 1 addition & 1 deletion docs/content/404.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
layout: PageError
route: 404.html
---
Content here not used, see ``web_modules/layouts/PageError``
Content here not used, see ``src/layouts/PageError``
10 changes: 5 additions & 5 deletions docs/content/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: How to contribute to Phenomic
---

## Update the boilerplate
## Update the phenomic-theme-base

To work on the boilerplate, run the following:
To work on the phenomic-theme-base, run the following:

```sh
npm run boilerplate-start
npm run phenomic-theme-base-start
```

Then you can edit files in the `boilerplate` folder.
Then you can edit files in the `phenomic-theme-base` folder.

## Update the docs

Expand All @@ -33,7 +33,7 @@ _After every modification, please run the entire test suite by using

Note that the full test suite can take a few minutes, as it runs unit tests and
integration tests (with several builds, including docs and a new project from
the default boilerplate).
the phenomic-theme-base).

To speed things up, you can limit tests to the specific component you are working on.

Expand Down
61 changes: 0 additions & 61 deletions docs/content/docs/advanced/engine.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/content/docs/advanced/good-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ title: Good practices

## Linting

Our boilerplate comes with best-in-class tools for linting both JavaScript
Our phenomic-theme-base comes with best-in-class tools for linting both JavaScript
and CSS. Linting your code is a good practice because it reduces the probability
of errors and helps to enforce code consistency.

## JavaScript Linting

[ESLint](http://eslint.org/) is a must have JavaScript linter; the default
boilerplate provides you with a nice [standard set of rules](https://github.com/MoOx/eslint-config-i-am-meticulous)
phenomic-theme-base provides you with a nice [standard set of rules](https://github.com/MoOx/eslint-config-i-am-meticulous)
for ES2015+ & React.

That being said, you might want less rules (or semicolons).
Expand Down Expand Up @@ -63,5 +63,5 @@ This will fix all the errors that ESLint or its plugins can handle.
## CSS Linting

[stylelint](http://stylelint.io/) is a must have CSS linter; the default
boilerplate provides you with a nice [standard set of rules](https://github.com/stylelint/stylelint-config-standard)
phenomic-theme-base provides you with a nice [standard set of rules](https://github.com/stylelint/stylelint-config-standard)
for modern CSS development.
1 change: 0 additions & 1 deletion docs/content/docs/advanced/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ title: Advanced Usage and tips
---

- [Good practices](good-practices/)
- [Understanding the engine](engine/)
- [Adding custom Redux reducers](redux/)
- [Offline browsing](offline-browsing/)
2 changes: 1 addition & 1 deletion docs/content/docs/advanced/redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ incomplete: true

Here is an example of a store that will allow you to add
your own reducers, _with hot loading support_. It is based on the
default boilerplate.
phenomic-theme-base.

```js
import { combineReducers } from "redux"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/faq/gatsby.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Here are some points we want to highlight :
For example, Gatsby has in it's dependencies LESS, Sass and PostCSS (yeah
maybe that's too much).
By default, Phenomic will just install PostCSS (since it's required in the
default boilerplate), but you can remove it (since it will be added in your
phenomic-theme-base), but you can remove it (since it will be added in your
package.json) and replace with any dependency you want (or none).
- Phenomic is covered by a lot of **automated unit, integration and functional
tests** to avoid bugs and regressions.
Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ It's the latest version of JavaScript. Here are some links:

Easy. There 2 parts you can adjust that are referenced in the app routes:

### ``src/web_modules/LayoutContainer``
### ``src/AppContainer.js``

It's the global website wrapper.
It contains the header, the content and the footer of your website/app.

### ``src/web_modules/layouts/*``
### ``src/layouts/*``

Here is the place where you should find and add all page layouts.
The page we just created use the default page layout, which is (by default)
``Page`` so we will need to adjust ``src/web_modules/layouts/Page``.
``Page`` so we will need to adjust ``src/layouts/Page``.

**Layouts are just React components**, so you should be able to do anything
you want!
Expand Down
8 changes: 4 additions & 4 deletions docs/content/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Phenomic require at least
We recommend you to use [nvm](https://github.com/creationix/nvm) to manage
different versions of node.

**A minimal boilerplate is required, in order to provide you some
**A minimal phenomic-theme-base is required, in order to provide you some
flexibility.** But don't worry, a command will set it up for you.

## One command setup
Expand Down Expand Up @@ -51,7 +51,7 @@ mkdir $DIR && cd $DIR

### Get Phenomic

You will need to install Phenomic first, to generate the required boilerplate.
You will need to install Phenomic first, to generate the required phenomic-theme-base.
You can install Phenomic from npm to get latest stable version, or install
it from git to get latest bleeding edge updates.

Expand Down Expand Up @@ -87,7 +87,7 @@ npm install babel-cli babel-preset-react babel-preset-es2015 babel-preset-stage-
npm install https://github.com/MoOx/phenomic.git
```

### Setup boilerplate
### Setup phenomic-theme-base

**Notice:** This step will create (and overwrite) any existing ``package.json``.

Expand All @@ -98,7 +98,7 @@ npm install https://github.com/MoOx/phenomic.git
**⚠️ If you got errors here, please double check that you have required version of
Node and NPM specified at the top of this page.**

After you answer some questions, your boilerplate is ready.
After you answer some questions, your project is ready.

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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/usage/configuration/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ configuration to fit its requirements, but changes should not affect you.

One particular piece of the webpack configuration is important for Phenomic.
The section that defines the loader for ``.md`` files (or whatever you use)
is crucial (in the default boilerplate, it's the first loader) :
is crucial (in the phenomic-theme-base, it's the first loader) :

- it allows you to control what text engine to use
(default to Markdown using [remark](http://remark.js.org/)
Expand Down
Loading