
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
getsmart-js
Advanced tools
Middleware for express.js. Compresses, minifies and concats JavaScript and CoffeeScript at runtime.
Middleware for Express.js, a Node.js framework. Compresses, minifies and concats JavaScript and CoffeeScript at runtime.
getsmart-js intercepts GET requests for files ending in ".js". It checks to see if the modification date of the source file has changed since the last request, and updates the file if it has.
It optionally compresses and minifies the file (using uglify-js) – good for production.
If a request is made, and the source file is not found, getsmart-js looks for a folder with the same name as request (minus the '.js') and concatenates all files in that folder (including sub-folders). eg. Request URL is "app.js", but "app.js" is not in the source folder, so getsmart-js looks for a folder named "app".
Run "npm install getsmart-js" to install the module.
Use getsmart-js as a middleware for Express.js.
eg. app.configure(function(){ app.use(require('getsmart-js')({ compress: true, isProduction: false, src: __dirname, dest: __dirname + '/public' })); };
compress Boolean (optional) Whether to compress & minify or not. Defaults to NODE_ENV == 'production'.
isProduction Boolean (optional) Will only check modification dates the first run if true. Defaults to NODE_ENV == 'production'.
src String (required) The source directory of the source JavaScript files.
dest String (required) The destination directory for the processed files.
The file paths will include the request URL – so you must keep this in mind when setting the options.
eg. request URL = "/js/app.js", so getsmart will look for "app.js" inside the "js" folder in the source directory.
FAQs
Middleware for express.js. Compresses, minifies and concats JavaScript and CoffeeScript at runtime.
The npm package getsmart-js receives a total of 2 weekly downloads. As such, getsmart-js popularity was classified as not popular.
We found that getsmart-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.