Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ktravis/update-combine

A small tool written in Python to actively merge JavaScript files in a directory.
https://github.com/ktravis/update-combine

Last synced: about 2 months ago
JSON representation

A small tool written in Python to actively merge JavaScript files in a directory.

Awesome Lists containing this project

README

        

update-combine
==============

A small tool written in Python to actively merge JavaScript files in a directory.

Purpose
-------

Usage
-----

Place updateCombine.py in a directory with (or without) *.js files that you wish to be automatically combined.
To run indefinitely:

```python updateCombine.py```

To watch a directory other than `./` (relative to updateCombine.py):

```python updateCombine.py relative_path_to_dir```

It may be useful to actively merge source files while running a local dev server. This can be accomplished easily by running update-combine and python's SimpleHTTPServer in separate threads.

```python
import subprocess, SimpleHTTPServer, SocketServer, threading

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", 8000), Handler)

serve = threading.Thread(target=httpd.serve_forever)
serve.start()
subprocess.call(['python','updateCombine.py'])
```