@zaininnari/postcss-cachebuster 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/index.mjs +6 -3
- package/package.json +2 -4
- package/eslint.config.js +0 -26
- package/postcss-cachebuster.iml +0 -9
package/CHANGELOG.md
CHANGED
package/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import crypto from 'crypto';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
|
|
5
|
-
import path from '
|
|
5
|
+
import path from 'node:path';
|
|
6
6
|
|
|
7
7
|
const checksums = {};
|
|
8
8
|
|
|
@@ -73,10 +73,13 @@ const plugin = (opts = {}) => {
|
|
|
73
73
|
function resolveUrl(assetUrl, file, imagesPath, isRootRelativeButNotProtocolRelative) {
|
|
74
74
|
let assetPath = decodeURI(assetUrl.pathname);
|
|
75
75
|
|
|
76
|
+
// URL pathname always use '/', so use the POSIX API here to avoid introducing OS-specific path separators.
|
|
77
|
+
const posixPath = path.posix;
|
|
78
|
+
|
|
76
79
|
if (isRootRelativeButNotProtocolRelative) {
|
|
77
|
-
assetPath =
|
|
80
|
+
assetPath = posixPath.join(imagesPath, assetPath);
|
|
78
81
|
} else {
|
|
79
|
-
assetPath =
|
|
82
|
+
assetPath = posixPath.join(opts.cssPath || posixPath.dirname(file), assetPath);
|
|
80
83
|
}
|
|
81
84
|
return assetPath;
|
|
82
85
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zaininnari/postcss-cachebuster",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Fork of postcss-cachebuster. Cachebusting all local files in css",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postcss",
|
|
@@ -33,9 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"main": "./index.mjs",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"chalk": "^5.6.2",
|
|
38
|
-
"path": "^0.12.7"
|
|
36
|
+
"chalk": "^5.6.2"
|
|
39
37
|
},
|
|
40
38
|
"devDependencies": {
|
|
41
39
|
"@eslint/js": "^9.39.2",
|
package/eslint.config.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import globals from 'globals';
|
|
3
|
-
import n from 'eslint-plugin-n';
|
|
4
|
-
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
5
|
-
import { defineConfig } from 'eslint/config';
|
|
6
|
-
|
|
7
|
-
export default defineConfig([
|
|
8
|
-
{
|
|
9
|
-
files: ['**/*.{js,mjs,cjs}'],
|
|
10
|
-
languageOptions: {
|
|
11
|
-
ecmaVersion: 'latest',
|
|
12
|
-
sourceType: 'module',
|
|
13
|
-
globals: {
|
|
14
|
-
...globals.node,
|
|
15
|
-
...globals.mocha,
|
|
16
|
-
myCustomGlobal: 'readonly',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
plugins: {
|
|
20
|
-
js,
|
|
21
|
-
n,
|
|
22
|
-
},
|
|
23
|
-
extends: ['js/recommended', 'n/recommended', eslintConfigPrettier],
|
|
24
|
-
ignores: ['eslint.config.js'],
|
|
25
|
-
},
|
|
26
|
-
]);
|
package/postcss-cachebuster.iml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|