-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Draft standalone manual (single page).
- Loading branch information
Showing
12 changed files
with
933 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,9 @@ | ||
# Developer | ||
|
||
Sources are ES6 code transpiled for `node@4.x` compatibility. | ||
|
||
Install [mkdoc][] `npm i -g mkdoc` and then install dependencies for all packages with `npm i && mk install`. | ||
|
||
You should now be able to use the scripts and tasks, list tasks with `mk --tasks`. | ||
|
||
It is a good idea to run the `build` task before tests; it is recommended that before pushing code the command `mk build test` is run. | ||
|
||
At the top-level you run the following commands for all packages: | ||
|
||
* `mk install` Install dependencies. | ||
* `mk test` Run tests. | ||
* `mk cover` Run code coverage. | ||
* `mk build` Compile sources. | ||
* `mk lint` Lint sources. | ||
* `mk docs` Build top-level documentation | ||
|
||
Build a coverage report for all packages with: | ||
|
||
``` | ||
mk cover && npm run report | ||
``` | ||
|
||
Note that tests are not included in the npm packages you should clone the repository to run the test suites. | ||
## Developer | ||
|
||
*** | ||
<!-- @toc --> | ||
*** | ||
|
||
## Scripts | ||
|
||
In the scope of a package the following scripts are available. | ||
|
||
### Build | ||
|
||
Convert the ES6 sources for a package: | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
### Test | ||
|
||
To run the test suite: | ||
|
||
``` | ||
npm test | ||
``` | ||
|
||
### Cover | ||
|
||
To generate code coverage: | ||
|
||
``` | ||
npm run cover | ||
``` | ||
|
||
### Lint | ||
|
||
Run the source tree through [jshint][] and [jscs][]: | ||
|
||
``` | ||
npm run lint | ||
``` | ||
|
||
### Clean | ||
|
||
Remove generated files: | ||
|
||
``` | ||
npm run clean | ||
``` | ||
|
||
### Docs | ||
|
||
To build all documentation files: | ||
|
||
``` | ||
mk docs | ||
``` | ||
|
||
### Readme | ||
|
||
To build the readme file: | ||
|
||
``` | ||
mk readme | ||
``` | ||
<? @include include/developer.md ?> | ||
|
||
<? @include links.md ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
Sources are ES6 code transpiled for `node@4.x` compatibility. | ||
|
||
Install [mkdoc][] `npm i -g mkdoc` and then install dependencies for all packages with `npm i && mk install`. | ||
|
||
You should now be able to use the scripts and tasks, list tasks with `mk --tasks`. | ||
|
||
It is a good idea to run the `build` task before tests; it is recommended that before pushing code the command `mk build test` is run. | ||
|
||
At the top-level you run the following commands for all packages: | ||
|
||
* `mk install` Install dependencies. | ||
* `mk test` Run tests. | ||
* `mk cover` Run code coverage. | ||
* `mk build` Compile sources. | ||
* `mk lint` Lint sources. | ||
* `mk docs` Build top-level documentation | ||
|
||
Build a coverage report for all packages with: | ||
|
||
``` | ||
mk cover && npm run report | ||
``` | ||
|
||
Note that tests are not included in the npm packages you should clone the repository to run the test suites. | ||
|
||
### Scripts | ||
|
||
In the scope of a package the following scripts are available. | ||
|
||
#### Build | ||
|
||
Convert the ES6 sources for a package: | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
#### Test | ||
|
||
To run the test suite: | ||
|
||
``` | ||
npm test | ||
``` | ||
|
||
#### Cover | ||
|
||
To generate code coverage: | ||
|
||
``` | ||
npm run cover | ||
``` | ||
|
||
#### Lint | ||
|
||
Run the source tree through [jshint][] and [jscs][]: | ||
|
||
``` | ||
npm run lint | ||
``` | ||
|
||
#### Clean | ||
|
||
Remove generated files: | ||
|
||
``` | ||
npm run clean | ||
``` | ||
|
||
#### Docs | ||
|
||
To build all documentation files: | ||
|
||
``` | ||
mk docs | ||
``` | ||
|
||
#### Readme | ||
|
||
To build the readme file: | ||
|
||
``` | ||
mk readme | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[Web components][webcomponents] are a collection of emerging standards that allow developers to create re-usable custom user interface elements. | ||
|
||
The web components specifications are: | ||
|
||
* [Shadow DOM][shadow-dom] | ||
* [Custom Elements][custom-elements] | ||
* [HTML Imports][html-imports] | ||
* [HTML Templates][html-templates] | ||
|
||
At the time of writing very few browsers support all of these emerging standards so polyfills are required. | ||
|
||
There are several problems with the state of the current frameworks. | ||
|
||
### Polymer | ||
|
||
The [polymer project][polymer] has a large suite of components but these components are all defined using inline scripts and inline styles which is very convenient from an authoring point of view (component encapsulation) but has issues when you need a strict [content security policy][csp] that disables inline styles and scripts. | ||
|
||
### Skate | ||
|
||
The [skatejs][] project has a very efficient design using a virtual dom that incrementally renders component view changes. It is the smallest of the frameworks and because it does not depend upon [HTML Templates][html-templates] or [HTML Imports][html-imports] a component can be created using javascript and css but this makes it difficult to easily encapsulate a component definition into a single file. | ||
|
||
### React | ||
|
||
The [react framework][react] is [not tracking the webcomponents standards][react-webcomponents] and therefore for those that prefer to use web standards it's not really an option. But you can compile [skatejs][] component definitions to react components using the [react integration][react-integration] module. | ||
|
||
### Trucks | ||
|
||
The [trucks][] library aims to bring component encapsulation to [skatejs][] and allow [polymer][] component definitions to be compiled to bypass the [content security policy][csp] problem. | ||
|
||
Another benefit of this library is that it converts [HTML Imports][html-imports] to *compile time only* which is important as [Mozilla will not ship HTML Imports][mozilla-webcomponents], one less polyfill! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,9 @@ | ||
## Introduction | ||
|
||
[Web components][webcomponents] are a collection of emerging standards that allow developers to create re-usable custom user interface elements. | ||
|
||
The web components specifications are: | ||
|
||
* [Shadow DOM][shadow-dom] | ||
* [Custom Elements][custom-elements] | ||
* [HTML Imports][html-imports] | ||
* [HTML Templates][html-templates] | ||
|
||
At the time of writing very few browsers support all of these emerging standards so polyfills are required. | ||
|
||
There are several problems with the state of the current frameworks. | ||
|
||
*** | ||
<!-- @toc --> | ||
*** | ||
|
||
### Polymer | ||
|
||
The [polymer project][polymer] has a large suite of components but these components are all defined using inline scripts and inline styles which is very convenient from an authoring point of view (component encapsulation) but has issues when you need a strict [content security policy][csp] that disables inline styles and scripts. | ||
|
||
### Skate | ||
|
||
The [skatejs][] project has a very efficient design using a virtual dom that incrementally renders component view changes. It is the smallest of the frameworks and because it does not depend upon [HTML Templates][html-templates] or [HTML Imports][html-imports] a component can be created using javascript and css but this makes it difficult to easily encapsulate a component definition into a single file. | ||
|
||
### React | ||
|
||
The [react framework][react] is [not tracking the webcomponents standards][react-webcomponents] and therefore for those that prefer to use web standards it's not really an option. But you can compile [skatejs][] component definitions to react components using the [react integration][react-integration] module. | ||
|
||
### Trucks | ||
|
||
The [trucks][] library aims to bring component encapsulation to [skatejs][] and allow [polymer][] component definitions to be compiled to bypass the [content security policy][csp] problem. | ||
|
||
Another benefit of this library is that it converts [HTML Imports][html-imports] to *compile time only* which is important as [Mozilla will not ship HTML Imports][mozilla-webcomponents], one less polyfill! | ||
<? @include include/introduction.md ?> | ||
|
||
<? @include links.md ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Manual | ||
|
||
*** | ||
<!-- @toc --> | ||
*** | ||
|
||
## Introduction | ||
|
||
<? @include include/introduction.md ?> | ||
|
||
## Components | ||
|
||
<? @include include/components.md ?> | ||
|
||
## Plugins | ||
|
||
<? @include include/plugins.md ?> | ||
|
||
## Protocols | ||
|
||
<? @include include/protocols.md ?> | ||
|
||
## Transforms | ||
|
||
<? @include include/transforms.md ?> | ||
|
||
## Developer | ||
|
||
<? @include include/developer.md ?> | ||
|
||
<? @include links.md ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.