https://github.com/foo123/beeld
Beeld: scriptable, extendable and configurable source code builder framework (node.js / php / python platforms)
https://github.com/foo123/beeld
builder extendable node-js php python scriptable source-code
Last synced: 5 months ago
JSON representation
Beeld: scriptable, extendable and configurable source code builder framework (node.js / php / python platforms)
- Host: GitHub
- URL: https://github.com/foo123/beeld
- Owner: foo123
- Created: 2015-01-11T12:03:58.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-09-24T16:14:54.000Z (over 3 years ago)
- Last Synced: 2025-03-16T07:28:06.609Z (10 months ago)
- Topics: builder, extendable, node-js, php, python, scriptable, source-code
- Language: JavaScript
- Homepage: https://foo123.github.io/
- Size: 5.03 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Beeld
=====
**A scriptable, extendable and configurable source code builder framework and tool in JavaScript / Python / PHP**
**version 1.0.3**

This is a new framework and tool for building projects from sources, which is based on (and extends) the [previous buildtools used here](https://github.com/foo123/scripts)
### Usage
* Modify the `beeld-sample.config` or `beeld-sample.json` or `beeld-sample.yaml` or `beeld-sample.ini` file(s) to include the configuration settings and parameters
* Configuration file can be in `custom` config format (default), `JSON` format (`.json`) or `YAML` format (`.yaml`, `.yml`) or `INI` format (`.ini`)
* Run the `.bat` or `.sh` scripts to build the package
Each tool/compiler, if run with no parameters in the command-line, will print a help screen explaining usage options.
Also the sample-config files and build.bat, build.sh files, demonstrate how the build tools are used
### Plugins, Extensions, Scripting, Custom Dynamic Expressions
The framework can be extended by plugins. The plugin code can be in the `Beeld/plugins` folder or even in current working directory. Each plugin can define a new action to be used on the source data through a pipeline.
The plugin and the new action are both defined in each config file (see sample config files).
Furthermore the framework has a built-in `"replace"` action to replace text in sources and a `"process-shell"` action which allows to manipulate the source data through direct shell scripting (for example for some fast shell text manipulation)
**NEW in version 0.8+**
The framework allows custom powerfull dynamic expressions (and regular expressions) to be part of config data and parameters, via the [`Xpresion` framework](https://github.com/foo123/Xpresion). The `beeld.config` file can include a `settings` part which defines the prefixes for `Xpresion` dynamic expressions and `Regular Expressions` (if any) used in the config file. The parsing and evaluation will be automatic (see sample config files for examples). A common example of the use of custom expressions is the use of current date to be displayed in the final built file (one can use a custom expression for that which uses the `date` function as part of `replace` data to be replaced in the file where needed). Another one, is to replace data in the files not simply by another string but by the contents of a whole file (one would use an expression with the `file` function to load the contents of a file dynamicaly)
### UMD Templates
Some UMD templates from the [UMD github repo](https://github.com/umdjs/umd) have been included as templates in the buildtools.
A generic UMD module pattern wrapper that supports module dependencies and bundled module dependencies in same file and works transparently inside Node/CommonJS, requireJS/AMD, WebWorker/Browser, is in this [gist](https://gist.github.com/foo123/20e0ca043cdc50ecb004#)
and in [this gist](https://gist.github.com/foo123/8b0c069445bee29b0e93) for single module wrapper (no dependencies)
### Dependencies
* `UglifyJS` (default), `Java Closure Compiler` (included), `Java YUI Compressor` (included), [`CSS Minifier`](http://foo123.github.io/examples/css-minifier) (included) can be used
__For Python__
* `Python` (2 or 3)
* `PyYaml` module installed (for Yaml parsing)
__For PHP__
* `PHP` 5.2+
* Modified standalone version of `Symfony Yaml` parser by (c) Fabien Potencier (included)
__For Node.js__
* `Node.js` 0.8+
* Modified standalone version of `yaml.js` (Symfony Yaml parser) by (c) Fabien Potencier, Jeremy Faivre (included)
__Common Dependencies__
* `UglifyJS` package (**required**, global install)
* `Closure` compiler (**included**)
* `YUI Compressor` compiler (**included**)
* `Java 6` (**required** by `YUI`, `Closure` compilers)
* `CSS Minifier` (`python`) (**included**)
* `CSS Minifier` (`php`) (**included**)
* `CSS Minifier` (`node`) (**included**)
* `Xpresion` (`python`) (**included**)
* `Xpresion` (`php`) (**included**)
* `Xpresion` (`node`) (**included**)
**NOTE:** Only one of the three `javascript` minify compilers needs be used, but `Beeld` interfaces are provided for all three.