Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
839 lines (838 sloc) 21.4 KB
{
"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 starter project for SPA that favors a feature-module architecture.",
"devDependencies": {
"apply-patch": "0.1.2",
"aws-sdk": "2.516.0",
"azure-storage": "2.10.3",
"coveralls": "3.0.6",
"dotenv": "8.1.0",
"diff": "4.0.1",
"eslint": "6.2.1",
"eslint-plugin-json": "1.4.0",
"express": "4.17.1",
"flow": "0.2.3",
"font-awesome": "4.7.0",
"font-roboto": "0.0.2",
"istanbul": "0.4.5",
"jquery": "3.4.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": "15.1.1",
"line-by-line": "0.1.6",
"mongodb": "3.3.0",
"mysql2": "1.6.5",
"nodeunit": "0.11.3",
"npm": "6.11.2",
"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.3",
"taffydb": "2.7.3",
"uglify-js": "3.6.0",
"uglifycss": "0.0.29",
"websocket": "1.0.29"
},
"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.3",
"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.5.11.patch",
"pattern_str": "^\\s*// hi_score patch applied",
"relative_name": "patch/uglify-js-3.5.11.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"
},
{
"check_filename": "node_modules/jquery/dist/jquery.js",
"patch_filename": "jquery-3.4.1.patch",
"pattern_str": "^\\s*window.jQuery = jQuery;$",
"relative_name": "patch/jquery-3.4.1.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
]
]
}
}
]
}
}
You can’t perform that action at this time.