Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmdeldin/txpc
TXPC, a Textpattern plugin compiler.
https://github.com/jmdeldin/txpc
Last synced: about 1 month ago
JSON representation
TXPC, a Textpattern plugin compiler.
- Host: GitHub
- URL: https://github.com/jmdeldin/txpc
- Owner: jmdeldin
- Created: 2009-01-30T08:31:13.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2009-06-18T03:49:30.000Z (over 15 years ago)
- Last Synced: 2023-04-13T07:51:09.443Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 88.9 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
TXPC, a Textpattern plugin compiler.
====================================TXPC is a compiler for Textpattern plugins that allows developers to break
their source file into multiple files. It looks for `//inc ` in the
source file and merges the contents of `file.ext` into a single PHP file to be
used by TXP's plugin cache. TXPC will then create a distributable, base64 text
file.Features
--------- Separate PHP from other languages like CSS and JS.
- Include external libraries without bloating the source file.
- Plugin metadata is declared in a comment at the top of the file instead of
in `$plugin` (see "Metadata format").
- `# --- BEGIN|END CODE ---` is no longer needed.
- Likewise, explicit help sections are not needed. Help text has moved to a
README.textile file in the source directory.
- Releases are automatically labeled with their version.Usage
-----From the command line:
php txpc.php my_plugin.php [cache_dir] [release_dir]
- `cache_dir`
The directory for the merged plugin. Defaults to current working
directory.
- `release_dir`
The directory for the base64 text file. Defaults to cwd.Calling from Bash
~~~~~~~~~~~~~~~~~Save the following to somewhere accessible on your PATH (e.g., ~/bin) and
`chmod +x` it:#!/bin/env php
public,
1 => public+admin,
2 => library,
3 => admin
- `order`: 0 => first, ..., 9 => lastSuggested directory structure
-----------------------------| plugins/
| | cache/ <-- for TXP's plugin cache
| | | jmd_example.php
| | | jmd_save.php
| | src/ <-- raw plugin files
| | | example/
| | | | example.js
| | | | example.php
| | | | Makefile
| | | | README.textile
| | | save/
| | | | Makefile
| | | | README.textile
| | | | save.js
| | | | save.php
| | | ...
| | txpc/ <-- compiler
| | | examples/
| | | | ...
| | | README.textile
| | | txpc.php
| | releases/ <-- distributable plugins
| | | jmd_example-0.1.txt
| | | jmd_save-0.1.txtThen from the command line or in your Makefile (or Rakefile), use:
cd src/example
php ../../txpc/txpc.php ../../cache ../../releases