
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
normalize-paths
Advanced tools
Use this module to format a path configuration object in order to run it on Unix and Windows systems
Use this module to format a path configuration object in order to run it on Unix and Windows systems.
Allows you to write a clean path configuration whilst the plugin will take care of normalizing the paths depending on the OS running the script
With npm do
npm install normalize-paths --save
var normalizePaths = require('normalize-paths');
var assetsFolder = __dirname + '/public/assets';
var paths = {
srcs: {
js: __dirname + '/scripts/js',
sass: __dirname + '/sass'
},
dest: {
js: assetsFolder + '/js',
css: assetsFolder + '/css'
}
};
module.exports = normalizePaths(paths);
Output on Unix system:
{
srcs: {
js: '/home/taddei/project/scripts/js',
sass: '/home/taddei/project/sass'
},
dest: {
js: '/home/taddei/project/public/assets/js',
css: '/home/taddei/project/public/assets/css'
}
}
Output on Windows system:
{
srcs: {
js: 'c:\\Users\\taddei\\project\\scripts\\js',
sass: 'c:\\Users\\taddei\\project\\project\\sass'
},
dest: {
js: 'c:\\Users\\taddei\\project\\public\\assets\\js',
css: 'c:\\Users\\taddei\\project\\public\\assets\\css'
}
}
FAQs
Use this module to format a path configuration object in order to run it on Unix and Windows systems
The npm package normalize-paths receives a total of 31 weekly downloads. As such, normalize-paths popularity was classified as not popular.
We found that normalize-paths 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.