@lipemat/js-boilerplate 10.10.1 → 10.10.4
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/config/postcss.config.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const path_1 = require("path");
|
|
4
7
|
const fs_1 = require("fs");
|
|
5
8
|
const config_1 = require("../helpers/config");
|
|
6
9
|
const package_config_1 = require("../helpers/package-config");
|
|
7
|
-
const postcss_pretty_1 = require("../lib/postcss-pretty");
|
|
8
|
-
const postcss_clean_1 = require("../lib/postcss-clean");
|
|
10
|
+
const postcss_pretty_1 = __importDefault(require("../lib/postcss-pretty"));
|
|
11
|
+
const postcss_clean_1 = __importDefault(require("../lib/postcss-clean"));
|
|
9
12
|
const postcssPresetEnv = require('postcss-preset-env');
|
|
10
13
|
function isPluginsArray(value) {
|
|
11
14
|
return Array.isArray(value);
|
package/config/tsconfig.json
CHANGED
package/config/webpack.dev.js
CHANGED
package/helpers/config.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {BabelConfig} from '../config/babel.config';
|
|
|
5
5
|
import type {JestConfig} from '../config/jest.config';
|
|
6
6
|
import {getPackageConfig} from './package-config';
|
|
7
7
|
import type {EntriesConfig} from '../config/entries.config';
|
|
8
|
-
import type {
|
|
8
|
+
import type {PostCSSConfig} from '../config/postcss.config';
|
|
9
9
|
import type {CssLoaderConfig} from '../config/css-loader.config';
|
|
10
10
|
|
|
11
11
|
// Must be required to avoid issues with browserslist.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {getPackageConfig} from './package-config';
|
|
2
|
-
import type {GetLocalIdent
|
|
2
|
+
import type {GetLocalIdent} from '../types/css-loader';
|
|
3
|
+
import {AtLeast} from '../types/utility';
|
|
3
4
|
|
|
4
5
|
export const SHORT_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
5
6
|
export const ALPHABET = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
@@ -99,6 +100,8 @@ function incrementParent() {
|
|
|
99
100
|
counters.push( 0 );
|
|
100
101
|
}
|
|
101
102
|
|
|
103
|
+
type LocalIdentParams = Parameters<GetLocalIdent>;
|
|
104
|
+
|
|
102
105
|
/**
|
|
103
106
|
* Return a single character unique CSS class name based on WebPack
|
|
104
107
|
* css-loader's `getLocalIdentName` callback.
|
|
@@ -110,7 +113,7 @@ function incrementParent() {
|
|
|
110
113
|
*
|
|
111
114
|
* @link https://webpack.js.org/loaders/css-loader/#getlocalident
|
|
112
115
|
*/
|
|
113
|
-
export const getLocalIdent
|
|
116
|
+
export const getLocalIdent = ( {resourcePath}: AtLeast<LocalIdentParams[0], 'resourcePath'>, _: LocalIdentParams[1], localName: LocalIdentParams[2] ): ReturnType<GetLocalIdent> => {
|
|
114
117
|
classes[ resourcePath ] ||= {};
|
|
115
118
|
classes[ resourcePath ][ localName ] ||= getNextClass();
|
|
116
119
|
return classes[ resourcePath ][ localName ];
|
package/lib/postcss-clean.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.postcss = void 0;
|
|
4
7
|
/**
|
|
@@ -15,7 +18,7 @@ exports.postcss = void 0;
|
|
|
15
18
|
* @link https://www.npmjs.com/package/postcss-clean
|
|
16
19
|
*
|
|
17
20
|
*/
|
|
18
|
-
const postcss_1 = require("postcss");
|
|
21
|
+
const postcss_1 = __importDefault(require("postcss"));
|
|
19
22
|
// Can't use `import` due to the plugin not supporting a default export.
|
|
20
23
|
const CleanCSS = require('clean-css');
|
|
21
24
|
const cleaner = (opts = {}) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lipemat/js-boilerplate",
|
|
3
|
-
"version": "10.10.
|
|
3
|
+
"version": "10.10.4",
|
|
4
4
|
"description": "Dependencies and scripts for a no config JavaScript app",
|
|
5
5
|
"author": "Mat Lipe",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"scripts": {
|
|
37
37
|
"browserslist": "lipemat-js-boilerplate browserslist",
|
|
38
38
|
"build": "ts-node ./bin/build.ts",
|
|
39
|
-
"lint": "lipemat-js-boilerplate lint",
|
|
40
39
|
"prepublishOnly": "yarn run build",
|
|
41
40
|
"test": "lipemat-js-boilerplate test",
|
|
42
41
|
"validate-ts": "tsc --noEmit",
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"@babel/preset-react": "^7.24.7",
|
|
51
50
|
"@babel/preset-typescript": "^7.24.7",
|
|
52
51
|
"@csstools/postcss-global-data": "2.0.0",
|
|
53
|
-
"@lipemat/eslint-config": "^3.
|
|
52
|
+
"@lipemat/eslint-config": "^3.4.2",
|
|
54
53
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
|
55
54
|
"@statoscope/webpack-plugin": "^5.28.2",
|
|
56
55
|
"@teamsupercell/typings-for-css-modules-loader": "^2.5.2",
|
|
@@ -78,7 +77,7 @@
|
|
|
78
77
|
"jest-environment-jsdom": "^29.0.0",
|
|
79
78
|
"mini-css-extract-plugin": "^1.3.3",
|
|
80
79
|
"minimist": "^1.2.8",
|
|
81
|
-
"postcss": "^8.4.
|
|
80
|
+
"postcss": "^8.4.47",
|
|
82
81
|
"postcss-color-mod-function": "^3.0.3",
|
|
83
82
|
"postcss-custom-media": "^8.0.1",
|
|
84
83
|
"postcss-import": "^15.1.0",
|
|
@@ -92,7 +91,7 @@
|
|
|
92
91
|
"style-loader": "^3.3.1",
|
|
93
92
|
"ts-node": "^10.9.1",
|
|
94
93
|
"typescript": "^5.5.2",
|
|
95
|
-
"webpack": "^5.
|
|
94
|
+
"webpack": "^5.95.0",
|
|
96
95
|
"webpack-assets-manifest": "^5.0.6",
|
|
97
96
|
"webpack-cli": "^4.9.1",
|
|
98
97
|
"webpack-dev-server": "^4.7.2",
|
|
@@ -108,5 +107,5 @@
|
|
|
108
107
|
"memfs": "^3.5.3",
|
|
109
108
|
"setimmediate": "^1.0.5"
|
|
110
109
|
},
|
|
111
|
-
"packageManager": "yarn@4.
|
|
110
|
+
"packageManager": "yarn@4.5.1"
|
|
112
111
|
}
|