How to use less-openui5 - 4 common examples

To help you get started, we’ve selected a few less-openui5 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / connect-openui5 / lib / less.js View on Github external
module.exports = function(options) {

	var builder = new less.Builder();

	return function lessMiddleware(req, res, next) {

		// handle only GET / HEAD requests
		if (!/^(GET|HEAD)$/i.test(req.method)) {
			next();
			return;
		}

		var pathname = url.parse(req.url).pathname;

		/*
		 groups (array index):
		 1 => library name
		 2 => theme name
		 3 => theme suffix
github SAP / grunt-openui5 / tasks / theme.js View on Github external
grunt.registerMultiTask('openui5_theme', 'OpenUI5 Theme Build', function() {

		// Merge task-specific and/or target-specific options with these defaults.
		var options = this.options({
			rootPaths: [],
			rtl: true,
			parser: {},
			compiler: {}
		});

		var builder = new less.Builder();

		// TODO check no file

		// Iterate over all specified file groups.
		async.eachSeries(this.files, function(fileObj, nextFileObj) {
			var files = fileObj.src.filter(function(filepath) {
				// Warn on and remove invalid source files (if nonull was set).
				if (!grunt.file.exists(filepath)) {
					grunt.log.warn('Source file "' + filepath + '" not found.');
					return false;
				} else {
					return true;
				}
			});

			// TODO check no file
github pulseshift / openui5-gulp-starter-kit / modules / ui5-lib-util / index.js View on Github external
import gulpif from 'gulp-if'
import rename from 'gulp-rename'
import tap from 'gulp-tap'
import uglify from 'gulp-uglify'
import cleanCSS from 'gulp-clean-css'
import ui5preload from 'gulp-ui5-preload'
import lessOpenUI5 from 'less-openui5'
import request from 'request'
import progress from 'request-progress'
import Zip from 'adm-zip'
import { execSync } from 'child_process'
import fs from 'fs'
import path from 'path'

// create a builder instance
const builder = new lessOpenUI5.Builder()

// export functions
export { downloadUI5, buildUI5 }

/**
 * Download OpenUI5 repository from external URL and unzip.
 *
 * @param {string} [sDownloadURL] Download URL of required archive.
 * @param {string} [sDownloadPath] Destination path for the download archive and extracted files.
 * @param {string} [sUI5Version] Version number of UI5 to create at <code>sDownloadPath</code> a subdirectory named <code>/{{sUI5Version}}</code>.
 * @param {Object} [oOptions] Download options.
 * @param {function(number,number,{ name: string, progress: number|null}):void} [oOptions.onProgress] Callback function to track download progress taking as params: current step number, total step number and if available, step details (object with name and progress in percent).
 * @returns {Promise.string} Promise which resolves to a success or error message.
 */
function downloadUI5(sDownloadURL, sDownloadPath, sUI5Version, oOptions = {}) {
  // check params
github SAP / ui5-builder / lib / processors / themeBuilder.js View on Github external
constructor({fs}) {
		this.builder = new less.Builder({fs});
	}

less-openui5

Build OpenUI5 themes with Less.js

Apache-2.0
Latest version published 1 year ago

Package Health Score

75 / 100
Full package analysis

Popular less-openui5 functions