Skip to content

Commit

Permalink
Update skate component example readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Jul 28, 2016
1 parent 5fcb0c8 commit b5583af
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
54 changes: 27 additions & 27 deletions examples/skate-component/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
# Skate Example

This document demonstrates the [skate][] compiler output.
This document demonstrates using the [skate][] compiler transform.

---


- [Compiler Options](#compiler-options)
- [Source Files](#source-files)
- [Markup](#markup)
- [Compiler Options](#compiler-options)- [Developer](#developer)
- [Markup](#markup)- [Developer](#developer)

---

### Compiler Options

```javascript
module.exports = {
files: [__dirname + '/components.html'],
transforms: ['trim', 'csp', 'skate', 'bundle'],
out: 'build',
force: true,
css: false,
html: false,
conf: {
transforms: {
csp: {
sha: 'sha256',
statics: true
},
bundle: {
js: ['../../node_modules/skatejs/dist/index-with-deps.js']
}
}
}
}
```

### Source Files

Component definition file:
Expand Down Expand Up @@ -114,30 +138,6 @@ Example component usage:
</html>
```

### Compiler Options

```javascript
module.exports = {
files: [__dirname + '/components.html'],
transforms: ['trim', 'csp', 'skate', 'bundle'],
out: 'build',
force: true,
css: false,
html: false,
conf: {
transforms: {
csp: {
sha: 'sha256',
statics: true
},
bundle: {
js: ['../../node_modules/skatejs/dist/index-with-deps.js']
}
}
}
}
```

## Developer

Developers that have configured the project can run `mk` and open `index.html` to see the rendered component, run `node server.js` and visit `http://localhost:3000` to serve over HTTP.
Expand Down
10 changes: 5 additions & 5 deletions examples/skate-component/example.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Skate Example

This document demonstrates the [skate][] compiler output.
This document demonstrates using the [skate][] compiler transform.

***
<!-- @toc -->
***

### Compiler Options

<? @source {javascript} options.js ?>

### Source Files

Component definition file:
Expand All @@ -18,10 +22,6 @@ Example component usage:

<? @source {html} index.html ?>

### Compiler Options

<? @source {javascript} options.js ?>

<? @exec mkdir -p build && node example.js ?>

## Developer
Expand Down
1 change: 0 additions & 1 deletion examples/skate-component/mkdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function doc(src, dest, opts, cb) {

// @task readme build the readme file
function readme(cb) {

doc(
'example.md', 'README.md',
{toc: {depth: 2, max: 3}}, cb);
Expand Down

0 comments on commit b5583af

Please sign in to comment.