How to enable semantics-ui fonts with gazebo and ember-cli

I want to use semantic-ui in an ember-cli project, having problems turning on fonts.

bower install semantic-ui

Import css and fonts to Brocfile.js

app.import('bower_components/semantic-ui/dist/semantic.css');
app.import('bower_components/semantic-ui/dist/semantic.js');

var semanticFonts = 
    pickFiles('bower_components/semantic-ui/dist/themes/default/assets/fonts', {
      srcDir: '/',
      files: ['**/*'],
      destDir: 'assets/themes/default/assets/fonts'
});

It works because it semantic.csssearches themes/default/assets/fontsfor itself.

Please note destDir: 'assets/themes/default/assets/fonts', this is because ember-cli puts semantic-cssin a folder assets/, and I have to put fonts in this folder. But this seems like a hack, is there a better solution?

Finally, the semantic-uidist folder does not contain various build options, I need to compile the project myself, for example: using gulp ?, I thought that using the gazebo should be simple.

+4
3

404 Semantic Bower. , Ember build.var

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

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    babel: {
      includePolyfill: true
    },
    fingerprint: {
      extensions: ['js', 'css', /*'png', 'jpg', 'gif',*/ 'map']
    }
  });

  app.import('bower_components/semantic/dist/semantic.css');
  app.import('vendor/shims.js');

  var semanticIcons = pickFiles('bower_components/semantic/dist/themes/default/assets/fonts', {
    srcDir: '/',
    destDir: '/assets/themes/default/assets/fonts'
  });

  return app.toTree([semanticIcons]);
};
+1

semantic-ui, gulp.

-, --save .

bower install --save semantic-ui

bower.json - --save-dev, , .

Semantic-ui , "LESS", , .

, -, Google, svg-.

, CSS, , - - /dist output.css .js -and- css pre - , . - .

, ember , ... - .

, . - , .:)

0

.

, , config/application.rb

config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components', 'semantic-ui', 'dist')

dist , , semantic-ui /, .

0

All Articles