Last active
January 6, 2017 20:56
-
-
Save cezarsmpio/f75ac0878994135c168432732dc560e7 to your computer and use it in GitHub Desktop.
Monkberry boilerplate
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
{ | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"dev": "webpack-dev-server --config webpack.dev.js" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.14.0", | |
"babel-loader": "^6.2.5", | |
"babel-preset-es2015": "^6.14.0", | |
"html-webpack-plugin": "^2.22.0", | |
"monkberry-events": "^4.0.7", | |
"monkberry-loader": "^4.0.7", | |
"webpack": "^1.13.2", | |
"webpack-dev-server": "^1.15.1" | |
}, | |
"dependencies": { | |
"director": "^1.2.8", | |
"lodash": "^4.15.0", | |
"monkberry": "^4.0.7", | |
"redux": "^3.6.0" | |
} | |
} |
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
. | |
├── app | |
│ ├── actions | |
│ ├── app.js | |
│ ├── components | |
│ │ ├── index.js | |
│ │ └── recuperarSenha.js | |
│ ├── index.html | |
│ ├── reducers | |
│ ├── routes | |
│ ├── stores | |
│ └── views | |
│ ├── app.monk | |
│ ├── dashboard | |
│ │ ├── conteudo | |
│ │ │ ├── edit-post.monk | |
│ │ │ ├── index.monk | |
│ │ │ └── new-post.monk | |
│ │ ├── notificacoes | |
│ │ └── usuarios | |
│ ├── index.monk | |
│ └── recuperar-senha.monk | |
├── dist | |
│ ├── index.html | |
│ └── js | |
│ ├── app.js | |
│ └── app.js.map | |
├── package.json | |
└── webpack.dev.js |
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
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const paths = { | |
app: path.resolve(__dirname, 'app'), | |
appJs: path.resolve(__dirname, 'app/app.js'), | |
dist: path.resolve(__dirname, 'dist'), | |
actions: path.resolve(__dirname, 'app/actions'), | |
routes: path.resolve(__dirname, 'app/routes'), | |
stores: path.resolve(__dirname, 'app/stores'), | |
views: path.resolve(__dirname, 'app/views'), | |
reducers: path.resolve(__dirname, 'app/reducers') | |
}; | |
module.exports = { | |
devtool: 'source-map', | |
entry: paths.appJs, | |
output: { | |
path: paths.dist, | |
filename: 'js/app.js' | |
}, | |
devServer: { | |
contentBase: paths.dist, | |
open: true, | |
inline: true, | |
colors: true, | |
progress: true | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.monk$/, | |
loader: 'monkberry-loader' | |
}, | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules|bower_components)/, | |
loader: 'babel', | |
include: [paths.app], | |
query: { | |
presets: ['es2015'] | |
} | |
} | |
] | |
}, | |
plugins: [ | |
new HtmlWebpackPlugin({ | |
template: path.join(__dirname, 'app/index.html') | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment