telerik / kendo-theme-tasks

Kendo Theme Tasks
4 stars 2 forks source link

No release for almost half a year #123

Closed sala91 closed 11 months ago

sala91 commented 12 months ago

While dependabot has been doing it's work, it seems that no releases have been made.

Would be nice to know, what is the recommended node version to run these tasks.

sala91 commented 12 months ago

In my gulpfile.js I have

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

function buildStyles(done) { kendoSassBuild({ file: './sass/styles.scss', output: { path: './wwwroot/css', filename: '[name].css' }, sassOptions: { minify: true } });

done();

}

exports.sass = buildStyles;

In my package.json I have

{ "name": "blazor-dashboard", "version": "0.0.0", "private": true, "scripts": { "build:development": "npx gulp sass", "build:production": "npx gulp sass && npx gulp minify-css" }, "devDependencies": { "@progress/kendo-theme-bootstrap": "latest", "@progress/kendo-theme-tasks": "^1.17.6", "bootstrap": "^5.0.2", "gulp": "^4.0.0", "gulp-clean-css": "^4.0.0", "gulp-sass": "^4.0.2", "sass": "latest" } }

When I run npm install

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: chokidar@2.1.8 npm ERR! node_modules/chokidar npm ERR! chokidar@"^2.0.0" from glob-watcher@5.0.5 npm ERR! node_modules/glob-watcher npm ERR! glob-watcher@"^5.0.3" from gulp@4.0.2 npm ERR! node_modules/gulp npm ERR! dev gulp@"^4.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peerOptional chokidar@"^3.3.0" from nunjucks@3.2.4 npm ERR! node_modules/nunjucks npm ERR! nunjucks@"^3.2.3" from @progress/kendo-theme-tasks@1.17.6 npm ERR! node_modules/@progress/kendo-theme-tasks npm ERR! dev @progress/kendo-theme-tasks@"^1.17.6" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\sander.soots\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\sander.soots\AppData\Local\npm-cache_logs\2023-11-10T11_15_59_947Z-debug.log

Trying to follow the sample from https://github.com/telerik/blazor-ui/tree/master/sample-applications/blazor-dashboard/BlazorDashboard and make the Sass pipeline work. It seems that its removed cuz it's not working from samples.

Does not matter if I try to force or legacy-peer-deps it does not end up working either way.

Tested various node versions, last run I tested with node -v 16.0.0 did not find a working version.

sala91 commented 11 months ago

The error seem same if try e.g. versions bellow or just say latest.

{ "name": "blazor-dashboard", "version": "0.0.0", "private": true, "scripts": { "build:development": "npx gulp sass", "build:production": "npx gulp sass && npx gulp minify-css" }, "devDependencies": { "@progress/kendo-theme-bootstrap": "7.0.2", "@progress/kendo-theme-tasks": "^1.17.6", "bootstrap": "^5.3.2", "gulp": "^4.0.2", "gulp-clean-css": "^4.3.0", "gulp-sass": "^5.1.0", "sass": "^1.69.5" } }

sala91 commented 11 months ago

Closing this bug, this whole repo seems deprecated, threw out this dependecy. For anyone else stumbling upon this.

Working package.json:

{ "name": "blazor-dashboard", "version": "0.0.0", "private": true, "scripts": { "build:development": "npx gulp sass", "build:production": "npx gulp sass && npx gulp minify-css" }, "devDependencies": { "@progress/kendo-theme-bootstrap": "7.0.2", "autoprefixer": "^10.4.16", "bootstrap": "^5.3.2", "gulp": "^4.0.2", "gulp-clean-css": "^4.3.0", "gulp-postcss": "^9.0.1", "gulp-sass": "^5.1.0", "postcss-calc": "^9.0.1", "sass": "^1.69.5" } }

Then working gulpfile:

const gulp = require('gulp'); const postcss = require("gulp-postcss"); const autoprefixer = require("autoprefixer"); const calc = require("postcss-calc"); const sass = require('gulp-sass')(require('sass'));

const postcssPlugins = [ calc({ precision: 10 }), autoprefixer({ overrideBrowserslist: [ '> 10%' ] }) ];

const sassOptions = { precision: 10, outputStyle: 'expanded', includePaths: 'node_modules' };

gulp.task('sass', function() { return gulp.src('./sass/*/.scss') .pipe(sass(sassOptions).on('error', sass.logError)) .pipe(postcss(postcssPlugins)) .pipe(gulp.dest('./wwwroot/css/')); });

In styles.scss apply bugfixes:

$kendo-button-border-width: 0.1px; $kendo-input-border-width: 0.1px;

For faster compilation change @import "../node_modules/@progress/kendo-theme-bootstrap/scss/all.scss"; from to @import "../node_modules/@progress/kendo-theme-bootstrap/dist/all.scss";

Based on knowlege from https://github.com/telerik/kendo-themes/wiki/Compiling-themes

Tested and working on node -v 16.0.0