Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
A build framework for the compilation of higher order js/css languages (coffeescript/stylus/less).
Buddy is primarily a build framework for the compilation of higher order js/css languages (coffeescript/stylus/less). Additionally, by enabling Node.js-style module wrapping and syntax, it promotes better js code organization, and provides automatic concatenation of code for more efficient delivery to the browser.
Use the -g global flag to make the buddy command available system-wide:
$ npm -g install buddy
$ cd path/to/my/project
# compile all source files
$ buddy compile
# watch for source changes and compile
$ buddy watch
# compile and minify for production
$ buddy deploy
# view usage, examples, and options
$ buddy --help
The only requirement for adding Buddy support to a project is the presence of a buddy.json file:
{
"js": {
"sources": ["a/coffeescript/folder", "a/js/folder"],
"targets": [
{
"in": "a/coffeescript/or/js/file",
"out": "a/js/file/or/folder"
},
{
"in": "a/coffeescript/folder",
"out": "a/folder"
}
]
},
"css": {
"sources": ["a/stylus/folder", "a/less/folder"],
"targets": [
{
"in": "a/stylus/or/less/file",
"out": "a/css/file/or/folder"
},
{
"in": "a/stylus/or/less/folder",
"out": "a/folder"
}
]
}
}
For each build type (js/css), you begin by specifying source paths from which your build targets are referenced. Each build target should specify an input and corresponding output file or folder. Targets are run in sequence enabling you to chain builds together. As an example, you could compile a library, then reference some library files in your project:
"js": {
"sources": ["lib/src/coffee", "lib/js", "src"],
"targets": [
{
"in": "lib/src/coffee", <--a folder of coffee-script files (including nested folders)
"out": "lib/js" <--a folder of compiled js files
},
{
"in": "src/main.js", <--the application entry point referencing library dependencies
"out": "js/main.js" <--a concatenation of referenced dependencies
}
]
}
Buddy wraps each coffee-script/js file in a module declaration based on the file location. Dependencies (and concatenation order) are determined by the use of require statements:
var lib = require('./my/lib'); // in current package
var SomeClass = require('../some_class'); // in parent package
lib.doSomething();
var something = new SomeClass();
Specifying a module's public behaviour is achieved by decorating an exports object:
var myModuleVar = 'my module';
exports.myModuleMethod = function() {
return myModuleVar;
};
or overwriting the exports object completely:
function MyModule() {
this.myVar = 'my instance var';
};
MyModule.prototype.myMethod = function() {
return this.myVar;
};
module.exports = MyModule;
Each module is provided with a module, exports, and require reference.
When require-ing a module, keep in mind that the module id is resolved based on the following rules:
'Users/alex/project/src/package/main.js' > 'package/main'
'my/package/Class.js' > 'my/package/class'
'my/package/ClassCamelCase.js' > 'my/package/class_camel_case'
See node.js modules for more info on modules.
(The MIT License)
Copyright (c) 2011 Pope-Industries <alex@pope-industries.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
A fast, simple build tool for web projects.
The npm package buddy receives a total of 16 weekly downloads. As such, buddy popularity was classified as not popular.
We found that buddy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.