https://github.com/featurist/stitchy
Command-line wrapper for stitch
https://github.com/featurist/stitchy
Last synced: about 2 months ago
JSON representation
Command-line wrapper for stitch
- Host: GitHub
- URL: https://github.com/featurist/stitchy
- Owner: featurist
- Created: 2013-02-07T11:11:01.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-07-29T10:29:18.000Z (almost 12 years ago)
- Last Synced: 2025-02-20T20:06:01.486Z (2 months ago)
- Language: PogoScript
- Size: 191 KB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Stitchy
A little utility to fire up a static web server for development of static web apps (with PogoScript). This is little more than a command-line wrapper around [stitch](https://github.com/sstephenson/stitch). Stitchy compiles CommonJS modules AND write them to disk, so that they are ready to deploy to static hosting environments.
#### Install
npm install stitchy
#### Running the server
From a command line
stitchy [options]
##### Options--port
Web server port, defaults to 3000--lib
Path to the directory comtaining your pogo and js files, defaults to ./lib
--target
Path to the compiled JavaScript file, defaults to ./public/js/app.js--public
Path to the directory comtaining your static assets, defaults to ./public#### Example
Add the following following files:
./lib/foo.pogo
./lib/bar.js
./public/js/app.jsRun stitchy:
> stitchy
Visit:
http://localhost:3000/js/app.js
You should see the two modules under /lib compiled into a single JavaScript. The compiled output is also saved to disk at ./js/app.js
Add some HTML:
./public/index.html
Link to your compiled JavaScript and require one of your CommonJS modules:
require('foo');
Open a web browser at:
http://localhost:3000
Win!