Files
biomedjs/node_modules/piler/package.json

56 lines
17 KiB
JSON
Raw Permalink Normal View History

2014-09-14 07:04:16 -04:00
{
"name": "piler",
"version": "0.5.0",
"author": {
"name": "Esa-Matti Suuronen"
},
"maintainers": [
{
"name": "Alexander Pirsig",
"email": "self@pirsig.net"
}
],
"homepage": "http://epeli.github.com/piler/",
"description": "Awesome Asset Manager for Node.js",
"bugs": {
"url": "https://github.com/epeli/piler/issues/"
},
"repository": {
"type": "git",
"url": "https://github.com/epeli/piler.git"
},
"scripts": {
"test": "./run-tests-travis.sh"
},
"main": "./lib/index",
"dependencies": {
"coffee-script": "1.3.x",
"underscore": "1.3.x",
"underscore.string": "2.2.0rc",
"uglify-js": "1.3.x",
"async": "0.1.22",
"csso": "1.2.x"
},
"devDependencies": {
"jasmine-node": "",
"express": "2.x",
"zombie": "1.2.x",
"supervisor": "",
"jade": "",
"stylus": "",
"nib": "",
"less": "",
"request": "",
"csslint": "",
"socket.io": ""
},
"readme": "# Piler\n\n[![Build Status](https://secure.travis-ci.org/epeli/piler.png)](http://travis-ci.org/epeli/piler)\n\nFeature highlights\n\n * Minify and concatenate JS and CSS for fast page loads\n * Tag rendering\n * Namespaces\n * Transparent preprocessor\n * Push CSS changes to the browser using Socket.IO\n * Easy code sharing with server\n\n## Awesome Asset Manager for Node.js\n\n*Piler* allows you to manage all your JavaScript and CSS assets cleanly and\ndirectly from code. It will concatenate and minify them in production and it\ntakes care of rendering the tags. The idea is to make your pages load as\nquickly as possible.\n\nSo why create a yet another asset manager? Because Node.js is special. In\nNode.js a JavaScript asset isn't just a pile of bits that are sent to the\nbrowser. It's code. It's code that can be also used in the server and I think\nthat it's the job of asset managers to help with it. So in *Piler* you can take\ncode directly from your Javascript objects, not just from JavaScript files.\nCopying things from Rails is just not enough. This is just a one reason why\n*Piler* was created.\n\nServer-side code:\n\n```javascript\nclientjs.addOb({BROWSER_GLOBAL: {\n aFunction: function() {\n console.log(\"Hello I'm in the browser also. Here I have\", window, \"and other friends\");\n }\n}});\n```\n\nYou can also tell *Piler* to directly execute some function in the browser:\n\n```javascript\nclientjs.addExec(function() {\n BROWSER_GLOBAL.aFunction();\n alert(\"Hello\" + window.navigator.appVersion);\n});\n```\n\n\nCurrently *Piler* works only with [Express], but other frameworks are planned\nas well.\n\n\n*Piler* is written following principles in mind:\n\n * Creating best possible production setup for assets should be as easy as\n including script/link to a page.\n * Namespaces. You don't want to serve huge blob of admin view code for all\n anonymous users.\n * Support any JS- or CSS-files. No need to create special structure for your\n assets. Just include your jQueries or whatever.\n * Preprocessor languages are first class citizens. Eg. Just change the file\n extension to .coffee to use CoffeeScript. That's it. No need to worry about\n compiled files.\n * Use heavy caching. Browser caches are killed automatically using the hash\n sum of the assets.\n * Awesome development mode. Build-in support for pushing CSS changes to\n browsr using Socket.IO.\n\n\n**Full example Express 2.x**\n```javascript\nvar createServer = require(\"express\").createServer;\nvar piler = require(\"piler\");\n\nvar app = createServer();\nvar clientjs = piler.createJSManager();\nvar clientcss = piler.createCSSManager();\n\napp.configure(function() {\n clientjs.bind(app);\n clientcss.bind(app);\n\n clientcss.addFile(__dirname + \"/style.css\");\n\n clientjs.addUrl(\"http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js\");\n clientjs.addFile(__dirname + \"/client/hello.js\");\n});\n\napp.configure(\"development\", function() {\n clientjs.liveUpdate(clientcss);\n});\n\nclientjs.addOb({ VERSION: \"1.0.0\" });\n\nclientjs.addExec(function() {\n alert(\"Hello browser\" + window.navigator.appVersion);\n});\n\napp.get(\"/\", function(req, res){\n res.render(\"index.jade\", {\n layout: false,\n js: clientjs.renderTags(),\n css: clientcss.renderTags()\n });\n});\n\napp.listen(8080);\n```\n\n\n**Full example Express 3.x**\n```javascript\nvar express = require('express'),\n http = require('http'),\n piler = require(\"piler\"),\n app = express();\n\nvar clientjs = piler.createJSManager();\nvar clientcss = piler.createCSSManager();\nvar srv = require('http').createServer(app);\n\napp.configure(function(){\n\n clientjs.bind(app,srv);\n clientcss.bind(app,srv);\n\n clientcss.addFile(__dirname + \"/style.css\");\n\n clientjs.addUrl(\"http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js\");\n clientjs.addFile(__dirname + \"/client/hello.js\");\n});\n\napp.configure(\"development\", function() {\n clie
"readmeFilename": "README.md",
"_id": "piler@0.5.0",
"dist": {
"shasum": "3307b42b33ec2011eddc84f688e69d3410dfe89f"
},
"_from": "piler@",
"_resolved": "https://registry.npmjs.org/piler/-/piler-0.5.0.tgz"
}