PHP Classes

File: frdlweb/webfan.js

Recommend this page to a friend!
  Classes of Till Wehowski   PHP Assets Management   frdlweb/webfan.js   Download  
File: frdlweb/webfan.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Assets Management
Framework controller to serve static files
Author: By
Last change:
Date: 3 years ago
Size: 1,108 bytes
 

Contents

Class file image Download
exports = module.exports = function(config){ var preferences = require('./../preferences.json'); /* $preferences->routes->assets->route /app/assets/[modules|themes:type]/[:hash]/[:vendor]/[:package]/[**:path] */ var route = preferences.routes.assets.route; var frdl = require('@frdl/functions'); var project = require('./../../../frdl.project.json'); route = frdl.str_replace('[:vendor]/', '', route); route = frdl.str_replace('[:package]/', '', route); route = frdl.str_replace('[**:path]', '', route); route = frdl.str_replace('[:hash]', project.hash, route); var route_module_assets = project.ce_baseUrl + frdl.str_replace('[modules|themes:type]', 'modules', route); var route_theme_assets = project.ce_baseUrl + frdl.str_replace('[modules|themes:type]', 'themes', route); config.hps.scriptengine.requirejs.paths['module-assets'] = frdl.str_replace('https:/', 'https://', frdl.str_replace('//', '/',route_module_assets)); config.hps.scriptengine.requirejs.paths['theme-assets'] = frdl.str_replace('https:/', 'https://', frdl.str_replace('//', '/',route_theme_assets)); };