Last active
February 15, 2017 13:10
-
-
Save zeknas/a217b501e3643c60cad712461314a5a0 to your computer and use it in GitHub Desktop.
hyperapp + jsx + webpack minimal boilerplate #tags: hyperapp
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
Show hidden characters
{ | |
"presets": ["es2015"], | |
"plugins": [ | |
[ | |
"transform-react-jsx", | |
{ | |
"pragma": "h" | |
} | |
] | |
] | |
} |
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
<!doctype html> | |
<html> | |
<body> | |
<script src="bundle.js"></script> | |
</body> | |
</html> |
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
import { h, app } from "hyperapp" | |
app({ | |
model: "Hi.", | |
view: model => <h1>{model}</h1> | |
}) |
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
{ | |
"name": "hyperapp-jsx-webpack-minimal-boilerplate", | |
"version": "0.0.0", | |
"description": "hyperapp + jsx + webpack minimal boilerplate", | |
"main": "index.js", | |
"dependencies": { | |
"hyperapp": "*" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.23.1", | |
"babel-loader": "^6.3.0", | |
"babel-plugin-transform-react-jsx": "^6.23.0", | |
"babel-preset-es2015": "^6.22.0", | |
"webpack": "^2.2.1" | |
}, | |
"scripts": { | |
"test": "exit 1", | |
"build": "webpack -p" | |
}, | |
"keywords": [ | |
"hyperapp" | |
], | |
"author": "Jorge Bucaran", | |
"license": "MIT" | |
} |
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
module.exports = { | |
entry: "./index.js", | |
output: { | |
path: "./", | |
filename: "bundle.js", | |
}, | |
module: { | |
loaders: [{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
loader: "babel-loader" | |
}] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment