This is a migrated thread and some comments may be shown as answers.

building themes with bower/gulp

1 Answer 201 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Troy
Top achievements
Rank 1
Troy asked on 09 Apr 2017, 04:17 PM

Along with the "custom" task for making a custom JS build, the gulpfile in your Bower distribution also has a "less" task for compiling the CSS.  A couple of questions:

  • On my OSX machine with node 6.9.4 installed, "gulp less" fails with "TypeError: Path must be a string. Received undefined", apparently in clean-css/input-source-map-tracker.  On an Ubuntu 16.04 box with the node 4.2.6 that comes with that, it works fine.  I assume there is some breakage that happened somewhere between those two node versions?
  • "gulp custom" looks like it compiles the ".less" for all themes to dist/styles, but it doesn't bring over things like fonts/ or Default/ that would be needed by a theme?  There's no intent for dist/styles to be self-contained without adding in more bits from the source distribution?
  • the "less" task has a "styles" command line option which presumably lets you compile specific .less subsets?  I was able to do "gulp less --styles **/kendo.*default.less", which gave me those matching files, but when I tried two patterns (separated with a comma) with "gulp less --styles **/kendo.*default.less,web/kendo.common.less", it ran but produced no output files at all.  Is there a way to do multiples like this as the "custom" task does?

Since the styles are provided precompiled in the top-level "styles" directory, and since there is presumably nothing that would change for any particular style by recompiling it, the "less' task isn't of great use for me.  I'd hoped there would be some way to tell it to assemble all the required stuff for a particular theme in "dist/styles".

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 12 Apr 2017, 10:43 AM

Hello Troy,

 

Most of the basic command to use are available in the readme file in the repo: https://github.com/telerik/kendo#how-to-build-kendo-ui-core. And the dependencies are listed here: https://github.com/telerik/kendo#installing-dependencies. Although the node dependency is for 4.x, I am able to build that with 6.7.0 as well. 

 

The gulp less task is intended only to compile less to CSS files. It does not transfer other resources. Also, it is not intended to be used with additional parameters. 

 

Resources plus styles are built with the gulp styles task. Again, there are no parameters, all themes are built.

 

The gulp custom task would build you only a script file that combines the listed components. CSS compilation is not something that this task do. 

 

To build all with one command, you can use the gulp build task.  

 

Typically, a custom suite of components can be built only using the gulp custom task that will only generate you a script file (kendo.custom.js and kendo.custom.min.js). You can also check this article about building custom suite: http://docs.telerik.com/kendo-ui/intro/installation/what-you-need

 

Styles and themes are intended to be built altogether. Further on, you can choose which resources to use and include only them in your project. 

 

Custom themes is a different topic that is addressed here: http://docs.telerik.com/kendo-ui/styles-and-layout/appearance-styling#custom-themes-creation. Shortly, there is no task that could somehow help you with custom themes. For such customization, you can consider using the ThemeBuilder app

 

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Troy
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or