Last active
January 6, 2018 14:10
-
-
Save nulpatrol/12361baed992c4c4c18135b70f09c3ee to your computer and use it in GitHub Desktop.
Only front-end for SPA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "scripts": { | |
| "dev": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | |
| "watch": "NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | |
| "hot": "NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", | |
| "production": "NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir my-app && cd my-app | |
| npm init -y | |
| npm install laravel-mix --save-dev | |
| cp -r node_modules/laravel-mix/setup/webpack.mix.js ./ | |
| mkdir -p resources/assets/js && mkdir -p resources/assets/sass | |
| cd resources/assets/sass && touch app.js && cd ../js && touch app.scss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { mix } = require('laravel-mix'); | |
| mix.setPublicPath('public/'); | |
| mix.js('resources/assets/js/app.js', 'public/js') | |
| .sass('resources/assets/sass/app.scss', 'public/css') | |
| .version(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment