@vijayhardaha/dev-config 2.1.1 → 2.2.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/package.json +14 -13
- package/src/gulp-smacss/index.js +267 -0
- package/src/gulp-smacss/index.test.js +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vijayhardaha/dev-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Reusable development configurations for Next.js + TypeScript projects",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "eslint .",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"./commitlint": "./src/commitlint/index.js",
|
|
52
52
|
"./stylelint": "./src/stylelint/index.js",
|
|
53
53
|
"./next-sitemap": "./src/next-sitemap/index.js",
|
|
54
|
+
"./gulp-smacss": "./src/gulp-smacss/index.js",
|
|
54
55
|
"./tsconfig": "./src/tsconfig/index.json",
|
|
55
56
|
"./jsconfig": "./src/jsconfig/index.json"
|
|
56
57
|
},
|
|
@@ -66,30 +67,30 @@
|
|
|
66
67
|
],
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@eslint/js": "^10.0.1",
|
|
69
|
-
"@commitlint/cli": "^21.0
|
|
70
|
-
"@commitlint/config-conventional": "^21.0
|
|
71
|
-
"@commitlint/types": "^21.0
|
|
72
|
-
"@typescript-eslint/parser": "^8.
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
74
|
-
"@vitest/coverage-v8": "^4.1.
|
|
75
|
-
"eslint": "^10.
|
|
70
|
+
"@commitlint/cli": "^21.1.0",
|
|
71
|
+
"@commitlint/config-conventional": "^21.1.0",
|
|
72
|
+
"@commitlint/types": "^21.1.0",
|
|
73
|
+
"@typescript-eslint/parser": "^8.62.0",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
|
75
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
76
|
+
"eslint": "^10.5.0",
|
|
76
77
|
"eslint-config-next": "^16.2.9",
|
|
77
78
|
"eslint-config-prettier": "^10.1.8",
|
|
78
|
-
"eslint-plugin-import-x": "^4.
|
|
79
|
-
"eslint-plugin-jsdoc": "^63.0.
|
|
79
|
+
"eslint-plugin-import-x": "^4.17.0",
|
|
80
|
+
"eslint-plugin-jsdoc": "^63.0.7",
|
|
80
81
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
81
82
|
"eslint-plugin-prettier": "^5.5.6",
|
|
82
83
|
"eslint-plugin-react": "^7.37.5",
|
|
83
84
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
84
|
-
"globals": "^17.
|
|
85
|
+
"globals": "^17.7.0",
|
|
85
86
|
"husky": "^9.1.7",
|
|
86
87
|
"next": "^16.2.9",
|
|
87
88
|
"prettier": "^3.8.4",
|
|
88
89
|
"@prettier/plugin-xml": "^3.4.2",
|
|
89
90
|
"release-it": "^20.2.0",
|
|
90
91
|
"typescript": "^6.0.3",
|
|
91
|
-
"typescript-eslint": "^8.
|
|
92
|
-
"vitest": "^4.1.
|
|
92
|
+
"typescript-eslint": "^8.62.0",
|
|
93
|
+
"vitest": "^4.1.9"
|
|
93
94
|
},
|
|
94
95
|
"peerDependencies": {
|
|
95
96
|
"@commitlint/cli": ">=21",
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
// ── Positioning ──
|
|
2
|
+
const positioning = [
|
|
3
|
+
'position',
|
|
4
|
+
'z-index',
|
|
5
|
+
'top',
|
|
6
|
+
'right',
|
|
7
|
+
'bottom',
|
|
8
|
+
'left',
|
|
9
|
+
'inset',
|
|
10
|
+
'inset-block',
|
|
11
|
+
'inset-inline',
|
|
12
|
+
'inset-block-start',
|
|
13
|
+
'inset-block-end',
|
|
14
|
+
'inset-inline-start',
|
|
15
|
+
'inset-inline-end',
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
// ── Display & visibility ──
|
|
19
|
+
const displayVisibility = ['display', 'visibility', 'opacity'];
|
|
20
|
+
|
|
21
|
+
// ── Float & clear ──
|
|
22
|
+
const floatClear = ['float', 'clear'];
|
|
23
|
+
|
|
24
|
+
// ── Flex & grid ──
|
|
25
|
+
const flexGrid = [
|
|
26
|
+
'flex',
|
|
27
|
+
'flex-grow',
|
|
28
|
+
'flex-shrink',
|
|
29
|
+
'flex-basis',
|
|
30
|
+
'flex-flow', // shorthand for flex-direction + flex-wrap
|
|
31
|
+
'flex-direction',
|
|
32
|
+
'flex-wrap',
|
|
33
|
+
'justify-content',
|
|
34
|
+
'align-items',
|
|
35
|
+
'align-self',
|
|
36
|
+
'align-content',
|
|
37
|
+
'place-items',
|
|
38
|
+
'place-content',
|
|
39
|
+
'place-self',
|
|
40
|
+
'order',
|
|
41
|
+
'gap',
|
|
42
|
+
'row-gap',
|
|
43
|
+
'column-gap',
|
|
44
|
+
'grid',
|
|
45
|
+
'grid-template',
|
|
46
|
+
'grid-template-columns',
|
|
47
|
+
'grid-template-rows',
|
|
48
|
+
'grid-template-areas',
|
|
49
|
+
'grid-area',
|
|
50
|
+
'grid-column',
|
|
51
|
+
'grid-row',
|
|
52
|
+
'grid-auto-flow',
|
|
53
|
+
'grid-auto-columns',
|
|
54
|
+
'grid-auto-rows',
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
// ── Box model ──
|
|
58
|
+
const boxModel = [
|
|
59
|
+
'columns',
|
|
60
|
+
'column-width',
|
|
61
|
+
'column-count',
|
|
62
|
+
'column-rule',
|
|
63
|
+
'column-span',
|
|
64
|
+
'column-fill',
|
|
65
|
+
'width',
|
|
66
|
+
'min-width',
|
|
67
|
+
'max-width',
|
|
68
|
+
'height',
|
|
69
|
+
'min-height',
|
|
70
|
+
'max-height',
|
|
71
|
+
'aspect-ratio',
|
|
72
|
+
'margin',
|
|
73
|
+
'margin-top',
|
|
74
|
+
'margin-right',
|
|
75
|
+
'margin-bottom',
|
|
76
|
+
'margin-left',
|
|
77
|
+
'margin-block',
|
|
78
|
+
'margin-inline',
|
|
79
|
+
'padding',
|
|
80
|
+
'padding-top',
|
|
81
|
+
'padding-right',
|
|
82
|
+
'padding-bottom',
|
|
83
|
+
'padding-left',
|
|
84
|
+
'padding-block',
|
|
85
|
+
'padding-inline',
|
|
86
|
+
'overflow',
|
|
87
|
+
'overflow-x',
|
|
88
|
+
'overflow-y',
|
|
89
|
+
'box-sizing',
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
// ── Border ──
|
|
93
|
+
const border = [
|
|
94
|
+
'border',
|
|
95
|
+
'border-top',
|
|
96
|
+
'border-right',
|
|
97
|
+
'border-bottom',
|
|
98
|
+
'border-left',
|
|
99
|
+
'border-color',
|
|
100
|
+
'border-style',
|
|
101
|
+
'border-width',
|
|
102
|
+
'border-radius',
|
|
103
|
+
'border-image',
|
|
104
|
+
'border-image-source',
|
|
105
|
+
'border-image-slice',
|
|
106
|
+
'border-image-width',
|
|
107
|
+
'border-image-outset',
|
|
108
|
+
'border-image-repeat',
|
|
109
|
+
'outline',
|
|
110
|
+
'outline-color',
|
|
111
|
+
'outline-style',
|
|
112
|
+
'outline-width',
|
|
113
|
+
'box-shadow',
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
// ── Table ──
|
|
117
|
+
const table = ['border-collapse', 'border-spacing', 'table-layout', 'caption-side', 'empty-cells'];
|
|
118
|
+
|
|
119
|
+
// ── Background ──
|
|
120
|
+
const background = [
|
|
121
|
+
'background',
|
|
122
|
+
'background-color',
|
|
123
|
+
'background-image',
|
|
124
|
+
'background-repeat',
|
|
125
|
+
'background-position',
|
|
126
|
+
'background-size',
|
|
127
|
+
'background-clip',
|
|
128
|
+
'background-origin',
|
|
129
|
+
'background-attachment',
|
|
130
|
+
'background-blend-mode',
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
// ── Text & typography ──
|
|
134
|
+
const textTypography = [
|
|
135
|
+
'color',
|
|
136
|
+
'font',
|
|
137
|
+
'font-family',
|
|
138
|
+
'font-size',
|
|
139
|
+
'font-style',
|
|
140
|
+
'font-weight',
|
|
141
|
+
'font-variant',
|
|
142
|
+
'font-variant-caps',
|
|
143
|
+
'font-variant-ligatures',
|
|
144
|
+
'font-variant-numeric',
|
|
145
|
+
'font-variant-east-asian',
|
|
146
|
+
'font-kerning',
|
|
147
|
+
'font-feature-settings',
|
|
148
|
+
'font-optical-sizing',
|
|
149
|
+
'font-stretch',
|
|
150
|
+
'line-height',
|
|
151
|
+
'letter-spacing',
|
|
152
|
+
'word-spacing',
|
|
153
|
+
'text-align',
|
|
154
|
+
'text-align-last',
|
|
155
|
+
'text-justify',
|
|
156
|
+
'text-indent',
|
|
157
|
+
'text-transform',
|
|
158
|
+
'text-decoration',
|
|
159
|
+
'text-decoration-color',
|
|
160
|
+
'text-decoration-style',
|
|
161
|
+
'text-decoration-thickness',
|
|
162
|
+
'text-underline-offset',
|
|
163
|
+
'text-underline-position',
|
|
164
|
+
'text-shadow',
|
|
165
|
+
'text-overflow',
|
|
166
|
+
'white-space',
|
|
167
|
+
'word-break',
|
|
168
|
+
'overflow-wrap',
|
|
169
|
+
'word-wrap', // legacy alias for overflow-wrap
|
|
170
|
+
'hyphens',
|
|
171
|
+
'tab-size',
|
|
172
|
+
'vertical-align',
|
|
173
|
+
'direction',
|
|
174
|
+
'writing-mode',
|
|
175
|
+
'text-orientation',
|
|
176
|
+
'text-rendering',
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
// ── Lists, counters & quotes ──
|
|
180
|
+
const listsCounters = [
|
|
181
|
+
'list-style',
|
|
182
|
+
'list-style-type',
|
|
183
|
+
'list-style-position',
|
|
184
|
+
'list-style-image',
|
|
185
|
+
'content',
|
|
186
|
+
'quotes',
|
|
187
|
+
'counter-reset',
|
|
188
|
+
'counter-increment',
|
|
189
|
+
'counter-set',
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
// ── Transform & animation ──
|
|
193
|
+
const transformAnimation = [
|
|
194
|
+
'transform',
|
|
195
|
+
'transform-origin',
|
|
196
|
+
'transform-style',
|
|
197
|
+
'perspective',
|
|
198
|
+
'perspective-origin',
|
|
199
|
+
'backface-visibility',
|
|
200
|
+
'transition',
|
|
201
|
+
'transition-property',
|
|
202
|
+
'transition-duration',
|
|
203
|
+
'transition-timing-function',
|
|
204
|
+
'transition-delay',
|
|
205
|
+
'animation',
|
|
206
|
+
'animation-name',
|
|
207
|
+
'animation-duration',
|
|
208
|
+
'animation-timing-function',
|
|
209
|
+
'animation-delay',
|
|
210
|
+
'animation-iteration-count',
|
|
211
|
+
'animation-direction',
|
|
212
|
+
'animation-fill-mode',
|
|
213
|
+
'animation-play-state',
|
|
214
|
+
'filter',
|
|
215
|
+
'backdrop-filter',
|
|
216
|
+
'mix-blend-mode',
|
|
217
|
+
'isolation',
|
|
218
|
+
];
|
|
219
|
+
|
|
220
|
+
// ── Cursor & pointer ──
|
|
221
|
+
const cursorPointer = ['cursor', 'pointer-events', 'user-select'];
|
|
222
|
+
|
|
223
|
+
// ── Scroll ──
|
|
224
|
+
const scroll = [
|
|
225
|
+
'scroll-behavior',
|
|
226
|
+
'scroll-snap-type',
|
|
227
|
+
'scroll-snap-align',
|
|
228
|
+
'scroll-snap-stop',
|
|
229
|
+
'scroll-margin',
|
|
230
|
+
'scroll-padding',
|
|
231
|
+
'overscroll-behavior',
|
|
232
|
+
];
|
|
233
|
+
|
|
234
|
+
// ── Other ──
|
|
235
|
+
const other = [
|
|
236
|
+
'clip-path',
|
|
237
|
+
'clip',
|
|
238
|
+
'object-fit',
|
|
239
|
+
'object-position',
|
|
240
|
+
'resize',
|
|
241
|
+
'appearance',
|
|
242
|
+
'accent-color',
|
|
243
|
+
'caret-color',
|
|
244
|
+
'color-scheme',
|
|
245
|
+
'contain',
|
|
246
|
+
'container',
|
|
247
|
+
'container-type',
|
|
248
|
+
'container-name',
|
|
249
|
+
];
|
|
250
|
+
|
|
251
|
+
// ── Final merged order (SMACSS) ──
|
|
252
|
+
export const smacssOrder = [
|
|
253
|
+
...positioning,
|
|
254
|
+
...displayVisibility,
|
|
255
|
+
...floatClear,
|
|
256
|
+
...flexGrid,
|
|
257
|
+
...boxModel,
|
|
258
|
+
...border,
|
|
259
|
+
...table,
|
|
260
|
+
...background,
|
|
261
|
+
...textTypography,
|
|
262
|
+
...listsCounters,
|
|
263
|
+
...transformAnimation,
|
|
264
|
+
...cursorPointer,
|
|
265
|
+
...scroll,
|
|
266
|
+
...other,
|
|
267
|
+
];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
// Test suite for the gulp-smacss module.
|
|
4
|
+
describe('gulp-smacss/index.js', () => {
|
|
5
|
+
it('should export smacssOrder array', async () => {
|
|
6
|
+
const module = await import('./index.js');
|
|
7
|
+
|
|
8
|
+
expect(Array.isArray(module.smacssOrder)).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('should include expected SMACSS properties in the order', async () => {
|
|
12
|
+
const module = await import('./index.js');
|
|
13
|
+
|
|
14
|
+
expect(module.smacssOrder).toContain('position');
|
|
15
|
+
expect(module.smacssOrder).toContain('display');
|
|
16
|
+
expect(module.smacssOrder).toContain('margin');
|
|
17
|
+
expect(module.smacssOrder).toContain('border');
|
|
18
|
+
expect(module.smacssOrder).toContain('color');
|
|
19
|
+
});
|
|
20
|
+
});
|