{"library":"resource-compiler","title":"express-resource-compiler","description":"Resource compiler and cacher for Express. Current stable version: 0.2.8. This package allows you to compile and cache resources (e.g., CSS, JavaScript templates) in an Express application. It is designed to be generic and integrate with Express's middleware pattern. The package has seen no recent updates and is in early stages, with limited documentation and community adoption. Differentiators include its focus on resource compilation and caching for Express, as opposed to more general-purpose build tools or asset pipelines. It supports a plugin-like system for custom compilers.","language":"javascript","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["npm install resource-compiler"],"cli":null},"imports":["import ResourceCompiler from 'resource-compiler'","import { compile } from 'resource-compiler'","import type ResourceCompiler from 'resource-compiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const express = require('express');\nconst ResourceCompiler = require('resource-compiler');\n\nconst app = express();\nconst compiler = new ResourceCompiler({\n  cache: true,\n  cacheDir: './cache',\n  compilers: {\n    '.jst': (content, filename) => `module.exports = ${JSON.stringify(content)};`\n  }\n});\n\napp.use(compiler.middleware());\n\napp.get('/', (req, res) => {\n  res.send('Resource compiler active');\n});\n\napp.listen(3000);","lang":"javascript","description":"Basic setup of express-resource-compiler with custom compiler for .jst files and caching enabled.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}