jsautobuild documentation
This is meant to be used to help you write your own watching js builder script. It provides the hooks and the pyinotify inclusion. You can tweak it to your own specific application as required.
Usage
You need to build a simple script to use the builder. Below is an example script that helps copy changed JS files to a build directory.
::
import os
from jsautobuild import YUIBuilder
def lp_path_builder(changed_path, **builder_props):
"""The custom bit of LP code that determines where files get moved to"""
# to start out let's assume your CWD is where we're referencing things from
CWD = os.getcwd()
JSDIR = os.path.join(CWD, builder_props['build_dir'])
RENAME = re.compile("^.*lib/lp/(.*)/javascript")
match = RENAME.search(changed_path)
js_dir = match.groups()[0]
return os.path.join(JSDIR, RENAME.sub(js_dir, changed_path))
if __name__ == "__main__":
build_dir = 'build/js/lp'
meta_name = 'LP_MODULES'
watch_dir = 'lib'
builder = YUIBuilder(lp_path_builder,
build_dir,
watch_dir=watch_dir,
meta_jsmodule=meta_name)
builder.run()
Options
:build_callable: You need a function that will accept the filename of the JS file that has changed, and then return back the proper location of that file in the build directory.
:build_dir: What is the root directory all build files are heading to. This is also used for the meta.js generate code. It'll build a list of all modules in this build directory.
:meta_jsmodule: What is the Javascript global variable name you want the meta file to be generated to. You'll use this in your own application to feed the module list to the YUI combo loader.
:update_metajs: default True Should we rebuild the meta.js whenever a new .js file is created.
:watch_dir: default . This is the directory that is watched for all file changes and triggers the build of js files. By default it'll watch the current working directory and anything below that.
.. This is your project NEWS file which will contain the release notes. .. Example: http://www.python.org/download/releases/2.6/NEWS.txt .. The content of this file, along with README.rst, will appear in your .. project's PyPI page.
News
0.3
Release date: 29-Jun-2026
- Add pyasyncore dependency for Python 3.12+ (asyncore removed from stdlib)
- Add test suite
- Upgrade jsautobuild to support python >= 3.8
- Removed buildout config files
0.2
*Release date: 28-Feb-2012
- Fix the requirements in setup.py
0.1
Release date: 27-Feb-2012
- Start the project to help build a JS auto building watcher.
Metadata
Release files for jsautobuild 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jsautobuild-0.3.tar.gz | 6.7 kB | Without provenance | Details for jsautobuild-0.3.tar.gz |
Release files / jsautobuild-0.3.tar.gz
| Download URL | jsautobuild-0.3.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6cbb3f8f04ba5bdb90d0e3c5d39a26bb5cb79b5a94b09723b405f75f42eec2d
|
|
BLAKE2b-256 checksum How to use checksums |
85f245dc7d60d3115d5183135832d4c01ba97138dd81d2775fb94e0adbed7574
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for jsautobuild 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.