I hereby claim:
- I am pmallol on github.
- I am pmallol (https://keybase.io/pmallol) on keybase.
- I have a public key whose fingerprint is 16B3 2515 409C F3B1 9C10 6B84 25FE F17E FBDA 14FB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
... | |
"private": true, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "webpack --watch --color -d", | |
"build": "webpack --bail -p" | |
}, |
// Add this to a webpack.config.js file | |
const path = require('path'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
module.exports = { | |
mode: 'development', | |
entry: { | |
site: ['./source/javascripts/site.js'], | |
style: ['./source/stylesheets/site.css.scss'], | |
}, |
# Webpack | |
activate :external_pipeline, | |
name: :webpack, | |
command: build? ? | |
"./node_modules/webpack/bin/webpack.js --bail -p" : | |
"./node_modules/webpack/bin/webpack.js --watch -d --progress --color", | |
source: ".tmp/dist", | |
latency: 1 | |
# Dev environment |
<!doctype html> | |
<html> | |
<head> | |
... | |
<%= stylesheet_link_tag "style" %> | |
<%= javascript_include_tag "site.min" %> | |
</head> | |
... |
# Dockerfile | |
FROM ruby:2.6.3 | |
WORKDIR /app | |
RUN curl -sL https://deb.nodesource.com/setup_13.x -o nodesource_setup.sh && \ | |
bash nodesource_setup.sh && \ | |
apt install nodejs |
# docker-compose.yml | |
version: '3.7' | |
services: | |
web: | |
build: . | |
command: bundle exec middleman server | |
volumes: | |
- '.:/app' |
# Activate and configure extensions | |
# ... | |
# Livereload | |
activate :livereload, host: '0.0.0.0', port: '1234' | |
# config.rb | |
#... | |
# Build-specific configuration | |
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings | |
configure :build do | |
# Generate relative paths to the repo when deploying to GitHub Pages | |
config[:http_prefix] = '/middleman-webpack-demo' |
<!-- ../souce/about/index.html.erb --> | |
--- | |
title: About | |
--- | |
<h1> | |
Hi there! | |
</h1> |