Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@qrohlf/bones
Advanced tools
Bones is a small scaffolding utility for code projects. It runs in node, but can be useful in any kind of project where you find yourself creating the same set of boilerplate files over and over.
npm install -g @qrohlf/bones
.bones
folder with an example component
template:cd ~/myproject
bones init
bones component MyComponent
$EDITOR ./MyComponent
mkdir .bones/mytemplate
vim .bones/mytemplate/__name__.js
Bones operates on templates that you define in the .bones
directory of your
project. These templates can be as simple as a single file, or as complex as
as set of nested directories.
bones templatename destination [arg1=value arg2=value...]
In filenames, directory names, and template file contents, anything surrounded
by double underscores (i.e. __name__
) will be replaced with the value you
provided on the command line.
The __name__
parameter is populated by default with the basename of the
destination argument. You can override this by passing name=YOURNAME
as part
of the argument list.
There are also a number of string helpers you can use for transforming variables.
The syntax for doing this is __argName|transformName__
(so, for example __name|snakeCase__
would be useful if you wanted to take a react ComponentName and transform it to a class_name
for use in your CSS). The currently available helpers
are:
helper | output |
---|---|
camelCase | fooBar |
pascalCase | FooBar |
snakeCase | foo_bar |
kebabCase | foo-bar |
upperCase | FOOBAR |
upperSnakeCase | FOO_BAR |
lowerCase | foobar |
Bones uses an allow list of file extensions to determine which files to run through the template engine and which files to copy verbatim. See the default config for a list of file extensions that are interpreted as templates.
You can see some template examples in the .bones directory of this repo.
You can set per-project configuration values in .bones/bones.config.js
which
will override the defaults. See the default config for
all of the possible options.
Bones is MIT-licensed
FAQs
A simple Javascript scaffolding tool
The npm package @qrohlf/bones receives a total of 8 weekly downloads. As such, @qrohlf/bones popularity was classified as not popular.
We found that @qrohlf/bones 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.