🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

postcss-hash

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-hash - npm Package Compare versions

Comparing version

to
0.2.1

3

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 0.2.1 (August 29, 2017)
* Fixed node 4.0.0 backward compatibility issue in code
## 0.2 (August 29, 2017)

@@ -5,0 +8,0 @@ * Added option to create `mainfest.json`.

17

package.json
{
"name": "postcss-hash",
"version": "0.2.0",
"version": "0.2.1",
"description": "PostCSS plugin to replace output file names with HASH algorithms (md5, sha256, sha512, etc) and string length of your choice - for cache busting",

@@ -38,3 +38,2 @@ "keywords": [

"fs-extra": "^4.0.1",
"jsonfile": "^3.0.1",
"lodash": "^4.17.4",

@@ -44,6 +43,10 @@ "postcss": "^6.0.1"

"devDependencies": {
"babel-core": "^6.26.0",
"babel-jest": "^20.0.3",
"babel-preset-es2015": "^6.24.1",
"eslint": "^3.19.0",
"eslint-config-postcss": "^2.0.2",
"jest": "^20.0.0",
"mock-fs": "^4.4.1"
"mock-fs": "^4.4.1",
"regenerator-runtime": "^0.11.0"
},

@@ -58,3 +61,6 @@ "scripts": {

"rules": {
"max-len": [2, 100]
"max-len": [
2,
100
]
},

@@ -75,3 +81,6 @@ "env": {

]
},
"babel": {
"presets": ["es2015"]
}
}

@@ -21,7 +21,6 @@ const crypto = require('crypto');

function rename(file, css, opts) {
return path.format({
dir: path.dirname(file),
name: path.parse(file).name + '.' + hash(css, opts.algorithm, opts.trim),
ext: path.extname(file)
});
return file
.substr(0, file.lastIndexOf('.')) + '.' +
hash(css, opts.algorithm, opts.trim) +
path.extname(file);
}

@@ -28,0 +27,0 @@