webpack.mix.js 2.54 KB
Newer Older
1
let mix = require("laravel-mix");
Dominik Hebeler's avatar
Dominik Hebeler committed
2

Karl Hasselbring's avatar
Karl Hasselbring committed
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 16 17 18 19
  /*
  @import "./font-awesome/fontawesome.less";
  @import "./font-awesome/solid.less";
  @import "./bootstrap/bootstrap.less";
  */
20
  // css
Karl Hasselbring's avatar
Karl Hasselbring committed
21
  .less("resources/assets/less/default.less", "public/css/themes/default.css", {
22 23
    strictMath: true
  })
24 25 26 27 28 29 30 31 32
  .less("resources/assets/less/font-awesome/fontawesome.less", "public/css/fontawesome.css", {
    strictMath: true
  })
  .less("resources/assets/less/font-awesome/solid.less", "public/css/fontawesome-solid.css", {
    strictMath: true
  })
  .less("resources/assets/less/bootstrap/bootstrap.less", "public/css/bootstrap.css", {
    strictMath: true
  })
33 34
  .less(
    "resources/assets/less/metager/beitritt.less",
35
    "public/css/beitritt.css", {
36 37 38 39
      strictMath: true
    }
  )
  .less("resources/assets/less/utility.less", "public/css/utility.css", {
40 41
    strictMath: true
  })
Dominik Hebeler's avatar
Dominik Hebeler committed
42
  // js
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
  .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
72
  // utility
73 74 75 76 77 78
  .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")
79
  // source maps
80
  .sourceMaps(false, "inline-source-map")
81
  // versioning
82
  .version();