lundi 14 décembre 2015

Using materialize css with ember-cli

I'd like to import materialize's files (installed via bower) in my ember-cli project; I've tried almost all I've found googling around but I'm still not able to make it work;

materialize is in bower_components/materialize directory;

What I'm doing now is: inside styles/app.scss

@import "bower_components/materialize/sass/materialize";

inside ember-cli-build.js

var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var pickFiles = require('broccoli-static-compiler');

module.exports = function(defaults) {
    var app = new EmberApp(defaults, {

    });


    var materializeFonts = pickFiles('bower_components/materialize/font/roboto', {
        srcDir: '/',
        destDir: '/font/roboto'
    });


    return app.toTree([materializeFonts]);
};

Once I start with "ember server" I still get the errors in console 404 not found for roboto fonts;

Also I can't understand how to import the materialize's js;

can someone explain to me how to get rid of this? (I've seen a package called ember-cli-materialize, but I'd like to understand how to make this work manually, since this can be helpful also with other libraries).




Aucun commentaire:

Enregistrer un commentaire