
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
RapperLite is a bare-bones static asset packager and compressor. It currently supports CSS, JavaScript, and CoffeeScript. It uses MD5 versioning to avoid re-compressing packages that don't need to be re-compressed. RapperLite can be set up with a single config file so that you don't have to wrangle wacky comment DSLs in your source code just to join and compress a few files.
Create a YAML file (say, "rapper.yml") that defines your static asset packages like so:
--- !omap
- root: public/src/
- destination: public/assets/
- compress: true
- css: !omap
- base: !omap
- files:
- reset
- layout
- typography
- colores
- version: 683e
- js: !omap
- mootools: !omap
- files:
- mootools-core
- mootools-more
- version: f3d9
- base_combined: !omap
- files:
- preloader
- +mootools
- widgets
- version: ccfc
(Why the excessive use of omap
? I'm doing this to ensure that the line order is maintained when I write updated version strings to the file. Why maintain order? Two words: merge conflicts.)
The above configuration will create the following compressed asset packages when RapperLite is run:
* `public/assets/base.css`
* `public/assets/mootools.js`
* `public/assets/base_combined.js`
Component files can be nested in subfolders:
...
- base: !omap
- files:
- mootools-core
- extras/mootools-more
- extras/crazybox
- version: f3d9
...
The "css" and "js" nodes of the config can override the "root" and "destination" config variables:
--- !omap
- destination: public/assets/
- compress: true
- css: !omap
- root: public/stylesheets/
- base: !omap
...
- js: !omap
- root: public/javascripts/
- base: !omap
...
You can run RapperLite from the command line:
$ rapper_lite path/to/config.yml
or:
$ rapper_lite --watch path/to/config.yml
If no config file is passed in, RapperLite will search for the config file at:
./rapper.yml
./assets.yml
./config/rapper.yml
./config/assets.yml
You can also run RapperLite from Ruby:
require "rapper_lite"
RapperLite::Engine.new( "config/rapper.yml" ).package
Or use the included Rake tasks by adding this to your Rakefile
:
Rapper::Tasks.new do |config|
config[:path] = "config/assets.yml"
end
You can specify a custom namespace, if you want:
Rapper::Tasks.new( :assets ) do |config| ...
RapperLite transparently supports CoffeeScript. You don't have to do anything. Refer to the file in your config like you would any regular ol' JavaScript file.
Rapper's got a Gemfile. You know what to do.
bundle package
bundle exec rake spec
master
, which jeweler
doesn't tell you. Oops.rapper_lite
command to allow watching for changes. Add watch support to Rake task.Copyright (c) 2011 Tyson Tate. See LICENSE.txt for further details.
FAQs
Unknown package
We found that rapper_lite 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.