Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
.aMMMb .dMMMb dMMMMMP dMMMMb dMMMMMP dMMMMMP dMMMMMP
dMP"dMP dMP" VP dMP dMP.dMP dMP dMP dMP
dMMMMMP VMMMb dMMMP dMMMMK" dMMMP dMP dMMMP
dMP dMP dP .dMP dMP dMP"AMF dMP dK .dMP dMP
dMP dMP VMMMP" dMMMMMP dMP dMP dMMMMMP VMMMP" dMMMMMP
"Aserejé ja de jé de jebe, tu de jebere sebiunouba, majabi an de bugui an de buididipí"
Asereje is a library that builds your assets on demand.
npm install asereje
First you have to configure asereje:
var asereje = require('asereje');
asereje.config({
active: process.env.NODE_ENV === 'production' // enable it just for production
, js_globals: ['lib/jquery', 'global', 'underscore'] // js files that will be present always
, css_globals: ['reset', 'global'] // css files that will be present always
, js_path: __dirname + '/public/javascripts' // javascript folder path
, css_path: __dirname + '/public/css' // css folder path
});
Then you can use css
or js
function to get the file names.
res.render('users/index', {
css: asereje.css(['users', users/index]) // => ['reset', 'global', 'users', 'users/index']
});
// ... it builds the files and the next requests will return:
res.render('users/index', {
css: asereje.css(['users', users/index]) // => ['dist/f330099956c144c090b06f6d4bae8770', 'dist/caa6925553b03e049eeda6f70da9dc1a']
});
html
head
-each file in css
link(rel= 'stylesheet', href= '/css/' + file + '.css' )
...
Asereje does 3 things:
Ugilify-js
for javascripts and sqwish
for css.Built files are stored under js_path|css_path/dist
. Add expires headers to all this files so the users will have them cached forever.
// nginx conf
location ~* ^/(css|javascripts)/dist/.+\.(css|js)$ {
expires max;
}
(The MIT License)
Copyright (c) 2011 Pau Ramon Revilla <masylum@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Asereje is a library that builds your assets on demand
We found that asereje 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.