mirror of
https://github.com/onkelbeh/cheatsheets.git
synced 2025-06-15 14:47:53 +02:00
Initial support for Webpack
This commit is contained in:
parent
d12af4bd47
commit
c0b6e13fa4
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ _output
|
||||
_site
|
||||
.jekyll-metadata
|
||||
/node_modules
|
||||
/assets/webpack
|
||||
|
@ -16,6 +16,11 @@ exclude:
|
||||
- Gemfile.lock
|
||||
- CNAME
|
||||
- vendor
|
||||
- package.json
|
||||
- .babelrc
|
||||
- yarn.lock
|
||||
- package-lock.json
|
||||
- webpack.config.js
|
||||
|
||||
# Markdown
|
||||
|
||||
|
1
_js/app.js
Normal file
1
_js/app.js
Normal file
@ -0,0 +1 @@
|
||||
alert('hello')
|
23
_support/webpack.config.js
Normal file
23
_support/webpack.config.js
Normal file
@ -0,0 +1,23 @@
|
||||
const join = require('path').resolve
|
||||
|
||||
module.exports = {
|
||||
context: join(__dirname, '..'),
|
||||
entry: {
|
||||
app: './_js/app.js'
|
||||
},
|
||||
output: {
|
||||
path: join(__dirname, '..', 'assets', 'webpack'),
|
||||
filename: '[name].js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{ loader: 'babel-loader' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
stats: 'minimal'
|
||||
}
|
22
package.json
Normal file
22
package.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "cheatsheets",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"repository": "https://github.com/rstacruz/cheatsheets.git",
|
||||
"author": "Rico Sta. Cruz <rstacruz@users.noreply.github.com>",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"babel-core": "6.26.0",
|
||||
"babel-loader": "7.1.2",
|
||||
"babel-preset-env": "1.6.0",
|
||||
"webpack": "3.6.0"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"env"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack --watch --progress --colors"
|
||||
}
|
||||
}
|
1
webpack.config.js
Normal file
1
webpack.config.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./_support/webpack.config.js')
|
Loading…
x
Reference in New Issue
Block a user