webpack.mix.js 2.06 KB
Newer Older
1
let mix = require("laravel-mix");
Dominik Hebeler's avatar
Dominik Hebeler committed
2 3 4 5 6 7 8 9 10 11 12 13

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

14
mix
15
  // css
16
  .less("resources/assets/less/default.less", "public/css/themes/default.css", {
17 18
    strictMath: true
  })
19 20 21 22 23 24 25 26
  .less(
    "resources/assets/less/metager/beitritt.less",
    "public/css/beitritt.css",
    {
      strictMath: true
    }
  )
  .less("resources/assets/less/utility.less", "public/css/utility.css", {
27 28
    strictMath: true
  })
Dominik Hebeler's avatar
Dominik Hebeler committed
29
  // js
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
  .babel(
    [
      "resources/assets/js/lib/jquery.js",
      "resources/assets/js/lib/jquery-ui.min.js",
      "resources/assets/js/lib/bootstrap.js",
      "resources/assets/js/lib/iframeResizer.min.js",
      "resources/assets/js/lib/md5.js"
    ],
    "public/js/lib.js"
  )
  .babel(
    [
      "resources/assets/js/scriptStartPage.js",
      "resources/assets/js/result-saver.js"
    ],
    "public/js/scriptStartPage.js"
  )
  .babel(
    [
      "resources/assets/js/scriptResultPage.js",
      "resources/assets/js/result-saver.js",
      "resources/assets/js/translations.js"
    ],
    "public/js/scriptResultPage.js"
  )
  .babel("resources/assets/js/searchbar.js", "public/js/searchbar.js")
  .babel("resources/assets/js/focus-creator.js", "public/js/focus-creator.js")
  .babel("resources/assets/js/focus-creator.js", "public/js/focus-creator.js")
  .babel("resources/assets/js/editLanguage.js", "public/js/editLanguage.js")
Dominik Hebeler's avatar
Dominik Hebeler committed
59
  // utility
60 61 62 63 64 65
  .babel(
    ["resources/assets/js/utility.js", "resources/assets/js/translations.js"],
    "public/js/utility.js"
  )
  .babel("resources/assets/js/widgets.js", "public/js/widgets.js")
  .babel("resources/assets/js/scriptJoinPage.js", "public/js/scriptJoinPage.js")
66
  // source maps
67
  .sourceMaps(false, "inline-source-map")
68
  // versioning
69
  .version();