-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpackage.json
832 lines (832 loc) · 21.2 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
{
"author": {
"name": "Michael S. Mikowski",
"email": "mike.mikowski@gmail.com"
},
"bugs": {
"url": "https://github.com/mmikowski/hi_score/issues"
},
"deprecated": false,
"description": "A full-life-cycle un-framework for SPA development using native JS, CSS, and HTML.",
"devDependencies": {
"apply-patch": "0.1.2",
"aws-sdk": "2.814.0",
"azure-storage": "2.10.7",
"coveralls": "3.1.0",
"diff": "4.0.2",
"dotenv": "8.2.0",
"eslint": "7.12.1",
"eslint-plugin-json": "2.1.2",
"express": "4.21.0",
"flow": "0.2.3",
"font-awesome": "4.7.0",
"font-roboto": "0.0.2",
"istanbul": "0.4.5",
"jquery": "3.5.1",
"jquery.event.dragscroll": "1.0.0",
"jquery.event.gevent": "1.1.6",
"jquery.event.ue": "1.3.2",
"jquery.scrolli": "1.0.1",
"jquery.urianchor": "1.3.5",
"jsdom": "16.5.0",
"line-by-line": "0.1.6",
"mongodb": "3.6.10",
"mysql2": "3.9.8",
"nodeunit": "0.11.3",
"npm": "^8.11.0",
"open-sans-fontface": "1.4.0",
"powercss": "1.4.6",
"ps-node": "0.1.6",
"rmdir": "1.2.0",
"serve-index": "1.9.1",
"shelljs": "0.8.5",
"taffydb": "2.7.3",
"uglify-js": "3.11.4",
"uglifycss": "0.0.29",
"websocket": "1.0.32"
},
"eslintConfig": {
"extends": [
"eslint:recommended"
],
"globals": {
"__dirname": true,
"__filename": true,
"$": true,
"clearTimeout": true,
"console": true,
"document": true,
"global": true,
"Image": true,
"localStorage": true,
"jQuery": true,
"module": true,
"process": true,
"Promise": true,
"require": true,
"setTimeout": true,
"window": true
},
"parserOptions": {
"ecmaVersion": 6
},
"plugins": [
"json"
],
"rules": {
"continue": "off",
"indent": "off",
"no-console": "off",
"no-plusplus": "off",
"one-var": [
"error",
{
"var": "always",
"let": "consecutive",
"const": "consecutive"
}
],
"semi": [
"error",
"always"
]
}
},
"homepage": "https://github.com/mmikowski/hi_score",
"keywords": [
"spa",
"library",
"libraries",
"single",
"page",
"web",
"application",
"end-to-end"
],
"license": "MIT",
"main": "hi_score",
"maintainers": [
{
"name": "Michael S. Mikowski",
"email": "mike.mikowski@gmail.com"
}
],
"name": "hi_score",
"repository": {
"type": "git",
"url": "git+https://github.com/mmikowski/hi_score.git"
},
"scripts": {
"help": "bin/xhi help",
"setup": "bin/xhi setup",
"start": "bin/xhi dev_start",
"stop": "bin/xhi dev_stop",
"test": "bin/xhi dev_test"
},
"version": "1.7.12",
"xhi_commandTable": [
[
"alias_list",
"short_str",
"long_str",
"predo_list",
"prereq_list"
],
[
[
"help"
],
"Help on 'xhi' tool; use -v for verbose",
[
"Name : {appName}",
"Purpose : Run hi_score lifecycle tools",
"Example : xhi help",
"Arguments : [ help || 0 ] /range/ [ -v ]",
" /range/ may be:",
" 1. A single stage number or name. Ex: 01.",
" 2. A list of stage numbers or names. Ex: 1,2,3,6.",
" 3. A range of stages Ex: 1-5 or all",
" See {appName} help all to list stages.",
"More examples:",
" Run stage range",
"{padName} dev_pull // run stage 04",
"{padName} 1,2,6 // run three stages",
"{padName} 1-9 // run nine stages in range",
" Generic help",
"{padName} help // Short help ",
" Help stage range",
"{padName} help 01 // Short help on install stage",
"{padName} help all -v // Long help on all stages",
"{padName} help 1,4 // Short help on stages 1,4",
"{padName} help help,dev_pull -v // Long help on stages 1,4",
"",
"Failure of any stage to complete reults in a non-zero exit",
"status and termination of the 'xhi' command."
],
null,
null
],
[
[
"install"
],
"Download and install npm modules",
[
"Download & install npm modules. This is a wrapper ",
"around 'npm install'. Use this command directly",
"to diagnose problems.",
"NPM SCRIPTS : presinstall, install, postinstall.",
"SUCCESS CRITERIA : npm install completes with 0 exit status."
],
null,
null
],
[
[
"setup"
],
"Patch and distribute vendor npm assets",
[
"Prepare assets in four steps:",
"1. Delete all vendor directories as directed by package.json.",
" See directories in bin, css, font, img, js, and lib.",
"2. Copy assets from node_modules to vendor directories",
" with their version appended to the names.",
"3. Apply any patches",
"4. Install the commit hook if git is detected",
"NPM SCRIPTS : none.",
"SUCCESS CRITERIA : All steps complete without error."
],
null,
[
"install"
]
],
[
[
"design"
],
"Show architecture docs",
[
"Show architecture, style, and VDG docs in 'doc/spa-arch.md.'",
"Use the module template 'js/xhi/xhi-module-tmplt.js.'",
"NPM SCRIPTS : none.",
"SUCCESS CRITERIA : Document is shown without error."
],
null,
null
],
[
[
"dev_pull"
],
"Download and merge SCMS assets (git pull)",
[
"Retrieve latest code from the repository. Use the 'git pull'",
"directly to diagnose problems.",
"NPM SCRIPTS : none.",
"SUCCESS CRITERIA : 'git pull' completes with 0 exit status."
],
null,
[
"setup"
]
],
[
[
"dev_upgrade"
],
"Upgrade packages to latest",
[
"Upgrade vendor package versions to latest",
"At present the 'package.json' file is automatically updated.",
"These additional files must also updated to reflect",
"the new versions:",
" 1. config/*.buildify",
" 2. js/<app_dir>/<app_file>.js",
" 3. test.d/*.js",
"",
"An upgrade may break regression tests builds.",
"If this happens one may throw away any local changes",
"and start again fresh. Use the following to removed",
"any local changes forever: 'git reset --hard HEAD'.",
"One may also use 'git clean -xdf' to remove untracked",
"local files.",
"",
"One may updated one package at a time using",
"'npm outdated' to list out-of-date packages",
"and then update 'package.json' and related files",
"(see above) one package at a time to their",
"lastest version. If a problem occurs, it can",
"then be more easily resolved.",
"",
"Please run 'xhi install,setup' after this step to",
"have the changes reflected.",
"(TODO: automate 'xhi install,setup' and associated files)",
"",
"NPM SCRIPTS : none.",
"SUCCESS CRITERIA : Version upgrade completes without error"
],
null,
[
"dev_pull"
]
],
[
[
"dev_start"
],
"Start local HTTP server",
[
"Start the local HTTP server, server/index.js on port 3000.",
"To serve HTTPS consider installing http-server and run",
"'http-server -p8443 -SU -C config/cert.pem -K config/key.pem'.",
"Use this command directly to diagnose problems.",
"",
"NPM SCRIPTS : prestart, start, poststart.",
"SUCCESS CRITERIA : Server starts without error."
],
null,
[
"setup"
]
],
[
[
"dev_test"
],
"Run regression tests",
[
"Run all nodeunit tests in the 'test.d' drop-directory.",
"The test files are processed in alphabetical order.",
"",
"NPM SCRIPTS : pretest, test, posttest.",
"SUCCESS CRITERIA : All tests complete without error"
],
null,
[
"setup"
]
],
[
[
"dev_lint"
],
"Lint changed code",
[
"Check lint quality of changed JS code.",
"Files in 'vendor|node_modules' directories are ignored.",
"Four tests are performed on each file:",
" 1. Check for tab characters or trailing space.",
" 2. Ensure 'use strict'; is employed",
" 3. Run 'eslint' on each file (config in package.json)",
" 4. List TODO items for developer to review and approve.",
"Any failed step causes this stage to report failure.",
"",
"The test do not short-circuit so any and all issues are",
"shown for each run.",
"",
"NPM SCRIPTS : none.",
"SUCCESS CRITERIA : All tests complete without error"
],
null,
[
"setup"
]
],
[
[
"dev_cover"
],
"Create coverage report",
[
"Create coverage report"
],
null,
[
"setup"
]
],
[
[
"dev_commit"
],
"Commit changes with git",
[
"Commit changes with git",
"TODO 2017-08029 mmikowski warn: add make-doc step prior.",
"Use 'git commit' directly to diagnose any problems.",
"NPM SCRIPTS : preversion, version, postversion",
"SUCCESS CRITERIA : 'git commit' exit status"
],
[
"dev_test",
"dev_lint"
],
null,
[
"setup"
]
],
[
[
"build",
"make"
],
"Build a distribution",
[
"Build a distribution. The config, like for all 'xhi' tools",
"is found in 'package.json' as shown below.",
"",
" xhi_11_BuildMatrix : {",
" bundle_map : {",
" bundle1_list : [",
" <src_path> OR",
" [ <src_path>, <dest_path>, <do_dir_copy> ]",
" ...",
" ],",
" ...",
" }",
" app_table : [",
" {",
" app_id : <app_id>,",
" css_make_matrix : {",
" <do_vendor> : true|false",
" asset_list : [",
" <src_path> OR",
" [ <src_path>, <dest_path>, <do_dir_copy> ] OR",
" { bundle_key_list : [",
" <key_from_bundle_map>, ...",
" ]",
" }",
" ]",
" },",
" js_make_matrix : { <same_as_css_make_matrix> },",
" path_copy_matrix : { <same_as_css_make_matrix> }",
" },",
" ...",
" ]",
" }",
"",
"Use the 'bundle_map' to create group definitions of assets to",
"deploy. If only the <src_path> is provided the build process",
"assumes: The path is a file in the development environment AND",
"The file is to be copied to the same location in the",
"'build/<build_number>/dist' directory.",
"",
"If we want a directory copy or a different source and destination, the ",
"second form must be used: [ <src_path>, <dest_path>, <do_dir_copy> ].",
"If <dest_path> is 'null' it is calculated to be the same as <src_path>.",
"If <do_dir_copy> is 'true' then a directory copy is attempted.",
"",
"The 'app_table' section lists all applicaitons to build in a map.",
"Each map has the following fields: 'app_id' which is used to set the id",
"",
"NPM SCRIPTS : prepare",
"SUCCESS CRITERIA : All tests complete without error"
],
[
"dev_test",
"dev_lint",
"dev_cover"
],
[
"setup"
]
],
[
[
"publish"
],
"Publish to coveralls and NPM",
[
"Publish to coveralls and NPM.",
"NPM SCRIPTS : prepublish,publish,postpublish,prepublishOnly",
"SUCCESS CRITERIA : Push to NPM and coveralls successful"
],
null,
[
"build"
]
],
[
[
"dev_stop"
],
"Stop local HTTPS server",
[
"Stop local HTTPS server",
"NPM SCRIPTS : prestop, stop, poststop",
"SUCCESS CRITERIA : Server return status"
],
null,
[
"setup"
]
],
[
[
"dev_restart"
],
"Cycle local HTTPS server",
[
"Cycle local HTTPS server",
"NPM SCRIPTS : prerestart, restart, postrestart",
"SUCCESS CRITERIA : Server return status"
],
null,
[
"setup"
]
],
[
[
"deploy"
],
"Upload distribution",
[
"Upload distribution to production server(s)",
"NPM SCRIPTS : prepack, pack, postpack",
"NPM SCRIPTS : preshrinkwrap, shrinkwrap, postshrinkwrap",
"SUCCESS CRITERIA : Upload return status"
],
null,
null
],
[
[
"prod_start"
],
"Start production server",
[
"Start production server(s)"
],
null,
null
],
[
[
"prod_stop"
],
"Stop production server",
[
"Stop production server"
],
null,
null
],
[
[
"prod_restart"
],
"Cycle production server",
[
"Cycle production server"
],
null,
null
],
[
[
"fetch_info"
],
"Fetch feedback",
[
"Fetch feedback"
],
null,
null
],
[
[
"uninstall"
],
"Remove {appName}",
[
"Remove {appName}",
"NPM SCRIPTS : preuninstall, uninstall, postuninstall",
"SUCCESS CRITERIA : Removal success exit status"
],
null,
null
]
],
"xhi_02_SetupMatrix": {
"asset_group_table": [
{
"asset_type": "css",
"asset_list": [
{
"src_asset_name": "font-awesome.css",
"src_dirname": "css",
"src_pkg_name": "font-awesome"
}
],
"dest_dirname": "css/vendor",
"dest_ext_str": "css"
},
{
"asset_type": "js",
"guide_str": "Place these in order of inclusion",
"asset_list": [
{
"dest_name": "taffy",
"src_asset_name": "taffy.js",
"src_pkg_name": "taffydb"
},
{
"dest_name": "pcss",
"src_asset_name": "pcss.js",
"src_dirname": "dist",
"src_pkg_name": "powercss"
},
{
"dest_name": "pcss.cfg",
"src_asset_name": "pcss.cfg.js",
"src_dirname": "dist",
"src_pkg_name": "powercss"
},
{
"src_asset_name": "jquery.js",
"src_dirname": "dist",
"src_pkg_name": "jquery"
},
{
"src_asset_name": "jquery.event.dragscroll.js",
"src_dirname": "dist",
"src_pkg_name": "jquery.event.dragscroll"
},
{
"src_asset_name": "jquery.event.gevent.js",
"src_pkg_name": "jquery.event.gevent"
},
{
"src_asset_name": "jquery.event.ue.js",
"src_pkg_name": "jquery.event.ue"
},
{
"src_pkg_name": "jquery.scrolli",
"src_dirname": "dist",
"src_asset_name": "jquery.scrolli.js"
},
{
"src_asset_name": "jquery.uriAnchor.js",
"src_pkg_name": "jquery.urianchor"
}
],
"dest_dirname": "js/vendor",
"dest_ext_str": "js"
},
{
"asset_id": "asis",
"asset_list": [
{
"src_pkg_name": "font-awesome",
"src_dirname": "fonts"
},
{
"src_pkg_name": "font-roboto",
"src_dirname": "dist/fonts"
},
{
"src_asset_name": "Regular",
"src_pkg_name": "open-sans-fontface",
"src_dirname": "fonts"
}
],
"dest_dirname": "font/vendor",
"do_dir_copy": true
}
],
"patch_matrix": {
"patch_dirname": "patch",
"patch_map_list": [
{
"check_filename": "node_modules/uglify-js/lib/scope.js",
"patch_filename": "uglify-js-3.11.4.patch",
"pattern_str": "^\\s*// hi_score patch applied",
"relative_name": "patch/uglify-js-3.11.4.patch"
},
{
"check_filename": "node_modules/font-awesome/css/font-awesome.css",
"patch_filename": "font-awesome-4.7.0.patch",
"pattern_str": "Patch removed redundant and incorrect font paths",
"relative_name": "patch/font-awesome-4.7.0.patch"
}
]
}
},
"xhi_11_BuildMatrix": {
"note01_str": "Deploy fields: src_pathname, tgt_pathname, is_dircopy.",
"note02_str": "Flags do_compress, do_isolate may be added.",
"note03_str": "Include bundles in app_list by wrapping in array",
"bundle_map": {
"xhi_js_list": [
"js/plugin/jquery.deferred.whenAll-1.0.0.js",
"js/xhi/00_root.js",
"js/xhi/01_util.js",
"js/xhi/02_data.js",
"js/xhi/03_model.js",
"js/xhi/04_utilb.js",
"js/xhi/05_02_css_base.js",
"js/xhi/05_03_css_lb.js",
"js/xhi/05_04_css_shell.js",
"js/xhi/05_css.js",
"js/xhi/06_lb.js",
"js/xhi/07_shell.js",
"js/xhi/08_app.js"
],
"font_deploy_list": [
[
"font/vendor/font-awesome-4.7.0",
null,
true
],
[
"font/vendor/open-sans-fontface-1.4.0/Regular",
null,
true
],
[
"font/vendor/font-roboto-0.0.2",
null,
true
]
]
},
"app_table": [
{
"app_id": "app-ex01",
"css_make_matrix": {
"do_vendor": true,
"asset_list": [
"css/xhi-fonts.css"
]
},
"js_make_matrix": {
"asset_list": [
{
"bundle_key_list": [
"xhi_js_list"
]
},
"js/app-ex01/ex01.08_app-build.js"
],
"do_vendor": true
},
"path_copy_matrix": {
"asset_list": [
{
"bundle_key_list": [
"font_deploy_list"
]
},
[
"img/hi_score.png",
null,
false
],
[
"template/app-ex01.html",
"/",
false
]
]
}
},
{
"app_id": "app-ex02",
"css_make_matrix": {
"do_vendor": true,
"asset_list": [
"css/xhi-fonts.css"
]
},
"js_make_matrix": {
"asset_list": [
{
"bundle_key_list": [
"xhi_js_list"
]
},
"js/app-ex02/ex02.08_app-build.js"
],
"do_vendor": true
},
"path_copy_matrix": {
"asset_list": [
{
"bundle_key_list": [
"font_deploy_list"
]
},
[
"img/hi_score.png",
null,
false
],
[
"template/app-ex02.html",
"/",
false
]
]
}
},
{
"app_id": "app-tb02",
"css_make_matrix": {
"do_vendor": true,
"asset_list": [
"css/xhi-fonts.css"
]
},
"js_make_matrix": {
"asset_list": [
{
"bundle_key_list": [
"xhi_js_list"
]
},
"js/app-tb02/tb02.00_root.js",
"js/app-tb02/tb02.01_util.js",
"js/app-tb02/tb02.02_data.js",
"js/app-tb02/tb02.03_model.js",
"js/app-tb02/tb02.04_utilb.js",
"js/app-tb02/tb02.05_02_css_base.js",
"js/app-tb02/tb02.05_03_css_lb.js",
"js/app-tb02/tb02.05_css.js",
"js/app-tb02/tb02.06_lb.js",
"js/app-tb02/tb02.07_shell.js",
"js/app-tb02/tb02.08_app-build.js"
],
"do_vendor": true
},
"path_copy_matrix": {
"asset_list": [
{
"bundle_key_list": [
"font_deploy_list"
]
},
[
"sound",
null,
true
],
[
"template/app-tb02.html",
"/",
false
],
[
"img/hi_score.png",
null,
false
]
]
}
}
]
}
}