Skip to content

Commit

Permalink
Separate typings for node and browser (#10)
Browse files Browse the repository at this point in the history
* Separate typings for node and browser

* Prettify .ts and .tsx files
  • Loading branch information
frenzzy authored Jul 9, 2018
1 parent afe35a5 commit e8f1358
Show file tree
Hide file tree
Showing 24 changed files with 286 additions and 158 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": [
"airbnb",
"plugin:prettier/recommended"
"eslint-config-prettier",
"eslint-config-prettier/react"
],
"rules": {
"no-plusplus": "off",
Expand Down
9 changes: 1 addition & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve"
"arrowParens": "always"
}
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ before_install:
- npm install --global codecov

install:
- npm install --no-save
- npm install

script:
- npm run lint
- npm run test
- npm run test -- --coverage
- npm run build

after_success:
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
[![npm version](https://img.shields.io/npm/v/@hyperapp/render.svg)](https://www.npmjs.com/package/@hyperapp/render)
[![npm downloads](https://img.shields.io/npm/dw/@hyperapp/render.svg)](https://www.npmjs.com/package/@hyperapp/render)
[![library size](https://img.shields.io/bundlephobia/minzip/@hyperapp/render.svg)](https://bundlephobia.com/result?p=@hyperapp/render)
[![slack chat](https://hyperappjs.herokuapp.com/badge.svg)](https://hyperappjs.herokuapp.com "Join us")
[![slack chat](https://hyperappjs.herokuapp.com/badge.svg)](https://hyperappjs.herokuapp.com 'Join us')

A [Hyperapp](https://github.com/hyperapp/hyperapp) higher-order `app`
that allows you to render views to an HTML string.

* **User experience** — Generate HTML on the server and send the markup
- **User experience** — Generate HTML on the server and send the markup
down on the initial request for faster page loads. Built-in
[mounting](https://github.com/hyperapp/hyperapp/tree/1.2.0#mounting)
feature in Hyperapp is allowing you to have a very performant first-load experience.
* **Accessibility** — Allow search engines to crawl your pages for
- **Accessibility** — Allow search engines to crawl your pages for
[SEO](https://en.wikipedia.org/wiki/Search_engine_optimization) purposes.
* **Testability**[Check HTML validity](https://en.wikipedia.org/wiki/Validator) and use
- **Testability**[Check HTML validity](https://en.wikipedia.org/wiki/Validator) and use
[snapshot testing](https://facebook.github.io/jest/docs/en/snapshot-testing.html)
to improve quality of your software.

Expand Down Expand Up @@ -49,6 +49,9 @@ main.setText('World') // <= any sync or async action call
main.toString() // => <main><h1>World</h1><input value="World"/></main>
```

Looking for a boilerplate? Try [Hyperapp Starter](https://github.com/frenzzy/hyperapp-starter)
with pre-configured server-side rendering and many more.

## Installation

Using [npm](https://www.npmjs.com/package/@hyperapp/render):
Expand All @@ -70,7 +73,7 @@ You can find the library in `window.hyperappRender`.

We support all ES5-compliant browsers, including Internet Explorer 9 and above,
but depending on your target browsers you may need to include
[polyfills](https://en.wikipedia.org/wiki/Polyfill_(programming)) for
[polyfills](<https://en.wikipedia.org/wiki/Polyfill_(programming)>) for
[`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set),
[`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and
[`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
Expand Down
2 changes: 1 addition & 1 deletion dist/hyperapp-render.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/hyperapp-render.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8f1358

Please sign in to comment.