@penskemediacorp/larva 0.6.2 → 0.6.4-develop.17

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.
@@ -86,7 +86,7 @@ $artnews-map: (
86
86
  'body-s-font-size-desktop': (16px),
87
87
  'body-xxs-font-size-desktop': (initial),
88
88
  'primary-s-font-size-desktop': (24px),
89
- 'primary-xxs-font-size-desktop': (36px),
89
+ 'primary-xxs-font-size-desktop': (18px),
90
90
  'secondary-regular-m-font-size-desktop-xl': (15px),
91
91
  'secondary-xl-font-size-desktop-xl': (initial),
92
92
  'accent-s-font-size-desktop-xl': (23px),
@@ -94,7 +94,7 @@ $artnews-map: (
94
94
  'accent-l-font-size-desktop': (58px),
95
95
  'accent-m-font-size-desktop': (26px),
96
96
  'primary-xxxs-font-size-desktop': (20px),
97
- 'primary-xs-font-size-desktop': (36px),
97
+ 'primary-xs-font-size-desktop': (26px),
98
98
  'body-xxxs-font-size-desktop': (initial),
99
99
  'body-xs-font-size-desktop': (initial),
100
100
  'secondary-s-font-size-mobile': (11px),
@@ -133,7 +133,7 @@ $artnews-map: (
133
133
  'secondary-l-font-size-desktop': (42px),
134
134
  'secondary-regular-m-font-size-mobile': (15px),
135
135
  'accent-xxs-font-size-mobile': (14px),
136
- 'secondary-m-font-size-desktop': (20px),
136
+ 'secondary-m-font-size-desktop': (16px),
137
137
  'basic-s-font-size-desktop': (initial),
138
138
  'basic-xxs-font-size-desktop': (initial),
139
139
  'accent-s-font-size-mobile': (23px),
@@ -162,7 +162,7 @@ $artnews-map: (
162
162
  'secondary-s-font-size-desktop': (12px),
163
163
  'basic-xs-font-size-desktop-xl': (initial),
164
164
  'accent-l-font-size-mobile': (40px),
165
- 'primary-xxs-font-size-mobile': (26px),
165
+ 'primary-xxs-font-size-mobile': (19px),
166
166
  'primary-s-font-size-mobile': (21px),
167
167
  'body-xxs-font-size-mobile': (initial),
168
168
  'body-s-font-size-mobile': (16px),
@@ -182,7 +182,7 @@ $artnews-map: (
182
182
  'primary-m-font-size-mobile': (28px),
183
183
  'body-m-font-size-desktop': (18px),
184
184
  'body-m-font-size-mobile': (18px),
185
- 'primary-m-font-size-desktop': (30px),
185
+ 'primary-m-font-size-desktop': (16px),
186
186
  'accent-xs-font-size-desktop': (23px),
187
187
  'secondary-xs-letter-spacing-desktop': (normal),
188
188
  'secondary-xxs-letter-spacing-mobile': (normal),
@@ -248,7 +248,7 @@ $artnews-map: (
248
248
  'basic-s-letter-spacing-desktop-xl': (normal),
249
249
  'accent-m-letter-spacing-mobile': (.74px),
250
250
  'primary-xxxs-letter-spacing-mobile': (normal),
251
- 'primary-xxs-letter-spacing-desktop': (normal),
251
+ 'primary-xxs-letter-spacing-desktop': (.52px),
252
252
  'primary-xs-letter-spacing-mobile': (normal),
253
253
  'body-xxs-letter-spacing-desktop': (normal),
254
254
  'body-xxxs-letter-spacing-mobile': (normal),
@@ -765,8 +765,8 @@
765
765
  "status": "alpha",
766
766
  "category": "font-size",
767
767
  "type": "number",
768
- "value": "36px",
769
- "originalValue": "36px",
768
+ "value": "18px",
769
+ "originalValue": "18px",
770
770
  "name": "PRIMARY_XXS_FONT_SIZE_DESKTOP"
771
771
  },
772
772
  "SECONDARY_REGULAR_M_FONT_SIZE_DESKTOP_XL": {
@@ -835,8 +835,8 @@
835
835
  "status": "alpha",
836
836
  "category": "font-size",
837
837
  "type": "number",
838
- "value": "36px",
839
- "originalValue": "36px",
838
+ "value": "26px",
839
+ "originalValue": "26px",
840
840
  "name": "PRIMARY_XS_FONT_SIZE_DESKTOP"
841
841
  },
842
842
  "BODY_XXXS_FONT_SIZE_DESKTOP": {
@@ -1146,8 +1146,8 @@
1146
1146
  "status": "alpha",
1147
1147
  "category": "font-size",
1148
1148
  "type": "number",
1149
- "value": "20px",
1150
- "originalValue": "20px",
1149
+ "value": "16px",
1150
+ "originalValue": "16px",
1151
1151
  "name": "SECONDARY_M_FONT_SIZE_DESKTOP"
1152
1152
  },
1153
1153
  "BASIC_S_FONT_SIZE_DESKTOP": {
@@ -1375,8 +1375,8 @@
1375
1375
  "status": "alpha",
1376
1376
  "category": "font-size",
1377
1377
  "type": "number",
1378
- "value": "26px",
1379
- "originalValue": "26px",
1378
+ "value": "19px",
1379
+ "originalValue": "19px",
1380
1380
  "name": "PRIMARY_XXS_FONT_SIZE_MOBILE"
1381
1381
  },
1382
1382
  "PRIMARY_S_FONT_SIZE_MOBILE": {
@@ -1535,8 +1535,8 @@
1535
1535
  "status": "alpha",
1536
1536
  "category": "font-size",
1537
1537
  "type": "number",
1538
- "value": "30px",
1539
- "originalValue": "30px",
1538
+ "value": "16px",
1539
+ "originalValue": "16px",
1540
1540
  "name": "PRIMARY_M_FONT_SIZE_DESKTOP"
1541
1541
  },
1542
1542
  "ACCENT_XS_FONT_SIZE_DESKTOP": {
@@ -2017,8 +2017,8 @@
2017
2017
  "PRIMARY_XXS_LETTER_SPACING_DESKTOP": {
2018
2018
  "category": "letter-spacing",
2019
2019
  "type": "number",
2020
- "value": "normal",
2021
- "originalValue": "normal",
2020
+ "value": ".52px",
2021
+ "originalValue": ".52px",
2022
2022
  "name": "PRIMARY_XXS_LETTER_SPACING_DESKTOP"
2023
2023
  },
2024
2024
  "PRIMARY_XS_LETTER_SPACING_MOBILE": {
@@ -325,12 +325,12 @@
325
325
  --body-xxxl-font-weight-mobile: normal;
326
326
  --primary-xl-font-weight-mobile: bold;
327
327
  --secondary-xxl-font-weight-desktop: normal;
328
- --secondary-l-font-weight-desktop: 600;
328
+ --secondary-l-font-weight-desktop: 400;
329
329
  --body-m-font-weight-mobile: normal;
330
330
  --basic-xxs-font-weight-desktop: 600;
331
331
  --accent-xs-font-weight-mobile: 300;
332
332
  --basic-xl-font-weight-desktop-xl: 600;
333
- --secondary-m-font-weight-desktop: 600;
333
+ --secondary-m-font-weight-desktop: 400;
334
334
  --basic-s-font-weight-desktop: 600;
335
335
  --primary-m-font-weight-mobile: bold;
336
336
  --primary-xxl-font-weight-mobile: bold;
@@ -340,8 +340,8 @@
340
340
  --basic-xl-font-weight-desktop: 600;
341
341
  --basic-xxs-font-weight-desktop-xl: 600;
342
342
  --basic-s-font-weight-desktop-xl: 600;
343
- --secondary-m-font-weight-desktop-xl: 600;
344
- --secondary-l-font-weight-desktop-xl: 600;
343
+ --secondary-m-font-weight-desktop-xl: 400;
344
+ --secondary-l-font-weight-desktop-xl: 400;
345
345
  --secondary-xxl-font-weight-desktop-xl: normal;
346
346
  --basic-xs-font-weight-mobile: 600;
347
347
  --secondary-xs-font-weight-desktop: normal;
@@ -375,11 +375,11 @@
375
375
  --basic-xxs-font-weight-mobile: 600;
376
376
  --accent-xs-font-weight-desktop: 300;
377
377
  --basic-s-font-weight-mobile: 600;
378
- --secondary-m-font-weight-mobile: 600;
378
+ --secondary-m-font-weight-mobile: 400;
379
379
  --primary-xl-font-weight-desktop: bold;
380
380
  --body-xxxl-font-weight-desktop: normal;
381
381
  --body-xl-font-weight-desktop: normal;
382
- --secondary-l-font-weight-mobile: 600;
382
+ --secondary-l-font-weight-mobile: 400;
383
383
  --secondary-xxl-font-weight-mobile: normal;
384
384
  --primary-xxs-font-weight-desktop-xl: bold;
385
385
  --primary-s-font-weight-desktop-xl: bold;
@@ -449,7 +449,7 @@
449
449
  --basic-xl-line-height-mobile: 17px;
450
450
  --accent-regular-xxs-line-height-desktop: 26px;
451
451
  --body-xs-line-height-desktop-xl: 15px;
452
- --primary-xs-line-height-desktop-xl: 20px;
452
+ --primary-xs-line-height-desktop-xl: 22px;
453
453
  --body-xxxs-line-height-desktop-xl: 17px;
454
454
  --primary-xxxs-line-height-desktop-xl: 23px;
455
455
  --accent-m-line-height-desktop-xl: 26px;
@@ -310,12 +310,12 @@
310
310
  "BODY_XXXL_FONT_WEIGHT_MOBILE": "normal",
311
311
  "PRIMARY_XL_FONT_WEIGHT_MOBILE": "bold",
312
312
  "SECONDARY_XXL_FONT_WEIGHT_DESKTOP": "normal",
313
- "SECONDARY_L_FONT_WEIGHT_DESKTOP": "600",
313
+ "SECONDARY_L_FONT_WEIGHT_DESKTOP": "400",
314
314
  "BODY_M_FONT_WEIGHT_MOBILE": "normal",
315
315
  "BASIC_XXS_FONT_WEIGHT_DESKTOP": "600",
316
316
  "ACCENT_XS_FONT_WEIGHT_MOBILE": "300",
317
317
  "BASIC_XL_FONT_WEIGHT_DESKTOP_XL": "600",
318
- "SECONDARY_M_FONT_WEIGHT_DESKTOP": "600",
318
+ "SECONDARY_M_FONT_WEIGHT_DESKTOP": "400",
319
319
  "BASIC_S_FONT_WEIGHT_DESKTOP": "600",
320
320
  "PRIMARY_M_FONT_WEIGHT_MOBILE": "bold",
321
321
  "PRIMARY_XXL_FONT_WEIGHT_MOBILE": "bold",
@@ -325,8 +325,8 @@
325
325
  "BASIC_XL_FONT_WEIGHT_DESKTOP": "600",
326
326
  "BASIC_XXS_FONT_WEIGHT_DESKTOP_XL": "600",
327
327
  "BASIC_S_FONT_WEIGHT_DESKTOP_XL": "600",
328
- "SECONDARY_M_FONT_WEIGHT_DESKTOP_XL": "600",
329
- "SECONDARY_L_FONT_WEIGHT_DESKTOP_XL": "600",
328
+ "SECONDARY_M_FONT_WEIGHT_DESKTOP_XL": "400",
329
+ "SECONDARY_L_FONT_WEIGHT_DESKTOP_XL": "400",
330
330
  "SECONDARY_XXL_FONT_WEIGHT_DESKTOP_XL": "normal",
331
331
  "BASIC_XS_FONT_WEIGHT_MOBILE": "600",
332
332
  "SECONDARY_XS_FONT_WEIGHT_DESKTOP": "normal",
@@ -360,11 +360,11 @@
360
360
  "BASIC_XXS_FONT_WEIGHT_MOBILE": "600",
361
361
  "ACCENT_XS_FONT_WEIGHT_DESKTOP": "300",
362
362
  "BASIC_S_FONT_WEIGHT_MOBILE": "600",
363
- "SECONDARY_M_FONT_WEIGHT_MOBILE": "600",
363
+ "SECONDARY_M_FONT_WEIGHT_MOBILE": "400",
364
364
  "PRIMARY_XL_FONT_WEIGHT_DESKTOP": "bold",
365
365
  "BODY_XXXL_FONT_WEIGHT_DESKTOP": "normal",
366
366
  "BODY_XL_FONT_WEIGHT_DESKTOP": "normal",
367
- "SECONDARY_L_FONT_WEIGHT_MOBILE": "600",
367
+ "SECONDARY_L_FONT_WEIGHT_MOBILE": "400",
368
368
  "SECONDARY_XXL_FONT_WEIGHT_MOBILE": "normal",
369
369
  "PRIMARY_XXS_FONT_WEIGHT_DESKTOP_XL": "bold",
370
370
  "PRIMARY_S_FONT_WEIGHT_DESKTOP_XL": "bold",
@@ -434,7 +434,7 @@
434
434
  "BASIC_XL_LINE_HEIGHT_MOBILE": "17px",
435
435
  "ACCENT_REGULAR_XXS_LINE_HEIGHT_DESKTOP": "26px",
436
436
  "BODY_XS_LINE_HEIGHT_DESKTOP_XL": "15px",
437
- "PRIMARY_XS_LINE_HEIGHT_DESKTOP_XL": "20px",
437
+ "PRIMARY_XS_LINE_HEIGHT_DESKTOP_XL": "22px",
438
438
  "BODY_XXXS_LINE_HEIGHT_DESKTOP_XL": "17px",
439
439
  "PRIMARY_XXXS_LINE_HEIGHT_DESKTOP_XL": "23px",
440
440
  "ACCENT_M_LINE_HEIGHT_DESKTOP_XL": "26px",
@@ -325,12 +325,12 @@ $rollingstone-2022-map: (
325
325
  'body-xxxl-font-weight-mobile': (normal),
326
326
  'primary-xl-font-weight-mobile': (bold),
327
327
  'secondary-xxl-font-weight-desktop': (normal),
328
- 'secondary-l-font-weight-desktop': (600),
328
+ 'secondary-l-font-weight-desktop': (400),
329
329
  'body-m-font-weight-mobile': (normal),
330
330
  'basic-xxs-font-weight-desktop': (600),
331
331
  'accent-xs-font-weight-mobile': (300),
332
332
  'basic-xl-font-weight-desktop-xl': (600),
333
- 'secondary-m-font-weight-desktop': (600),
333
+ 'secondary-m-font-weight-desktop': (400),
334
334
  'basic-s-font-weight-desktop': (600),
335
335
  'primary-m-font-weight-mobile': (bold),
336
336
  'primary-xxl-font-weight-mobile': (bold),
@@ -340,8 +340,8 @@ $rollingstone-2022-map: (
340
340
  'basic-xl-font-weight-desktop': (600),
341
341
  'basic-xxs-font-weight-desktop-xl': (600),
342
342
  'basic-s-font-weight-desktop-xl': (600),
343
- 'secondary-m-font-weight-desktop-xl': (600),
344
- 'secondary-l-font-weight-desktop-xl': (600),
343
+ 'secondary-m-font-weight-desktop-xl': (400),
344
+ 'secondary-l-font-weight-desktop-xl': (400),
345
345
  'secondary-xxl-font-weight-desktop-xl': (normal),
346
346
  'basic-xs-font-weight-mobile': (600),
347
347
  'secondary-xs-font-weight-desktop': (normal),
@@ -375,11 +375,11 @@ $rollingstone-2022-map: (
375
375
  'basic-xxs-font-weight-mobile': (600),
376
376
  'accent-xs-font-weight-desktop': (300),
377
377
  'basic-s-font-weight-mobile': (600),
378
- 'secondary-m-font-weight-mobile': (600),
378
+ 'secondary-m-font-weight-mobile': (400),
379
379
  'primary-xl-font-weight-desktop': (bold),
380
380
  'body-xxxl-font-weight-desktop': (normal),
381
381
  'body-xl-font-weight-desktop': (normal),
382
- 'secondary-l-font-weight-mobile': (600),
382
+ 'secondary-l-font-weight-mobile': (400),
383
383
  'secondary-xxl-font-weight-mobile': (normal),
384
384
  'primary-xxs-font-weight-desktop-xl': (bold),
385
385
  'primary-s-font-weight-desktop-xl': (bold),
@@ -449,7 +449,7 @@ $rollingstone-2022-map: (
449
449
  'basic-xl-line-height-mobile': (17px),
450
450
  'accent-regular-xxs-line-height-desktop': (26px),
451
451
  'body-xs-line-height-desktop-xl': (15px),
452
- 'primary-xs-line-height-desktop-xl': (20px),
452
+ 'primary-xs-line-height-desktop-xl': (22px),
453
453
  'body-xxxs-line-height-desktop-xl': (17px),
454
454
  'primary-xxxs-line-height-desktop-xl': (23px),
455
455
  'accent-m-line-height-desktop-xl': (26px),
@@ -2506,12 +2506,10 @@
2506
2506
  "name": "SECONDARY_XXL_FONT_WEIGHT_DESKTOP"
2507
2507
  },
2508
2508
  "SECONDARY_L_FONT_WEIGHT_DESKTOP": {
2509
- "selector": "lrv-a-font",
2510
- "status": "alpha",
2511
2509
  "category": "font-weight",
2512
2510
  "type": "number",
2513
- "value": "600",
2514
- "originalValue": "600",
2511
+ "value": "400",
2512
+ "originalValue": "400",
2515
2513
  "name": "SECONDARY_L_FONT_WEIGHT_DESKTOP"
2516
2514
  },
2517
2515
  "BODY_M_FONT_WEIGHT_MOBILE": {
@@ -2545,12 +2543,10 @@
2545
2543
  "originalValue": "600"
2546
2544
  },
2547
2545
  "SECONDARY_M_FONT_WEIGHT_DESKTOP": {
2548
- "selector": "lrv-a-font",
2549
- "status": "alpha",
2550
2546
  "category": "font-weight",
2551
2547
  "type": "number",
2552
- "value": "600",
2553
- "originalValue": "600",
2548
+ "value": "400",
2549
+ "originalValue": "400",
2554
2550
  "name": "SECONDARY_M_FONT_WEIGHT_DESKTOP"
2555
2551
  },
2556
2552
  "BASIC_S_FONT_WEIGHT_DESKTOP": {
@@ -2617,21 +2613,17 @@
2617
2613
  "originalValue": "600"
2618
2614
  },
2619
2615
  "SECONDARY_M_FONT_WEIGHT_DESKTOP_XL": {
2620
- "selector": "lrv-a-font",
2621
- "status": "alpha",
2622
2616
  "category": "font-weight",
2623
2617
  "type": "number",
2624
- "value": "600",
2625
- "originalValue": "600",
2618
+ "value": "400",
2619
+ "originalValue": "400",
2626
2620
  "name": "SECONDARY_M_FONT_WEIGHT_DESKTOP_XL"
2627
2621
  },
2628
2622
  "SECONDARY_L_FONT_WEIGHT_DESKTOP_XL": {
2629
- "selector": "lrv-a-font",
2630
- "status": "alpha",
2631
2623
  "category": "font-weight",
2632
2624
  "type": "number",
2633
- "value": "600",
2634
- "originalValue": "600",
2625
+ "value": "400",
2626
+ "originalValue": "400",
2635
2627
  "name": "SECONDARY_L_FONT_WEIGHT_DESKTOP_XL"
2636
2628
  },
2637
2629
  "SECONDARY_XXL_FONT_WEIGHT_DESKTOP_XL": {
@@ -2880,12 +2872,10 @@
2880
2872
  "name": "BASIC_S_FONT_WEIGHT_MOBILE"
2881
2873
  },
2882
2874
  "SECONDARY_M_FONT_WEIGHT_MOBILE": {
2883
- "selector": "lrv-a-font",
2884
- "status": "alpha",
2885
2875
  "category": "font-weight",
2886
2876
  "type": "number",
2887
- "value": "600",
2888
- "originalValue": "600",
2877
+ "value": "400",
2878
+ "originalValue": "400",
2889
2879
  "name": "SECONDARY_M_FONT_WEIGHT_MOBILE"
2890
2880
  },
2891
2881
  "PRIMARY_XL_FONT_WEIGHT_DESKTOP": {
@@ -2910,12 +2900,10 @@
2910
2900
  "name": "BODY_XL_FONT_WEIGHT_DESKTOP"
2911
2901
  },
2912
2902
  "SECONDARY_L_FONT_WEIGHT_MOBILE": {
2913
- "selector": "lrv-a-font",
2914
- "status": "alpha",
2915
2903
  "category": "font-weight",
2916
2904
  "type": "number",
2917
- "value": "600",
2918
- "originalValue": "600",
2905
+ "value": "400",
2906
+ "originalValue": "400",
2919
2907
  "name": "SECONDARY_L_FONT_WEIGHT_MOBILE"
2920
2908
  },
2921
2909
  "SECONDARY_XXL_FONT_WEIGHT_MOBILE": {
@@ -3436,8 +3424,8 @@
3436
3424
  "PRIMARY_XS_LINE_HEIGHT_DESKTOP_XL": {
3437
3425
  "category": "line-height",
3438
3426
  "type": "number",
3439
- "value": "20px",
3440
- "originalValue": "20px",
3427
+ "value": "22px",
3428
+ "originalValue": "22px",
3441
3429
  "name": "PRIMARY_XS_LINE_HEIGHT_DESKTOP_XL"
3442
3430
  },
3443
3431
  "BODY_XXXS_LINE_HEIGHT_DESKTOP_XL": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@penskemediacorp/larva",
3
- "version": "0.6.2",
3
+ "version": "0.6.4-develop.17+854eedf7",
4
4
  "description": "> TODO: description",
5
5
  "author": "laras126 <laras126@gmail.com>",
6
6
  "homepage": "https://github.com/Penske-Media-Corp/pmc-larva/tree/master/packages/larva#readme",
@@ -43,16 +43,16 @@
43
43
  "dependencies": {
44
44
  "@babel/core": "^7.10.5",
45
45
  "@babel/preset-env": "^7.10.4",
46
- "@penskemediacorp/backstopjs-config": "^0.6.0",
47
- "@penskemediacorp/eslint-config": "^0.6.0",
48
- "@penskemediacorp/larva-css": "^0.6.2",
49
- "@penskemediacorp/larva-js": "^0.6.0",
50
- "@penskemediacorp/larva-patterns": "^0.6.2",
51
- "@penskemediacorp/larva-scss": "^0.6.0",
52
- "@penskemediacorp/larva-svg": "^0.6.0",
53
- "@penskemediacorp/larva-tokens": "^0.6.0",
54
- "@penskemediacorp/stylelint-config": "^0.6.0",
55
- "@penskemediacorp/twig-to-php-parser": "^0.6.1",
46
+ "@penskemediacorp/backstopjs-config": "^0.6.4-develop.17+854eedf7",
47
+ "@penskemediacorp/eslint-config": "^0.6.4-develop.17+854eedf7",
48
+ "@penskemediacorp/larva-css": "^0.6.4-develop.17+854eedf7",
49
+ "@penskemediacorp/larva-js": "^0.6.4-develop.17+854eedf7",
50
+ "@penskemediacorp/larva-patterns": "^0.6.4-develop.17+854eedf7",
51
+ "@penskemediacorp/larva-scss": "^0.6.4-develop.17+854eedf7",
52
+ "@penskemediacorp/larva-svg": "^0.6.4-develop.17+854eedf7",
53
+ "@penskemediacorp/larva-tokens": "^0.6.4-develop.17+854eedf7",
54
+ "@penskemediacorp/stylelint-config": "^0.6.4-develop.17+854eedf7",
55
+ "@penskemediacorp/twig-to-php-parser": "^0.6.4-develop.17+854eedf7",
56
56
  "axios": "^0.21.1",
57
57
  "babel-loader": "^8.1.0",
58
58
  "chalk": "^4.1.0",
@@ -81,6 +81,7 @@
81
81
  "nodemon": "^2.0.4",
82
82
  "postcss": "^7.0.35",
83
83
  "sass": "^1.32.8",
84
+ "shelljs": "^0.8.5",
84
85
  "stylelint": "^13.6.1",
85
86
  "svg-sprite": "^1.5.0",
86
87
  "svgo": "^1.3.2",
@@ -88,5 +89,5 @@
88
89
  "webpack": "^4.43.0",
89
90
  "webpack-cli": "^3.3.12"
90
91
  },
91
- "gitHead": "c54da41f516960a630885fb7ce9bd12bc00dff6e"
92
+ "gitHead": "854eedf76f31c2ed8f5300329cc2242f936e69b8"
92
93
  }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Help command for Larva.
3
+ *
4
+ * ## OPTIONS
5
+ *
6
+ * [<command>]
7
+ * : Slug of a command to display the CLI usage information.
8
+ *
9
+ * ## EXAMPLES
10
+ *
11
+ * # Display a list of available commands.
12
+ * $ npx @penskemediacorp/larva help
13
+ *
14
+ * # Display the prod command docblock.
15
+ * $ npx @penskemediacorp/larva help prod
16
+ */
17
+
18
+ // Dependencies.
19
+ const fs = require('fs');
20
+ const path = require( 'path' );
21
+ const shell = require( 'shelljs' );
22
+
23
+ // CLI arguments.
24
+ const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
25
+ const cliArgs = getArgsFromCli();
26
+
27
+ const allowedCommands = [
28
+ 'help',
29
+ 'link-all',
30
+ 'lint',
31
+ 'prod',
32
+ 'start',
33
+ 'upgrade',
34
+ ];
35
+
36
+ // Display a generic help description.
37
+ if ( 2 !== cliArgs.length ) {
38
+ console.log( 'Usage: npx @penskemediacorp/larval <command> [--help]\n' );
39
+ console.log( `Where <command> is one of ${allowedCommands.join( ', ' )}.\n` );
40
+ return;
41
+ }
42
+
43
+ // Check for invalid commands.
44
+ const command = cliArgs[1];
45
+ if ( ! allowedCommands.includes( command ) ) {
46
+ console.log( `Invalid command '${command}'.\n` );
47
+ return;
48
+ }
49
+
50
+ // Display the docblock for a given command.
51
+ const pathToFile = path.resolve( __dirname, `${command}.js` );
52
+ try {
53
+ if ( fs.existsSync( pathToFile ) ) {
54
+ fs.readFile( pathToFile, 'utf8', ( error, data ) => {
55
+ if ( error ) {
56
+ console.error( error );
57
+ return;
58
+ }
59
+ const fileParts = data.split( '*/', 1 );
60
+ console.log( fileParts[0] + '*/' );
61
+ } );
62
+ }
63
+ } catch( error ) {
64
+ console.error( error );
65
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * This command can be used from within any Larva project to link the Larva
3
+ * packages (from the monorepo) for local development.
4
+ *
5
+ * @see https://github.com/penske-media-corp/pmc-larva/blob/master/README.md#linking-larva-for-local-development
6
+ *
7
+ * ## OPTIONS
8
+ *
9
+ * [--help]
10
+ * : Display usage and examples for this command.
11
+ *
12
+ * ## EXAMPLES
13
+ *
14
+ * # NPM link local packages to Larva monorepo.
15
+ * $ npx @penskemediacorp/larva link-all
16
+ *
17
+ * # Help command.
18
+ * $ npx @penskemediacorp/larva link-all help
19
+ */
20
+
21
+ const shell = require( 'shelljs' );
22
+
23
+ // CLI arguments.
24
+ const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
25
+ const cliArgs = getArgsFromCli();
26
+
27
+ // Handle help command.
28
+ if ( cliArgs.includes( '--help' ) ) {
29
+ shell.exec( `npx @penskemediacorp/larva help link-all` );
30
+ return;
31
+ }
32
+
33
+ shell.exec( 'npm link @penskemediacorp/larva' );
34
+ shell.exec( 'npm link @penskemediacorp/larva-css' );
35
+ shell.exec( 'npm link @penskemediacorp/larva-js' );
36
+ shell.exec( 'npm link @penskemediacorp/larva-patterns' );
37
+ shell.exec( 'npm link @penskemediacorp/larva-scss' );
38
+ shell.exec( 'npm link @penskemediacorp/larva-svg' );
39
+ shell.exec( 'npm link @penskemediacorp/larva-tokens' );
40
+ shell.exec( 'npm link @penskemediacorp/twig-to-php-parser' );
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Lint JavaScript and CSS files in a Larva project.
3
+ *
4
+ * ## OPTIONS
5
+ *
6
+ * [--help]
7
+ * : Display usage and examples for this command.
8
+ *
9
+ * [--css]
10
+ * : Lint CSS assets.
11
+ *
12
+ * [--js]
13
+ * : Lint JavaScript assets.
14
+ *
15
+ * [--fix]
16
+ * : Try to automatically fix any issues that arise while linting.
17
+ *
18
+ * ## EXAMPLES
19
+ *
20
+ * # Lint CSS and JavaScript assets.
21
+ * $ npx @penskemediacorp/larva lint
22
+ *
23
+ * # Only lint CSS assets.
24
+ * $ npx @penskemediacorp/larva lint --css
25
+ *
26
+ * # Only lint JavaScripot assets.
27
+ * $ npx @penskemediacorp/larva lint --js
28
+ *
29
+ * # Fix CSS and JavaScript assets.
30
+ * $ npx @penskemediacorp/larva lint --fix
31
+ *
32
+ * # Mix and match, fix JavaScript assets.
33
+ * $ npx @penskemediacorp/larva lint --js --fix
34
+ *
35
+ * # Help command.
36
+ * $ npx @penskemediacorp/larva lint --help
37
+ */
38
+
39
+ // Dependencies.
40
+ const path = require( 'path' );
41
+ const shell = require( 'shelljs' );
42
+
43
+ // Construct some paths to point our scripts at.
44
+ const binPath = path.resolve( __dirname, '../bin/larva.js' ); // For sibling scripts.
45
+ const workingDirectory = process.cwd(); // For paths relative to the directory this script was called from.
46
+
47
+ // CLI arguments.
48
+ const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
49
+ const cliArgs = getArgsFromCli();
50
+
51
+ // Handle help command.
52
+ if ( cliArgs.includes( '--help' ) ) {
53
+ shell.exec( `npx @penskemediacorp/larva help lint` );
54
+ return;
55
+ }
56
+
57
+ // Trigger linting when a specific flag is present, or when neither flag is
58
+ // present.
59
+ const lintCSS = cliArgs.includes( '--css' ) || ! cliArgs.includes( '--js' );
60
+ const lintJS = cliArgs.includes( '--js' ) || ! cliArgs.includes( '--css' );
61
+
62
+ // Appends ` fix` to our linting scripts if the flag is present.
63
+ const fix = cliArgs.includes( '--fix' ) ? ' fix' : '';
64
+
65
+ if ( lintCSS ) {
66
+ console.log( 'Linting CSS assets\n\n\n' );
67
+ shell.exec( `${binPath} lint-scss${fix}` );
68
+ }
69
+
70
+ if ( lintJS ) {
71
+ console.log( 'Linting JavaScript assets\n\n\n' );
72
+ shell.exec( `${binPath} lint-js ${workingDirectory}${fix}` );
73
+ }