Kendo Theme Tasks
Перейти к файлу
dependabot[bot] 3a77e04be1 chore(deps): bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 08:55:22 +03:00
.github chore: enable grouped updates with dependabot 2023-09-05 16:29:30 +03:00
.husky chore: migrate to husky v8 2023-01-03 13:44:14 +02:00
lib feat: switch to sass-build for build / compile 2022-08-25 10:44:54 +03:00
src fix: pass filename in default build options 2023-01-03 13:44:14 +02:00
test feat: extend swatches schema to allow either variables, groups or themeBuilder (legacy) 2021-06-18 20:31:35 +03:00
.browserslistrc feat: add default browserlistrc 2021-09-20 15:43:45 +03:00
.commitlintrc.json feat: move kendo-theme-tasks to separate repository 2021-01-29 18:41:30 +02:00
.editorconfig feat: move kendo-theme-tasks to separate repository 2021-01-29 18:41:30 +02:00
.eslintignore feat: move kendo-theme-tasks to separate repository 2021-01-29 18:41:30 +02:00
.eslintrc.json feat: move kendo-theme-tasks to separate repository 2021-01-29 18:41:30 +02:00
.gitignore feat: move kendo-theme-tasks to separate repository 2021-01-29 18:41:30 +02:00
.mocharc.json feat: move kendo-theme-tasks to separate repository 2021-01-29 18:41:30 +02:00
.npmignore fix: include root js files in distribution 2021-02-15 14:17:10 +02:00
CHANGELOG.md chore(release): 1.17.6 [skip ci] 2023-06-28 08:33:14 +00:00
README.md chore: update readme 2023-01-03 13:44:14 +02:00
index.js feat: add utility methods for theme-chooser files 2022-09-09 06:20:10 +03:00
package-lock.json chore(deps): bump braces from 3.0.2 to 3.0.3 2024-06-17 08:55:22 +03:00
package.json chore(deps): bump the dev-dependencies group with 7 updates 2023-12-04 11:55:13 +02:00
postcss.config.js feat: add default postcss.config.js 2021-09-20 15:43:45 +03:00
release.config.js feat(cli): initial kendo-theme CLI implementation 2021-03-16 14:35:51 +02:00

README.md

Kendo UI Theme Tasks

The Kendo UI theme-tasks package is a utility library for developing and building @progress/kendo-theme-* packages.

Installation

  1. Install the package as a dev dependency:
    npm install @progress/kendo-theme-tasks --save-dev
  1. Install the preferred sass compiler(node-sass or sass):
    npm install sass
    npm install node-sass
  1. If using npm version < 7 make sure that peer dependencies are installed:
    npm install postcss postcss-calc autoprefixer

Usage

The package allows you to compile Kendo themes from SCSS or JSON through the kendoSassBuild and kendoJsonBuild functions.

Building from SCSS

A Kendo theme can be compiled to CSS from SCSS source with predefined configuration options (package importer, postcss, postcss-calc and autoprefixer) through the kendoSassBuild() method:

  1. Import the theme:
    @import "~@progress/kendo-theme-default/dist/all.scss";
  1. Compile to CSS:
    const { kendoSassBuild } = require('@progress/kendo-theme-tasks/src/build/kendo-build');

    function buildStyles(cb) {
        kendoSassBuild({
            file: './sass/styles.scss',
            output: {
                path: './wwwroot/css'
            },
            sassOptions: {
                compiler: 'node-sass',
                minify: true
            }
        });

        cb();
    }

    exports.buildStyles = buildStyles;

Building from JSON

A Kendo theme or a custom theme swatch can be compiled to CSS from JSON schema with predefined configuration options (package importer, postcss, postcss-calc and autoprefixer) through the kendoJsonBuild() method:

  1. Utilize one of the existing theme swatches or create a new one by following the schema.

  2. Compile the JSON schema to CSS:

    const { kendoJsonBuild } = require('@progress/kendo-theme-tasks/src/build/kendo-build');

    function buildStyles(cb) {
        kendoJsonBuild({
            file: 'scss/theme.json',
            output: {
                path: 'dist/'
            },
            sassOptions: {
                compiler: 'node-sass',
                minify: true
            }
        });

        cb();
    }

    exports.build = buildStyles;