1
0
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:
Rico Sta. Cruz 2017-09-30 18:23:26 +08:00
parent d12af4bd47
commit c0b6e13fa4
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
7 changed files with 2691 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ _output
_site
.jekyll-metadata
/node_modules
/assets/webpack

View File

@ -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
View File

@ -0,0 +1 @@
alert('hello')

View 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
View 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
View File

@ -0,0 +1 @@
module.exports = require('./_support/webpack.config.js')

2638
yarn.lock Normal file

File diff suppressed because it is too large Load Diff