Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Add necessary dir structure and files for v3 release
  • Loading branch information
mxstbr committed Jan 7, 2016
1 parent 4580154 commit 8afd08c
Show file tree
Hide file tree
Showing 18 changed files with 112 additions and 87 deletions.
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,6 @@ The name and icon to be displayed are set in the `app/manifest.json` file. Chang

Delete [`manifest.json`](app/manifest.json) and remove the `<link rel="manifest" href="manifest.json">` tag from the [`index.html`](app/index.html).

## Gotchas

These are some things to be aware of when using this boilerplate.

### Images in the HTML file(s)

Adding images to the HTML is a bit of a pain right now as webpack only goes through the JavaScript file. Add the image to your HTML file how you always would:

```HTML
<!-- Normal Image -->
<img src="img/yourimg.png" />
<!-- Meta tags -->
<meta property="og:image" content="img/yourimg.png" />
<!-- ... -->
```

If you simply do this, webpack will not transfer the images to the build folder. To get webpack to transfer them, you have to import them with the file loader in your JavaScript somewhere, e.g.:

```JavaScript
import 'file?name=[name].[ext]!../img/yourimg.png';
```

Then webpack will correctly transfer the image to the build folder.

## License

This project is licensed under the MIT license, Copyright (c) 2015 Maximilian Stoiber. For more information see `LICENSE.md`.
37 changes: 0 additions & 37 deletions docs/CSS.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/JS.md

This file was deleted.

10 changes: 1 addition & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# Documentation

* [`commands.md`](COMMANDS.md): The commands you can run in the command line.

* [`css.md`](CSS.md): PostCSS plugins used, folder structure of the css folder.

* [`files.md`](FILES.md): The files in the root folder and what they're used for.

* [`js.md`](JS.md): The JavaScript folder structure explained.

* [`unit-testing.md`](unit-testing.md): A deeper look into unit testing.
**Add ToC of the documentation here as soon as it's finished**
5 changes: 5 additions & 0 deletions docs/css/css-modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CSS Modules

## Why?

## How?
25 changes: 25 additions & 0 deletions docs/css/postcss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# PostCSS

## Why?

## How?

## Which plugins?

This boilerplate includes a few plugins by default:

* `postcss-import`: Inlines `@import`ed stylesheets to create one big stylesheet.

* `postcss-simple-vars`: Makes it possible to use `$variables in your CSS.

* `postcss-focus`: Adds a `:focus` selector to every `:hover`.

* `autoprefixer-core`: Prefixes your CSS automatically, supporting the last two versions of all major browsers and IE 8 and up.

* `cssnano`: Optimizes your CSS file. For a full list of optimizations check [the offical website](http://cssnano.co/optimisations/).

* `postcss-reporter`: Makes warnings by the above plugins visible in the console.

For a full, searchable catalog of plugins go to [postcss.parts](http://postcss.parts).

## How to remove?
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/general/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Frequently Asked Questions

## Hot-reloading doesn't work?!
File renamed without changes.
23 changes: 23 additions & 0 deletions docs/general/gotchas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Gotchas

These are some things to be aware of when using this boilerplate.

## Images in the HTML file(s)

Adding images to the HTML is a bit of a pain right now as webpack only goes through the JavaScript file. Add the image to your HTML file how you always would:

```HTML
<!-- Normal Image -->
<img src="img/yourimg.png" />
<!-- Meta tags -->
<meta property="og:image" content="img/yourimg.png" />
<!-- ... -->
```

If you simply do this, webpack will not transfer the images to the build folder. To get webpack to transfer them, you have to import them with the file loader in your JavaScript somewhere, e.g.:

```JavaScript
import 'file?name=[name].[ext]!../img/yourimg.png';
```

Then webpack will correctly transfer the image to the build folder.
13 changes: 13 additions & 0 deletions docs/general/offline-first.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Offline first

## AppCache

### Remove AppCache

## ServiceWorker

### Remove ServiceWorker

## Add to homescreen

### Remove add to homescreen functionality
9 changes: 9 additions & 0 deletions docs/general/prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Prerequisites

## Node

### `npm`

## git

## Windows
1 change: 1 addition & 0 deletions docs/js/es6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ES6
23 changes: 23 additions & 0 deletions docs/js/react/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# React

## Components and containers

OLD VERSION:

> # `JS`
> ## Folder Structure
> The folder structure of the JS files reflects how [Redux](https://github.com/gaearon/redux) works. If you are not familiar with Redux check out the [official documentation](https://gaearon.github.io/redux/).
> * `actions`: Actions get dispatched with this/these utility module(s)
> * `components`: The main JS folder. All your React components should be in this folder, for big projects they might be grouped into seperate subfolders. E.g. a navigation component `Nav.react.js`
> * `/pages`: Actual pages (routes) users can visit.
> * `constants`: Action constants are defined in this/these utility module(s)
> * `reducers`: Reducers manage the state of an app, basically a simplified implementation of Stores in Flux. For an introduction to reducers, watch [this talk](https://www.youtube.com/watch?v=xsSnOQynTHs) by @gaearon.
> * `app.js`: The entry point of the application. Mostly setup and boilerplate code. Routes are configured in the JSX here!
3 changes: 3 additions & 0 deletions docs/js/react/redux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Redux

## `redux-thunk`
3 changes: 3 additions & 0 deletions docs/testing/browser-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Browser testing

## `npm run serve`
3 changes: 3 additions & 0 deletions docs/testing/component-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Component testing

## enzyme
File renamed without changes.

0 comments on commit 8afd08c

Please sign in to comment.