Socket
Socket
Sign inDemoInstall

connect-asset

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-asset

connect middleware for asset compiler


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

connect-asset

install

npm install connect-asset

usage

server (nodejs)

app.use(require('connect-asset'));

or

app.use(require('connect-asset')({...options...}));

view (jade)

link(rel='stylesheet', href='css/style.css')

directories

app
├ app.coffee
├ assets
│  └ css
│      └ style.styl
└ public

compilable

  • stylus
  • coffee-script

options

assets: [dirpath]

path for assets directory.

Default, path.resolve('assets').

public: [dirpath]

path for public directory (web root).

Default, path.resolve('public').

builds: [Boolean]

save compiled code to public directory.

Default, if NODE_ENV=production then true else false.

minify: [Boolean]

minify compiled code or not.

Default, if NODE_ENV=production then true else false.

update: [Boolean]

re-build assets when modification time differ from Last-Modified header.

Default, true.

stylesheet: [extname]

target extension.

Default, .styl.1

javascript: [extname]

target extension.

Default, .coffee.2

Footnotes

  1. .styl is ok, styl is ok too.

  2. .coffee is ok, coffee is ok too.

FAQs

Package last updated on 04 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc