Skip to content

Instantly share code, notes, and snippets.

@jplhomer
Last active February 13, 2017 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jplhomer/a6e718e4a982a0ae31b43fdf7b549677 to your computer and use it in GitHub Desktop.
Save jplhomer/a6e718e4a982a0ae31b43fdf7b549677 to your computer and use it in GitHub Desktop.
Using Laravel Mix for a standalone project
$favorite-color: green;
$pad: 1em;
#app {
background-color: $favorite-color;
h1 {
font-size: $pad * 5;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="public/css/app.css">
</head>
<body>
<div id="app">
<h1>Hello, there!</h1>
</div>
</body>
</html>
{
"private": true,
"scripts": {
"dev": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"laravel-mix": "^0.5.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment