
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Birdy is a fast, fine-grained static asset management tool. It intends to replace bower for common uses, although it is not as flexible (it does not include the kitchen sink).
Goals:
First, install Birdy
npm install -g birdy
You'll need to add a section to your package.json
, or a package.json
file to your project, if you don't node.
birdy init
Add resources to the newly created "staticDependencies" hash in your package.json
file as needed, something like:
{
...
"staticDependencies": {
"jquery": "2.0.0",
"handlebars": "*",
"angular": {
"filter": ["angular.js", "angular.min.js"]
},
"angular-translate": "git://github.com/angular-translate/bower-angular-translate.git",
"tv4": {
"url": "git://github.com/geraintluff/tv4.git",
"filter": ["tv4.js", "tv4.min.js"]
}
}
}
You can also specify in your package.json
where the files go:
{
...
"staticPattern": "static/{resource}/{file}",
"staticDependencies": { ... }
}
staticPattern
is resolved relative to your current working directory where
you happen to run birdy install
, and all necessary directories will be created.
It has two special values, which are replaced as the script proceeds.
{resource}
: The resource name, e.g., "jquery"{file}
: The file name, which may be several files, as specified by the
resource in resources/{resource}.js
.So if you want something like bower
, you could use:
{ "staticPattern": "components/{resource}/{file}" }
Or if you want everything in one directory:
{ "staticPattern": "static/{file}" }
Most filenames denote their resource, but not specifying {resource}
might
end up overwriting some files. birdy install
will not inform you of such
conflicts, so be careful.
Then fetch them!
birdy install
staticDependencies
Every entry in staticDependencies
has a key, the resource
name, and a flexible value field.
Possible values are:
You can specify all these options at the command line, instead of package.json
.
But I led with package.json
because that's the sane way.
Run birdy --help
to see what flags to use.
Every resource is an arbitrary javascript file that exposes a function as module.exports
.
Function signature:
function(version, callback) {
// compute a dictionary mapping filenames to lists of urls
// each of the urls should return an identical file
// the urls can be fully specified git paths
if (version === '2.0.0') {
callback({
'jquery.min.js': [
'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js',
'http://code.jquery.com/jquery-2.0.0.min.js'
],
'jquery.max.js': [
'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.js',
'http://code.jquery.com/jquery-2.0.0.js'
]
})
}
else {
callback(new Error('Cannot find version = ' + version));
}
}
The callback is not guaranteed to be async (e.g., setImmediate
or requiring some fetch).
Fork and send a pull request. I won't haphazardly accept all requests, but I do want this to cover a lot of packages. Before you send a pull request, please verify that:
https://raw.github.com/...
for github
and dying on everything else.If-Modified-Since
header, and ignoring "304 Not Modified" responses.bower
does, something like ~/.birdy/
?package.json
?)
staticIgnore
?)bower.json
files (for Bower-like functionality)Copyright © 2013 Christopher Brown. MIT Licensed.
FAQs
Static asset anti-package management.
The npm package birdy receives a total of 11 weekly downloads. As such, birdy popularity was classified as not popular.
We found that birdy 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
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.