Custom 'themes' compilation possible using brunch?

Deep

I am trying to figure out how I can accomplish the following using brunch. This is the current directory structure for our app:

--app
    --base (theme folder, considered the master for all themes)
        --sass
        --js
    --theme2
        --sass
        --js
    --theme3
        --sass
        --js
...so on

The base folder serves as a master for all other themes. However, if another theme has a file in the sass directory or js directory that matches one in the base folder it overrides that file in the base folder (this applies for imports as well).

I have so far created this which works the way it needs to but it circumvents the brunch pipeline in that I write out the files (doesn't currently support file concatenation) and I would prefer to do this using the proper brunch pipline.

What happens is that each sass or js file it encounters in the base folder is used to generate a new file for another theme. E.g say the base theme has a file called main.scss. The path passed to compile is base/scss/main.scss. Now I want to use this same file for the other themes so I get all the theme folders and dynamically use this base main.scss file for each of the other themes. However, I also alter the inner imports to substitute files imports if they exist in the other themes directory. Its not the same file being spat into multiple locations.

The problem is that I want to dynamically generate new CSS files for brunch to render to different folders not related to the original path passed in (and thus the joinTo config option for this path). By calling the callback, it automatically uses the original path parameter passed to the compile method.

es128

Use overrides in your brunch-config to change your joinTos to include base plus the given theme. You can also customize the build output directory or anything else for each theme if that helps. Then run each build separately using a command like brunch build --env theme1.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Is it possible to add custom routes during compilation passes?

From Dev

Using custom bootstrap3 themes with Meteor.js

From Dev

Custom themes and colors in android

From Dev

Python Tkinter custom themes

From Dev

Python Tkinter custom themes

From Dev

Custom themes for dojox charting

From Dev

Brunch isn´t showing info about compilation errors

From Dev

Nautilus ugly with custom GTK themes

From Dev

Is it possible to convert linux icon themes into windows compatible icon themes?

From Dev

Custom hashmap giving compilation error using gcc on linux

From Dev

How to debug custom node server with brunch.io?

From Dev

Is it possible to sort a TListBox using a custom sort comparator?

From Dev

Is it possible to create custom calculations with formstack using javascript?

From Dev

Is it possible to use different themes based on file type?

From Dev

Is it possible to use Windows 7 Themes on Windows 8.1?

From Dev

Updating themes built using underscores

From Dev

Using Holo themes in conjunction with AppCompatActivity

From Dev

Android Use custom themes to modify style attributes

From Dev

SASS and Liferay - how to use in custom themes?

From Dev

not able to add custom template files in gitbook themes

From Dev

Question about GtkScrollbar class in custom themes

From Dev

Question about GtkScrollbar class in custom themes

From Dev

Cannot enable Shell Extensions for custom themes

From Dev

Use gnome custom themes appearance in KDE?

From Dev

How to load custom php file in Wordpress themes

From Dev

Adding custom HTML tags to Ghost or Ghost Themes

From Dev

Load in `.vimrc` themes and plugins from custom locations

From Dev

How to add custom Bootstrap themes to Heroku?

From Dev

Is it possible to add custom request headers when using chrome custom tabs?

Related Related

  1. 1

    Is it possible to add custom routes during compilation passes?

  2. 2

    Using custom bootstrap3 themes with Meteor.js

  3. 3

    Custom themes and colors in android

  4. 4

    Python Tkinter custom themes

  5. 5

    Python Tkinter custom themes

  6. 6

    Custom themes for dojox charting

  7. 7

    Brunch isn´t showing info about compilation errors

  8. 8

    Nautilus ugly with custom GTK themes

  9. 9

    Is it possible to convert linux icon themes into windows compatible icon themes?

  10. 10

    Custom hashmap giving compilation error using gcc on linux

  11. 11

    How to debug custom node server with brunch.io?

  12. 12

    Is it possible to sort a TListBox using a custom sort comparator?

  13. 13

    Is it possible to create custom calculations with formstack using javascript?

  14. 14

    Is it possible to use different themes based on file type?

  15. 15

    Is it possible to use Windows 7 Themes on Windows 8.1?

  16. 16

    Updating themes built using underscores

  17. 17

    Using Holo themes in conjunction with AppCompatActivity

  18. 18

    Android Use custom themes to modify style attributes

  19. 19

    SASS and Liferay - how to use in custom themes?

  20. 20

    not able to add custom template files in gitbook themes

  21. 21

    Question about GtkScrollbar class in custom themes

  22. 22

    Question about GtkScrollbar class in custom themes

  23. 23

    Cannot enable Shell Extensions for custom themes

  24. 24

    Use gnome custom themes appearance in KDE?

  25. 25

    How to load custom php file in Wordpress themes

  26. 26

    Adding custom HTML tags to Ghost or Ghost Themes

  27. 27

    Load in `.vimrc` themes and plugins from custom locations

  28. 28

    How to add custom Bootstrap themes to Heroku?

  29. 29

    Is it possible to add custom request headers when using chrome custom tabs?

HotTag

Archive