Created
October 11, 2022 09:50
-
-
Save tranchausky/748d5e3843b4156a8c64ceba473db58e to your computer and use it in GitHub Desktop.
laravel mix file css,js two run type command
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 Asset Management | |
| | https://laravel-mix.com/docs/6.0/what-is-mix | |
| |-------------------------------------------------------------------------- | |
| | npm install laravel-mix@latest --save-dev | |
| | npm run dev | |
| | npm run production | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Mix provides a clean, fluent API for defining some Webpack build steps | |
| | for your Laravel applications. By default, we are compiling the CSS | |
| | file for the application as well as bundling up all the JS files. | |
| | | |
| */ | |
| // mix.js('resources/js/app.js', 'public/js') | |
| // .postCss('resources/css/app.css', 'public/css', [ | |
| // // | |
| // ]); | |
| // mix.sass('resources/sass/app.sass', 'public/css'); | |
| // mix.postCss('public/static/mywebsite/css/app.scss', 'public/static/mywebsite/mini/app.css', [ | |
| // ]); | |
| // mix.config.fileLoaderDirs.fonts = 'static/mywebsite/fonts/'; | |
| mix.options({ | |
| fileLoaderDirs: { | |
| fonts: 'static/mywebsite/fonts', | |
| images: 'static/mywebsite/images' | |
| } | |
| }); | |
| mix.sass('public/static/mywebsite/css/bootstrap-4.3.1/scss/bootstrap.scss', 'public/static/mywebsite/mini/bootstrap.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/plugins/select2/scss/core.scss', 'public/static/mywebsite/mini/select2.css', [ | |
| ]); | |
| mix.combine([ | |
| 'public/static/mywebsite/mini/bootstrap.css', | |
| 'public/static/mywebsite/mini/select2.css' | |
| ], 'public/static/mywebsite/mini/core.css'); | |
| mix.sass('public/static/mywebsite/css/common.scss', 'public/static/mywebsite/mini/common.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/home.scss', 'public/static/mywebsite/mini/home.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/detail.scss', 'public/static/mywebsite/mini/detail.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/detail_description.scss', 'public/static/mywebsite/mini/detail_description.css', []); | |
| mix.sass('public/static/mywebsite/css/checkout.scss', 'public/static/mywebsite/mini/checkout.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/timetosale.scss', 'public/static/mywebsite/mini/timetosale.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/brake_drum.scss', 'public/static/mywebsite/mini/brake_drum.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/brake_pads.scss', 'public/static/mywebsite/mini/brake_pads.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/brake_sensor.scss', 'public/static/mywebsite/mini/brake_sensor.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/brake_shoes.scss', 'public/static/mywebsite/mini/brake_shoes.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/eline.scss', 'public/static/mywebsite/mini/eline.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/geomet.scss', 'public/static/mywebsite/mini/geomet.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/hardware_kits.scss', 'public/static/mywebsite/mini/hardware_kits.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/bbk.scss', 'public/static/mywebsite/mini/bbk.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/staticpages/bbk_interactive.scss', 'public/static/mywebsite/mini/bbk_interactive.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/thankyou.scss', 'public/static/mywebsite/mini/thankyou.css', [ | |
| ]); | |
| mix.sass('public/static/mywebsite/css/user.scss', 'public/static/mywebsite/mini/user.css', [ | |
| ]); | |
| // mix.js('public/static/mywebsite/js/common.js', 'public/static/mywebsite/mini/common.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
| { | |
| "private": true, | |
| "scripts": { | |
| "dev": "npm run development", | |
| "development": "mix", | |
| "watch": "mix watch", | |
| "watch-poll": "mix watch -- --watch-options-poll=1000", | |
| "hot": "mix watch --hot", | |
| "prod": "npm run production", | |
| "production": "mix --production", | |
| "admin-production": "mix --mix-config=webpack_admin.mix.js --production" | |
| }, | |
| "devDependencies": { | |
| "axios": "^0.21", | |
| "laravel-mix": "^6.0.49", | |
| "lodash": "^4.17.19", | |
| "postcss": "^8.1.14", | |
| "resolve-url-loader": "^5.0.0", | |
| "sass": "^1.50.1", | |
| "sass-loader": "^12.6.0" | |
| } | |
| } |
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 Asset Management | |
| | https://laravel-mix.com/docs/6.0/what-is-mix | |
| |-------------------------------------------------------------------------- | |
| | npm install laravel-mix@latest --save-dev | |
| | npm run dev | |
| | npm run production | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Mix provides a clean, fluent API for defining some Webpack build steps | |
| | for your Laravel applications. By default, we are compiling the CSS | |
| | file for the application as well as bundling up all the JS files. | |
| | | |
| */ | |
| mix.sass('resources/admin/scss/adminr1.scss', 'public/static/admin/css/adminr1.css', [ | |
| ]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment