Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
solder
Advanced tools
Readme
Solder combines and minifies groups of CSS and/or JavaScript files in real-time for easy development and debugging.
When you're ready to build a release, Solder creates combined and minified files for production.
Solder is a port of Weld to work with Node.
$ npm install solder
$ solder --help
Components are groups of CSS and/or JS files. Individual files can be on the local file system or at remote URLs. Components can require other components to create modular dependencies.
Solder has built in support for YUI Compressor for CSS and JS, and Google Closure Compiler for JS only. However, you must provide your own jars.
Solder looks in the current directory for a configuration file named
solder-config.js
unless an alternate configuration file is specified.
See examples/solder-config.js
for a simple complete Solder configuration.
Solder can be used directly from your app to serve components during development.
Most Express applications can benefit from Solder's Express Route one-liner. In fact, the following example is a complete Solder server.
var server = require('express').createServer(),
solder = require('solder');
solder.expressRoute(server);
server.listen(3000);
If you're not using Express, Solder can be used directly from within any
application. Just match request URLs against Solder's urlPattern
regular
expression -- or your own regex -- and then process the matches.
See examples/http.js
directory for an example of a custom setup.
The solder
command-line tool includes a stand-alone Solder server. Just run
solder
with no arguments. The Solder server will listen on port 8675 unless
a port is specified.
$ solder
Solder server started at http://localhost:8675/
At runtime, Solder acts on URLs beginning with /solder
.
http://example.com/solder/foo.css
The filename foo.css
tells Solder to serve the css
portion of the
component named foo
.
If you don't want Solder to minify your components, add the no-minify
query
parameter.
http://example.com/solder/foo.css?no-minify
Use the solder
command-line tool to concatenate and compress one or more
components in a single step.
$ solder foo
--> foo-201009042022.css
--> foo-201009042022.js
Use the -o
(--output-dir
) option to save soldered files to a specific
directory.
Use the -p
(--push
) option to push soldered files to the configured CDN
instead of saving them locally. Basic Amazon S3 support is built in.
Solder is licensed under the same terms as Weld, the MIT License.
FAQs
Combines and minifies JavaScript and CSS at runtime and build time
The npm package solder receives a total of 3 weekly downloads. As such, solder popularity was classified as not popular.
We found that solder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.