Configuration to add mdl-ext npm package to Phoenix via brunch -


brunch / npm , phoenix confuses hell out of me. paucity of concrete examples doesn't help. maybe question can shed little light? here's config @ mo'

npm: {  enabled: true,  styles: {    'material-design-lite': ['dist/material.min.css'],    'mdl-ext': ['lib/mdl-ext.css']  },  globals: {    material: 'material-design-lite'  } } 

couple of questions. whilst mdl styles working i'm not sure if .js being pulled through. how check?

mdl-ext css getting pulled through again not sure js. not sure how check. feels bit secret sauce.

learnt more brunch , found solution.

the default brunch-configuraton.js configuration comes "jointo: "js/app.js" uncommented default. so, not contain regex include js files, , consequence includes of them

i needed these 2 lines in app.js file:

  import 'material-design-lite/material';   import 'mdl-ext'; 

things become little trickier when bundling multiple files e.g app.js , vendor.js. i'm still experimenting that.

https://github.com/phoenixframework/phoenix/issues/1495 https://github.com/phoenixframework/phoenix/issues/1813


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -