GithubHelp home page GithubHelp logo

kendo-theme-tasks's Introduction

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');
    const nodeSass = require('node-sass');

    function buildStyles(cb) {
        kendoSassBuild({
            file: './sass/styles.scss',
            output: {
                path: './wwwroot/css'
            },
            sassOptions: {
                implementation: nodeSass,
                outputStyle: 'compressed'
            }
        });

        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');
    const nodeSass = require('node-sass');

    function buildStyles(cb) {
        kendoJsonBuild({
            file: 'scss/theme.json',
            output: {
                path: 'dist/'
            },
            sassOptions: {
                implementation: nodeSass,
                outputStyle: 'expanded'
            }
        });

        cb();
    }

    exports.build = buildStyles;

kendo-theme-tasks's People

Contributors

joneff avatar semantic-release-bot avatar juveniel avatar preslavkozovski avatar tsvetomir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.