0.5.5 • Published 9 years ago

serve-js v0.5.5

Weekly downloads
92
License
-
Repository
github
Last release
9 years ago

serve-js

handy development time middleware for projects which are written in the spirit of the commonjs module system. Its designed to integrate with a connect style static file server. It will filter requests looking for either a ".js" extension or an ".html". If it finds a ".js" it will send the corresponding file but with all its dependencies consolidated with it. Think of it like a run-able tarball. If it finds a ".html" extension it looks at the corresponding file and if it has only one in-line script tag it assumes you mean to compile the code in-line and does so. This is a really nice feature if your creating a lot of small examples etc..

Getting Started

With npm

$ npm install serve-js --save

then in your express/connect app:

var serveJS = require('serve-js')
app.use(serveJS(process.cwd()))

Examples

for now just take a look at the tests.

Running the tests

$ npm install
$ make test
$ open http://localhost:3000/test/inline.html
$ open http://localhost:3000/test/external.html
0.5.5

9 years ago

0.5.4

9 years ago

0.5.3

10 years ago

0.5.2

11 years ago

0.5.1

11 years ago

0.5.0

11 years ago

0.4.5

11 years ago

0.4.4

11 years ago

0.4.3

11 years ago

0.4.2

11 years ago

0.4.1

11 years ago

0.4.0

11 years ago

0.3.3

11 years ago

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.3

11 years ago

0.2.2

12 years ago

0.2.1

12 years ago

0.2.0

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago