Semantic-UI-Meteor icon indicating copy to clipboard operation
Semantic-UI-Meteor copied to clipboard

Support Custom Packaged Themes

Open jlukic opened this issue 10 years ago • 5 comments
trafficstars

I've noticed that src/themes/ gets wiped on modifying custom.semantic.json. This prevents users from adding their own custom packaged themes.

Do you think it would be possible to support themes without cleaning the theme dir?

jlukic avatar Aug 27 '15 00:08 jlukic

@jlukic The reason why the package behaves this way is to delete themes that are being set to false after the generation.

Maybe a simple solution would be to not touch any generated folders. Or maybe just generate once! Otherwise, it will add complexity to the package to determine if the theme is part of semantic-ui.

flemay avatar Aug 27 '15 03:08 flemay

The basic workflow for using Semantic UI includes creating custom packaged themes. I just know with working from Meteor packages personally that I had my theme wiped by adjusting themes in semantic.json and lost a lot of work.

I would recommend as a solve allowing custom theme values in the themes array, which would allow someone with say "my-site" theme to add


  "themes": {
   "my-theme": true,
    "amazon": false,
    "basic": false,
    "bookish": false,
    "bootstrap3": false,
    "chubby": false,
    "classic": false,
    "colored": false,
    "default": true,
    "duo": false,
    "fixed": false,
    "flat": false,
    "github": true,
    "gmail": false,
    "instagram": false,
    "material": false,
    "pulsar": false,
    "raised": false,
    "resetcss": false,
    "round": false,
    "rtl": false,
    "striped": false,
    "timeline": false,
    "twitter": false
  }

To prevent the files from being removed.

I could also see this as a separate array "customThemes"

jlukic avatar Aug 27 '15 19:08 jlukic

Any update on this? I would like to use this technique in production :p @jlukic +1

fvpDev avatar Sep 15 '15 19:09 fvpDev

I'm hoping for a solve from @flemay.

I'm also currently working on a Semantic UI / Meteor project myself and might also consider contributing my own PR if support for packaged themes isnt added.

jlukic avatar Sep 16 '15 01:09 jlukic

@jlukic Sorry I haven't started to look at it yet. My schedule is tight at the moment. a PR is more than welcome. :)

flemay avatar Sep 17 '15 00:09 flemay