Advertisement
mithereal

brunch-config.js

May 17th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 3.49 KB | None | 0 0
  1. exports.config = {
  2.   // See http://brunch.io/#documentation for docs.
  3.   files: {
  4.     javascripts: {
  5.         joinTo: {
  6.          "js/front.js": /^(web\/static\/customer\/js)|(node_modules)/,
  7.          "js/agent.js": /^(web\/static\/agent\/js)|(node_modules)/,
  8.          "js/admin.js": /^(web\/static\/admin\/js)|(node_modules)/,
  9.          "js/ex_admin_common.js": ["web/static/vendor/ex_admin_common.js"],
  10.          "js/admin_lte2.js": ["web/static/vendor/admin_lte2.js"],
  11.          "js/admin_vendor.js": /^(web\/static\/admin\/vendor).*/,
  12.          "js/front_vendor.js": /^(web\/static\/customer\/vendor).*/,
  13.          "js/agent_vendor.js": /^(web\/static\/agent\/vendor).*/,
  14.          "js/jquery.min.js":  ["web/static/vendor/jquery.min.js"],
  15.          "js/fullcalendar.min.js":  ["web/static/vendor/fullcalendar.min.js"],
  16.          "js/moment.js":  ["web/static/vendor/moment.js"],
  17.          "js/phoenix.js":  ["web/static/vendor/phoenix.js"],
  18.          "js/vue.js":  ["web/static/vendor/vue.js"],
  19.  
  20.         }
  21.  
  22.     },
  23.     stylesheets: {
  24.         joinTo: {
  25.         "css/main.css": /^(web\/static\/css)/,
  26.         "css/customer/app.css": /^(web\/static\/customer\/css)/,
  27.         "css/customer/vendor.css": /^(web\/static\/customer\/vendor).*/,
  28.         "css/agent/app.css": /^(web\/static\/agent\/css)/,
  29.         "css/agent/vendor.css": /^(web\/static\/agent\/vendor).*/,
  30.         "css/admin/app.css": /^(web\/static\/admin\/css)/,
  31.         "css/admin/vendor.css": /^(web\/static\/admin\/vendor).*/,
  32.         "css/vendor.css": /^(web\/static\/css\/vendor).*/,
  33.         "css/admin_lte2.css": ["web/static/vendor/admin_lte2.css"],
  34.         "css/active_admin.css.css": ["web/static/vendor/active_admin.css.css"],
  35.       },
  36.       order: {
  37.         after: ["web/static/css/main.css"] // concat app.css last
  38.       }
  39.     },
  40.     templates: {
  41.       joinTo: "js/App.js"
  42.     }
  43.   },
  44.  
  45.   conventions: {
  46.     // This option sets where we should place non-css and non-js assets in.
  47.     // By default, we set this to "/web/static/assets". Files in this directory
  48.     // will be copied to `paths.public`, which is "priv/static" by default.
  49.     assets: /^(web\/static\/assets)/
  50.   },
  51.  
  52.   // Phoenix paths configuration
  53.   paths: {
  54.     // Dependencies and current project directories to watch
  55.     watched: [
  56.       "web/static",
  57.       "test/static"
  58.     ],
  59.  
  60.     // Where to compile files to
  61.     public: "priv/static"
  62.   },
  63.  
  64.   // Configure your plugins
  65.   plugins: {
  66.     babel: {
  67.       // Do not use ES6 compiler in vendor code
  68.         ignore: [
  69.             /(web\/static\/vendor)|node_modules/,
  70.             /(web\/customer\/templates\/partials)/
  71.         ]
  72.  
  73.     },
  74.       copycat: {
  75.           // copies to priv/static/*
  76.           "fonts": ["node_modules/bootstrap-sass/assets/fonts/bootstrap"],
  77.           "fonts": ["node_modules/font-awesome/fonts"]
  78.  
  79.       },
  80.  
  81.       vue: {
  82.           extractCSS: true,
  83.           out: 'priv/static/css/components.css'
  84.       }
  85.   },
  86.  
  87.  
  88.  
  89.   modules: {
  90.     autoRequire: {
  91.       "js/front.js": ["web/static/customer/js/app"],
  92.       "js/admin.js": ["web/static/admin/js/admin"],
  93.       "js/agent.js": ["web/static/agent/js/agent"],
  94.     }
  95.   },
  96.  
  97.     npm: {
  98.     globals: {
  99.         $: 'jquery',
  100.         jQuery: 'jquery',
  101.         bootstrap: 'bootstrap',
  102.         vue: 'vue/dist/vue.common.js'
  103.     },
  104.         enabled: true,
  105.  
  106.         whitelist: ["phoenix", "phoenix_html", "vue"],
  107.  
  108.         styles: {
  109.             'normalize.css': ['node_modules/normalize.css/normalize.css']
  110.         }
  111.         }
  112. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement