New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

panel-static

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

panel-static

Extending express.static to compile CoffeeScript with Browserify to Javascript and LESS to CSS

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Panel Static

Extending express.static to compile CoffeeScript with Browserify to Javascript and LESS (with LESS Hat library automaticaly included) to CSS

Before you use

This is not expected to work in standard server environment as it doesn't use any caching method. This is specificaly designed to work in Panels in Sketch and Photoshop.

Instalation

npm install panel-static

Usage

path = require 'path'
express = require 'express'
panelStatic = require 'panel-static'

directory = path.join(__dirname, 'public')

app = express()
app.use(panelStatic(directory))
app.listen(PORT)

All files with extension .js, .coffee or less would be processed on the fly.

Special flags

You can manually force request to just serve static file by adding raw param to url or you can disable only some features in your request. Use them as params in query string, for example http://example.com/style.less?noless, http://example.com/jquery.js?nobrowserify

For .js files

  • nobrowserify to get raw js file

For .coffee files (you can use both together)

  • nobrowserify to just compile Coffee Script and skip browserify
  • nobrowserify & nocoffee to get raw coffee file

For .less files

  • noless to get raw less file
  • nolesshat to not include LESS Hat

FAQs

Package last updated on 07 Oct 2015

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