Browse Source

fixed bugs

travis
Arwed Mett 5 years ago
parent
commit
d599c5f9a6
  1. 1
      .flowconfig
  2. 2
      flow/stub/raw-loader.js
  3. 2
      package-lock.json
  4. 9
      package.json
  5. 56
      package.json.bak
  6. 13
      src/app.js
  7. 7
      src/router.js
  8. 10
      src/runtime.js
  9. 4
      webpack.config.js

1
.flowconfig

@ -16,6 +16,7 @@ node_modules/styled-components/flow-typed/inline-style-prefixer_vx.x.x.js
[options]
module.name_mapper.extension='html' -> '<PROJECT_ROOT>/flow/stub/file-loader.js'
module.name_mapper.extension='ejs' -> '<PROJECT_ROOT>/flow/stub/raw-loader.js'
module.use_strict=true
munge_underscores=true
suppress_type=$FlowIssue

2
flow/stub/raw-loader.js

@ -0,0 +1,2 @@
//@flow
declare export default string;

2
package-lock.json

@ -1,5 +1,5 @@
{
"name": "homepage",
"name": "@arwed/homepage",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,

9
package.json

@ -1,8 +1,11 @@
{
"name": "homepage",
"name": "@arwed/homepage",
"version": "0.0.1",
"description": "My Homepage",
"main": "build/homepage.js",
"description": "My personal homepage",
"main": "build/index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "npm run lint && npm run flow && npm run mocha",
"start": "webpack-dev-server --env development",

56
package.json.bak

@ -0,0 +1,56 @@
{
"name": "homepage",
"version": "0.0.1",
"description": "My Homepage",
"main": "build/homepage.js",
"scripts": {
"test": "npm run lint && npm run flow && npm run mocha",
"start": "webpack-dev-server --env development",
"build": "webpack --env production",
"mocha": "mocha --compilers js:babel-register --timeout 100 --slow 30 --throw-deprecation --use_strict",
"clean": "rm -rf build",
"flow": "flow",
"lint": "eslint src",
"prepublish": "in-publish && npm run clean && npm run test && npm run build || not-in-publish"
},
"author": "Arwed Mett",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.22.1",
"babel-eslint": "^7.2.3",
"babel-loader": "^6.4.1",
"babel-plugin-inferno": "^3.2.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.22.0",
"babel-plugin-transform-flow-strip-types": "^6.21.0",
"babel-preset-es2016": "^6.22.0",
"babel-preset-latest": "^6.22.0",
"babel-preset-stage-0": "^6.22.0",
"copy-webpack-plugin": "^4.0.1",
"eslint": "^3.12.2",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-inferno": "^7.0.1",
"file-loader": "^0.11.2",
"flow": "^0.2.3",
"flow-bin": "^0.37.4",
"flow-typed": "^2.1.5",
"in-publish": "^2.0.0",
"jsdom": "^9.10.0",
"mocha": "^3.2.0",
"raw-loader": "^0.5.1",
"url-loader": "^0.5.9",
"webpack": "^2.7.0",
"webpack-dev-server": "^2.6.1"
},
"dependencies": {
"babel-polyfill": "^6.23.0",
"ejs": "^2.5.6",
"express": "^4.15.3",
"inferno": "^3.7.0",
"inferno-compat": "^3.7.0",
"inferno-router": "^3.7.0",
"inferno-server": "^3.7.0",
"react-fontawesome": "^1.6.1",
"styled-components": "^2.1.1"
}
}

13
src/app.js

@ -3,19 +3,6 @@ import Inferno from "inferno"
import { Header, Projects } from "./components"
import { Body, Section } from "./elements"
import { ThemeProvider } from "styled-components"
import { Dark } from "./themes"
//export default () => <ThemeProvider theme={ Dark }>
// <Body>
// <Header />
//
//
// </Body>
//</ThemeProvider>
// <Section title="My Projects">
// <Projects />
// </Section>
export default () => <Body>
<Header />

7
src/router.js

@ -1,9 +1,8 @@
//@flow
import express, { Router } from "express"
import Inferno from "inferno"
import InfernoServer from 'inferno-server'
import { ServerStyleSheet } from 'styled-components'
import styled from "styled-components"
import InfernoServer from "inferno-server"
import { ServerStyleSheet } from "styled-components"
import App from "./app"
import path from "path"
import ejs from "ejs"
@ -24,7 +23,7 @@ const indexPage = template({
style
})
router.get("/", (req, res, next) => {
router.get("/", (req, res) => {
res.send(indexPage)
})

10
src/runtime.js

@ -6,11 +6,15 @@ import Inferno from "inferno"
import { Router, IndexRoute } from "inferno-router"
import createBrowserHistory from "history/createBrowserHistory"
import App from "./app"
import { ThemeProvider } from "styled-components"
import { Dark } from "./themes"
const browserHistory = createBrowserHistory()
const routes = <Router history={ browserHistory }>
<IndexRoute component={ App } />
</Router>
const routes = <ThemeProvider theme={ Dark }>
<Router history={ browserHistory }>
<IndexRoute component={ App } />
</Router>
</ThemeProvider>
Inferno.render(routes, document.getElementById("content"))

4
webpack.config.js

@ -70,8 +70,8 @@ const index = () => Object.assign({ }, baseConfig, {
},
output: {
path: path.resolve("build"),
filename: "homepage.js",
sourceMapFilename: "homepage.map",
filename: "index.js",
sourceMapFilename: "index.map",
library: "homepage",
libraryTarget: "umd"
},

Loading…
Cancel
Save