Registry /
web-framework / cksource-samples-framework
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CKSourceStyles
✓ // This package provides LESS files (e.g., @import '~cksource-samples-framework/less/base.less';) and Grunt build tasks, not JavaScript modules.
✗ import { CKSourceStyles } from 'cksource-samples-framework';
This package does not export JavaScript symbols or components for direct import into application code. It is a styling and build framework.
SamplesFramework
✓ // The framework's functionality is accessed through its LESS files and by running its Grunt tasks defined in a Gruntfile.js.
✗ const SamplesFramework = require('cksource-samples-framework');
Attempting to `require()` this package in CommonJS will likely return an empty object or a non-functional reference, as its primary content is not a Node.js module API.
FrameworkConfiguration
✓ // Configuration for the framework's build process is typically defined within a project's `Gruntfile.js` and `package.json` scripts.
✗ import type { FrameworkConfiguration } from 'cksource-samples-framework';
TypeScript type imports are not available as this package does not provide a public TypeScript API or declaration files for runtime use.
Demonstrates how to configure a Gruntfile.js to compile LESS files, importing styles and variables from `cksource-samples-framework`.
/* Gruntfile.js - Example for integrating cksource-samples-framework */
const path = require('path');
module.exports = function(grunt) {
// Ensure a 'src' directory with a 'style.less' for compilation exists
grunt.file.mkdir('src');
grunt.file.write('src/style.less', `
// Import core framework styles. Adjust path if necessary.
@import (reference) "~cksource-samples-framework/less/base.less";
@import (reference) "~cksource-samples-framework/less/variables.less";
body {
font-family: @cksource-font-family; // Using a variable from the framework
background-color: @cksource-color-background;
color: @cksource-color-text;
}
h1 {
color: @cksource-color-primary;
}
`);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
development: {
options: {
// Point to the framework's LESS files in node_modules
paths: [path.join(__dirname, 'node_modules', 'cksource-samples-framework', 'less')],
strictMath: true,
syncImport: true
},
files: {
'dist/style.css': 'src/style.less'
}
}
},
clean: {
dist: ['dist']
}
});
// Load the Grunt plugins required for the build
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-clean');
// Register tasks to build the CSS
grunt.registerTask('build', ['clean:dist', 'less:development']);
grunt.registerTask('default', ['build']);
console.log("\nTo run this example, ensure you have a package.json with the following devDependencies and run 'npm install' then 'grunt':");
console.log(`
{
"name": "my-cksource-less-project",
"version": "1.0.0",
"devDependencies": {
"cksource-samples-framework": "^1.0.1",
"grunt": "^1.0.0",
"grunt-cli": "^1.0.0",
"grunt-contrib-less": "^2.0.0",
"less": "^4.0.0"
}
}
`);
console.log("After running 'grunt', compiled CSS will be in 'dist/style.css'.");
};
Errors
Common errors & fixes
Error: `grunt` command not found.
Grunt CLI (Command Line Interface) is not installed globally or locally within the project's node_modules.
fixInstall Grunt CLI globally (`npm install -g grunt-cli`) or locally as a dev dependency (`npm install --save-dev grunt-cli`) and ensure it's in your PATH.
NameError: @cksource-color-primary is undefined in ...
A LESS variable from the framework, such as `@cksource-color-primary`, is being used, but the LESS file defining it (e.g., `variables.less`) has not been correctly imported or its path is incorrect in the Grunt LESS configuration.
fixEnsure all necessary LESS files from `cksource-samples-framework/less` are `@import`ed in your source `.less` files and that the `paths` option in your `Gruntfile.js` correctly points to the framework's `less` directory.
Fatal error: Unable to find Gruntfile.js
The `grunt` command was executed in a directory that does not contain a `Gruntfile.js` file, or the file is named incorrectly.
fixCreate a `Gruntfile.js` in the root of your project directory, ensuring it defines the necessary tasks as demonstrated in the quickstart example.
Audit
Dependencies
lessrequiredRuntime dependency for compiling LESS stylesheets provided by the framework.