Skip to content

Commit

Permalink
Update complate-fractal settings, lint .jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
youngbrioche committed Nov 16, 2017
1 parent ec26912 commit 3556e24
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
5 changes: 2 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
public/js/bundle.js
/dist
/public
components/index.js
dist/
**/*.jsx
8 changes: 6 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "standard",
"extends": ["standard", "standard-jsx"],
"env": {
"node": true,
"es6": true,
Expand All @@ -9,5 +9,9 @@
"ecmaFeatures": {
"jsx": true
}
}
},
"plugins": ["react"],
"settings": {
"react": { "pragma": "createElement" }
}
}
32 changes: 16 additions & 16 deletions components/_preview.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { createElement } from "complate-stream";
import { createElement } from 'complate-stream'

export default function PreviewLayout(params, ...children) {
const stylesheetPath = params.context.app.uri("css/bundle.css");
export default function PreviewLayout ({ context }, ...children) {
const stylesheetPath = context.app.uri('css/bundle.css')

return <html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="/css/normalize.css" />
<link media="all" rel="stylesheet" href={stylesheetPath} />
<title>Preview Layout</title>
</head>
<body class="application">
{children}
</body>
<script src="/js/bundle.js"></script>
</html>;
return <html>
<head>
<meta charset='utf-8' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link rel='stylesheet' type='text/css' href='/css/normalize.css' />
<link media='all' rel='stylesheet' href={stylesheetPath} />
<title>Preview Layout</title>
</head>
<body class='application'>
{children}
</body>
<script src='/js/bundle.js' />
</html>
}

0 comments on commit 3556e24

Please sign in to comment.