Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
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.
symlink-resolver
Advanced tools
Readme
This tool allows to replace symbolic links by real files in given directory and revert the changes back to symlinks. All the magic in a simple cli command!
npm install symlink-resolver --save-dev
Node.js v6.4+ and POSIX-standarized operating system are required.
To your package.json
scripts
section add the following rule:
"scripts": {
"symlink-resolver": "symlink-resolver",
}
For fast usage you can simply run:
npm run symlink-resolver build ./symlinks/path
to replace symlinks by real files in ./symlinks/pathnpm run symlink-resolver clear ./symlinks/path
to restore all symlinksFirst command will create ./symlinks/path/.symlinks.json
file which contains changes that have been made in this directory. It will be removed by the second command, however you can still add to your .gitignore
the following rule: .symlinks.json
Use ln -s target source
command, i.e.:
ln -s ../../source/path/linked-dir ./project/src/linked-dir
If you need this feature to make a build, then I strongly recommend to automatize your building process:
"scripts": {
"symlink-resolver": "symlink-resolver",
"prebuild": "npm run symlink-resolver build ./symlinks/path",
"postbuild": "npm run symlink-resolver clear ./symlinks/path",
"build": "your build command should be under this name"
}
This way you will be able to make a build and edit your files without worries.
However, in some cases like emulating a device, the "post" script will not be executed. If this is also your case then take a look at example workaround for NativeScript:
"scripts": {
"symlink-resolver": "symlink-resolver",
"prens-bundle": "npm run symlink-resolver build ./symlinks/path",
"delay-clear": "sleep 22 && npm run symlink-resolver clear ./symlinks/path",
"ns-bundle": "npm run delay-clear | ns-bundle",
"start-android-bundle": "npm run ns-bundle --android --start-app",
"start-ios-bundle": "npm run ns-bundle --ios --start-app",
"build-android-bundle": "npm run ns-bundle --android --build-app",
"build-ios-bundle": "npm run ns-bundle --ios --build-app"
},
You can adjust Config
to your needs.
Config.symlinksFile
to whatever you want.SymlinkHelper
class and set Config.helperClass
to yours.export interface ConfigInterface {
rootDir: string;
symlinksFile: string;
helperClass: typeof SymlinkHelper;
}
FAQs
Simple tool for replacing symlinks by real files and vice versa.
The npm package symlink-resolver receives a total of 2,453 weekly downloads. As such, symlink-resolver popularity was classified as popular.
We found that symlink-resolver 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
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.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.