Smartcomb: web module splitters implemented using php

Source: Internet
Author: User
Smartcomb is a web module concatenation tool implemented in php. compared with other code concatenation tools, smartcomb has the following features: it can splice any type of files, not limited to js files. Centralize and declare dependencies, automatically analyze dependencies, and load them as needed. Supports multiple configuration switches to automatically modify css, less charts... syntaxHighlighter. all (); smartcomb is a web module concatenation tool implemented by php. compared with other code concatenation tools, it has the following features: it can splice any type of files, not limited to js files. Centralize and declare dependencies, automatically analyze dependencies, and load them as needed. Supports multiple configuration switches to automatically modify css. The image path in less mode does not need to worry about css Image path errors after splicing. supports php command line calls. supports command-based direct generation of static files. github address: https://github.com/hafeyang/smartcomb The module declaration configuration smartcomb is composed of smartcomb. php and modules. js. modules. js is a json file and must be in strict json format. double quotation marks must be added to the key for module declaration. Format: {[profile]: {"basePath": "Basic paths common to all files", "modules": {"[modulename]": {[type1]: ["file1", "file2"], "dependencies": ["depend module name", "", ""] }}} The following is a demo: {"default": {"basePath": "modules/", "modules": {"base": {"js": ["base/base. js "," base/common. js "]," css ": [" base/reset.css "]," less ": [" base/reset. less "]}," pageA ": {" js ": [" pageA/pageA-util.js "," pageA/pageA. js "]," css ": [" pageA/pageA.css "], "Dependencies": ["base"] }}} use the demo above to declare the module configuration with profile as default. Declare two modules base and pageA. pageA depends on the base module. The base module consists of two js files: modules/base. js. The path is relative to the path of smartcomb. php. the file type can be defined at will and the type can be specified during use. As shown in the preceding configuration file, we can reference the following on the page:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.