├── resources
├── js
│ └── app.js
└── sass
│ └── app.scss
├── public
├── .gitignore
├── css
│ └── .gitignore
└── js
│ └── .gitignore
├── .gitignore
├── README.md
├── webpack.mix.js
├── composer.json
├── index.php
├── package.json
├── mix.php
└── composer.lock
/resources/js/app.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/.gitignore:
--------------------------------------------------------------------------------
1 | !css
2 | !js
3 |
--------------------------------------------------------------------------------
/public/css/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/public/js/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | mix-manifest.json
2 |
3 | /vendor/
4 | hot
5 |
--------------------------------------------------------------------------------
/resources/sass/app.scss:
--------------------------------------------------------------------------------
1 | body {
2 | background: red;
3 | font-size: 14px;
4 | }
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Using Laravel Mix without Laravel
2 | This repository contains a sample project from [the article at Sitepoint](https://www.sitepoint.com/use-laravel-mix-non-laravel-projects/)
3 |
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | const {mix} = require('laravel-mix');
2 |
3 | mix.js('resources/js/app.js', 'public/js')
4 | .sass('resources/sass/app.scss', 'public/css')
5 | .version()
6 | .browserSync();
7 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lasserafn/sample-project",
3 | "authors": [
4 | {
5 | "name": "Lasse Rafn",
6 | "email": "lasserafn@gmail.com"
7 | }
8 | ],
9 |
10 |
11 | "autoload": {
12 | "files": ["mix.php"]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 | Demo
9 |
10 |
11 |
12 |
13 | Hello world.
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sample-project",
3 | "version": "1.0.0",
4 | "description": "",
5 | "scripts": {
6 | "dev": "node node_modules/cross-env/dist/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",
7 | "watch": "node node_modules/cross-env/dist/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",
8 | "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "production": "node node_modules/cross-env/dist/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"
10 | },
11 | "main": "index.js",
12 | "author": "",
13 | "license": "ISC",
14 | "dependencies": {
15 | "cross-env": "^3.2.3",
16 | "laravel-mix": "^0.8.8",
17 | "node-sass": "^4.5.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/mix.php:
--------------------------------------------------------------------------------
1 | =5.3.2"
25 | },
26 | "require-dev": {
27 | "phpunit/phpunit": "4.*"
28 | },
29 | "type": "library",
30 | "extra": {
31 | "branch-alias": {
32 | "dev-master": "1.1.x-dev"
33 | }
34 | },
35 | "autoload": {
36 | "psr-0": {
37 | "Doctrine\\Common\\Inflector\\": "lib/"
38 | }
39 | },
40 | "notification-url": "https://packagist.org/downloads/",
41 | "license": [
42 | "MIT"
43 | ],
44 | "authors": [
45 | {
46 | "name": "Roman Borschel",
47 | "email": "roman@code-factory.org"
48 | },
49 | {
50 | "name": "Benjamin Eberlei",
51 | "email": "kontakt@beberlei.de"
52 | },
53 | {
54 | "name": "Guilherme Blanco",
55 | "email": "guilhermeblanco@gmail.com"
56 | },
57 | {
58 | "name": "Jonathan Wage",
59 | "email": "jonwage@gmail.com"
60 | },
61 | {
62 | "name": "Johannes Schmitt",
63 | "email": "schmittjoh@gmail.com"
64 | }
65 | ],
66 | "description": "Common String Manipulations with regard to casing and singular/plural rules.",
67 | "homepage": "http://www.doctrine-project.org",
68 | "keywords": [
69 | "inflection",
70 | "pluralize",
71 | "singularize",
72 | "string"
73 | ],
74 | "time": "2015-11-06T14:35:42+00:00"
75 | },
76 | {
77 | "name": "illuminate/contracts",
78 | "version": "v5.4.13",
79 | "source": {
80 | "type": "git",
81 | "url": "https://github.com/illuminate/contracts.git",
82 | "reference": "dd256891c80fd94a58ab83d7989d6da2f50e30ea"
83 | },
84 | "dist": {
85 | "type": "zip",
86 | "url": "https://api.github.com/repos/illuminate/contracts/zipball/dd256891c80fd94a58ab83d7989d6da2f50e30ea",
87 | "reference": "dd256891c80fd94a58ab83d7989d6da2f50e30ea",
88 | "shasum": ""
89 | },
90 | "require": {
91 | "php": ">=5.6.4"
92 | },
93 | "type": "library",
94 | "extra": {
95 | "branch-alias": {
96 | "dev-master": "5.4-dev"
97 | }
98 | },
99 | "autoload": {
100 | "psr-4": {
101 | "Illuminate\\Contracts\\": ""
102 | }
103 | },
104 | "notification-url": "https://packagist.org/downloads/",
105 | "license": [
106 | "MIT"
107 | ],
108 | "authors": [
109 | {
110 | "name": "Taylor Otwell",
111 | "email": "taylor@laravel.com"
112 | }
113 | ],
114 | "description": "The Illuminate Contracts package.",
115 | "homepage": "https://laravel.com",
116 | "time": "2017-02-21T14:21:59+00:00"
117 | },
118 | {
119 | "name": "illuminate/support",
120 | "version": "v5.4.13",
121 | "source": {
122 | "type": "git",
123 | "url": "https://github.com/illuminate/support.git",
124 | "reference": "904f63003fd67ede2ec3be018b322d1c29415465"
125 | },
126 | "dist": {
127 | "type": "zip",
128 | "url": "https://api.github.com/repos/illuminate/support/zipball/904f63003fd67ede2ec3be018b322d1c29415465",
129 | "reference": "904f63003fd67ede2ec3be018b322d1c29415465",
130 | "shasum": ""
131 | },
132 | "require": {
133 | "doctrine/inflector": "~1.0",
134 | "ext-mbstring": "*",
135 | "illuminate/contracts": "5.4.*",
136 | "paragonie/random_compat": "~1.4|~2.0",
137 | "php": ">=5.6.4"
138 | },
139 | "replace": {
140 | "tightenco/collect": "self.version"
141 | },
142 | "suggest": {
143 | "illuminate/filesystem": "Required to use the composer class (5.2.*).",
144 | "symfony/process": "Required to use the composer class (~3.2).",
145 | "symfony/var-dumper": "Required to use the dd function (~3.2)."
146 | },
147 | "type": "library",
148 | "extra": {
149 | "branch-alias": {
150 | "dev-master": "5.4-dev"
151 | }
152 | },
153 | "autoload": {
154 | "psr-4": {
155 | "Illuminate\\Support\\": ""
156 | },
157 | "files": [
158 | "helpers.php"
159 | ]
160 | },
161 | "notification-url": "https://packagist.org/downloads/",
162 | "license": [
163 | "MIT"
164 | ],
165 | "authors": [
166 | {
167 | "name": "Taylor Otwell",
168 | "email": "taylor@laravel.com"
169 | }
170 | ],
171 | "description": "The Illuminate Support package.",
172 | "homepage": "https://laravel.com",
173 | "time": "2017-02-15T19:29:24+00:00"
174 | },
175 | {
176 | "name": "paragonie/random_compat",
177 | "version": "v2.0.9",
178 | "source": {
179 | "type": "git",
180 | "url": "https://github.com/paragonie/random_compat.git",
181 | "reference": "6968531206671f94377b01dc7888d5d1b858a01b"
182 | },
183 | "dist": {
184 | "type": "zip",
185 | "url": "https://api.github.com/repos/paragonie/random_compat/zipball/6968531206671f94377b01dc7888d5d1b858a01b",
186 | "reference": "6968531206671f94377b01dc7888d5d1b858a01b",
187 | "shasum": ""
188 | },
189 | "require": {
190 | "php": ">=5.2.0"
191 | },
192 | "require-dev": {
193 | "phpunit/phpunit": "4.*|5.*"
194 | },
195 | "suggest": {
196 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
197 | },
198 | "type": "library",
199 | "autoload": {
200 | "files": [
201 | "lib/random.php"
202 | ]
203 | },
204 | "notification-url": "https://packagist.org/downloads/",
205 | "license": [
206 | "MIT"
207 | ],
208 | "authors": [
209 | {
210 | "name": "Paragon Initiative Enterprises",
211 | "email": "security@paragonie.com",
212 | "homepage": "https://paragonie.com"
213 | }
214 | ],
215 | "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
216 | "keywords": [
217 | "csprng",
218 | "pseudorandom",
219 | "random"
220 | ],
221 | "time": "2017-03-03T20:43:42+00:00"
222 | }
223 | ],
224 | "packages-dev": [],
225 | "aliases": [],
226 | "minimum-stability": "stable",
227 | "stability-flags": [],
228 | "prefer-stable": false,
229 | "prefer-lowest": false,
230 | "platform": [],
231 | "platform-dev": []
232 | }
233 |
--------------------------------------------------------------------------------