webpack.mix.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. let mix = require('laravel-mix');
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Mix Asset Management
  5. |--------------------------------------------------------------------------
  6. |
  7. | Mix provides a clean, fluent API for defining some Webpack build steps
  8. | for your Laravel application. By default, we are compiling the Sass
  9. | file for the application as well as bundling up all the JS files.
  10. |
  11. */
  12. mix
  13. .styles(
  14. [
  15. 'node_modules/bootstrap/dist/css/bootstrap.css',
  16. 'node_modules/font-awesome/css/font-awesome.css',
  17. 'node_modules/ionicons/dist/css/ionicons.css',
  18. 'node_modules/select2/dist/css/select2.css',
  19. 'resources/assets/admin-lte/css/AdminLTE.min.css',
  20. 'resources/assets/admin-lte/css/skins/skin-purple.min.css',
  21. 'node_modules/datatables/media/css/jquery.dataTables.css',
  22. 'resources/assets/css/admin.css'
  23. ],
  24. 'public/css/admin.min.css'
  25. )
  26. .scripts(
  27. [
  28. 'resources/assets/js/jquery-2.2.3.min.js',
  29. 'node_modules/bootstrap/dist/js/bootstrap.js',
  30. 'node_modules/select2/dist/js/select2.js',
  31. 'node_modules/datatables/media/js/jquery.dataTables.js',
  32. 'resources/assets/admin-lte/js/app.js'
  33. ],
  34. 'public/js/admin.min.js'
  35. )
  36. .styles(
  37. [
  38. 'node_modules/bootstrap/dist/css/bootstrap.css',
  39. 'node_modules/font-awesome/css/font-awesome.css',
  40. 'node_modules/select2/dist/css/select2.css',
  41. 'resources/assets/css/drift-basic.min.css',
  42. 'resources/assets/css/front.css'
  43. ],
  44. 'public/css/style.min.css'
  45. )
  46. .scripts(
  47. [
  48. 'node_modules/bootstrap/dist/js/bootstrap.js',
  49. 'node_modules/select2/dist/js/select2.js',
  50. 'resources/assets/js/owl.carousel.min.js',
  51. 'resources/assets/js/Drift.min.js'
  52. ],
  53. 'public/js/front.min.js'
  54. )
  55. .copyDirectory('node_modules/datatables/media/images', 'public/images')
  56. .copyDirectory('node_modules/font-awesome/fonts', 'public/fonts')
  57. .copyDirectory('resources/assets/admin-lte/img', 'public/img')
  58. .copyDirectory('resources/assets/images', 'public/images')
  59. .copy('resources/assets/js/scripts.js', 'public/js/scripts.js')
  60. .copy('resources/assets/js/custom.js', 'public/js/custom.js');
  61. /*
  62. |-----------------------------------------------------------------------
  63. | BrowserSync
  64. |-----------------------------------------------------------------------
  65. |
  66. | BrowserSync refreshes the Browser if file changes (js, sass, blade.php) are
  67. | detected.
  68. | Proxy specifies the location from where the app is served.
  69. | For more information: https://browsersync.io/docs
  70. */
  71. mix.browserSync({
  72. proxy: 'http://localhost:8000',
  73. host: 'localhost',
  74. open: true,
  75. watchOptions: {
  76. usePolling: false
  77. },
  78. files: [
  79. 'app/**/*.php',
  80. 'resources/views/**/*.php',
  81. 'public/js/**/*.js',
  82. 'public/css/**/*.css',
  83. 'resources/docs/**/*.md'
  84. ]
  85. });