{"id":22332819,"url":"https://github.com/craftkit/craft-bootloader","last_synced_at":"2025-10-07T04:50:06.453Z","repository":{"id":57104257,"uuid":"217842444","full_name":"craftkit/craft-bootloader","owner":"craftkit","description":"Ultra fast web application loader by caching all libraries in IndexedDB.","archived":false,"fork":false,"pushed_at":"2020-08-30T10:36:05.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T03:52:05.396Z","etag":null,"topics":["frontend-webdevelopment","indexeddb","javascript-framework","javascript-library","progressive-web-app","single-page-applications","web-cache"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craftkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-27T11:04:52.000Z","updated_at":"2022-05-12T05:53:35.000Z","dependencies_parsed_at":"2022-08-20T17:10:45.930Z","dependency_job_id":null,"html_url":"https://github.com/craftkit/craft-bootloader","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/craftkit/craft-bootloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftkit%2Fcraft-bootloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftkit%2Fcraft-bootloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftkit%2Fcraft-bootloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftkit%2Fcraft-bootloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craftkit","download_url":"https://codeload.github.com/craftkit/craft-bootloader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftkit%2Fcraft-bootloader/sbom","scorecard":{"id":307125,"data":{"date":"2025-08-11","repo":{"name":"github.com/craftkit/craft-bootloader","commit":"33303404da463d0a0221d164b2b3220fcef7e1d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-17T22:21:07.085Z","repository_id":57104257,"created_at":"2025-08-17T22:21:07.085Z","updated_at":"2025-08-17T22:21:07.085Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722764,"owners_count":26034461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frontend-webdevelopment","indexeddb","javascript-framework","javascript-library","progressive-web-app","single-page-applications","web-cache"],"created_at":"2024-12-04T04:19:55.946Z","updated_at":"2025-10-07T04:50:06.432Z","avatar_url":"https://github.com/craftkit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CraftBootloader\n\nUltra fast web application loader by caching all libraries in IndexedDB.\n\n\n## Usage\n\n1. Load CraftBootloader (`craft-bootloader.min.js`)\n2. Define `window.bootConfig`\n\n``` \n\u003chtml\u003e\n\u003chead\u003e\n    \u003cscript src=\"https://unpkg.com/@craftkit/craft-bootloader/dist/craft-bootloader.min.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        window.bootConfig = {\n            library : [\n                // array of libraries you would like to cache in IndexedDB.\n                { uri:'a URI', version:'current version' }\n            ],\n            onProgress : function(lib){\n                // a library has been loaded\n            },\n            onLibrayLoaded : function(){\n                // all libraries have been loaded\n            }\n        };\n    \u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e\n``` \n\n## bootConfig spec\n\n| Property        | Description     |\n|:----------------|:----------------|\n| library         | Array of library element (see below) |\n| onLibraryLoaded | Function called when all `library` elements have been loaded. |\n| onProgress      | Function called when a `library` element has been loaded. |\n\n\n### library spec\n\n| Property        | Description     |\n|:----------------|:----------------|\n| uri             | resource location |\n| version         | version string.\u003cbr\u003eIf update, the resource will be reloaded.\u003cbr\u003eYou can use any string for `version`. But you may use somthing like: `1.1.1`. |\n| _metadata_      | You can defined any other metadata in your library element.\u003cbr\u003eThis is useful when you manage loading progress by using `onProgress` |\n\n\n* Cached library element will never be updated until you change the version.\n* If you remove some libraries from bootConfig, those will be also removed from IndexedDB.\n\n\n#### metadata example\n\nBelow sample uses metadata to indicate how much is loaded.\n\n``` \nvar loaded_percentage = 0;\n\nwindow.bootConfig = {\n    library : [\n        { uri:'https://example.com/lib1.js', version:'1.0.0', size:30 },\n        { uri:'https://example.com/lib2.js', version:'1.0.0', size:40 },\n        { uri:'https://example.com/lib3.js', version:'1.0.0', size:20 },\n        { uri:'https://example.com/css1.css', version:'1.0.0', size:10 }\n    ],\n    onProgress : function(lib){\n        loaded_percentage += lib.size;\n        console.log(`${loaded_percentage}% loaded`);\n    },\n``` \n\n## Supported resource type\n\n| Type        | Suffix   | Loader              |  Description | \n|:------------|:---------|:--------------------|:-------------|\n| JavaScript  | .js      | [JavaScriptLoader.js](./src/CraftBootloader/JavaScriptLoader.js) | loaded as text in generated script tag |\n| Style sheet | .css     | [StyleSheetLoader.js](./src/CraftBootloader/StyleSheetLoader.js) | loaded as text in generated style tag | \n\n\n## Runnable example\n\nCraftBootloader enhanced version of [Craft-Widget-Calendar sample](https://github.com/craftkit/craft-widget-calendar#sample).\n\n``` \n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003eBootloader example\u003c/title\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0, viewport-fit=cover\"/\u003e\n    \u003cstyle\u003ehtml,body { width: 100%; height: 100%; box-sizing:border-box; margin:0; padding:0; }\u003c/style\u003e\n    \n    \u003cscript src=\"https://unpkg.com/@craftkit/craft-bootloader/dist/craft-bootloader.min.dev.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        window.bootConfig = {\n            library : [\n                { uri:'https://unpkg.com/@craftkit/craft-uikit/dist/craft-uikit.min.js', version:'1.0.0' },\n                { uri:'https://unpkg.com/@craftkit/craft-widget-calendar/dist/craft-widget-calendar.min.js', version:'1.0.0' },\n                { uri:'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js', version:'1.0.0' }\n            ],\n            onProgress : function(lib){\n                console.log(lib.uri+' was loaded');\n            },\n            onLibrayLoaded : function(){\n                // prepare demo data\n                var meta = {};\n                var this_month = moment();\n                var prev_month = this_month.clone().subtract(1,'month');\n                var next_month = this_month.clone().add(1,'month');\n                meta[ prev_month.date(10).format('YYYY-MM-DD') ] = { class:'has_note', note:'appointment 11:00' };\n                meta[ this_month.date(15).format('YYYY-MM-DD') ] = { class:'has_note', note:'appointment 9:00' };\n                meta[ this_month.date(24).format('YYYY-MM-DD') ] = { class:'has_note', note:'appointment 15:00' };\n                meta[ next_month.date(20).format('YYYY-MM-DD') ] = { class:'has_note', note:'appointment 14:00' };\n                \n                var handler = {\n                    handleSelectCalendarMonth : (month) =\u003e {\n                        month.this_days.forEach( day =\u003e {\n                            if( meta[day.iso] ){\n                                day.classes.push(meta[day.iso].class); // apply has_note css class\n                                day.note = meta[day.iso].note; // set metadata\n                                day.renderView(); // re-render view\n                            }\n                        });\n                    },\n                    handleSelectCalendarDay : (day) =\u003e {\n                        alert( day.note || 'Free!' );\n                    }\n                };\n                \n                class MyDay extends Craft.Widget.Calendar.Day {\n                    constructor(options){\n                        super(options);\n                        this.note = '';\n                    }\n                    style(componentId){\n                        return super.style(componentId) + `\n                            .today { background-color: lightgreen; }\n                            .has_note { background-color: #f2eb77; }\n                        `;\n                    }\n                }\n                \n                var calendar = new Craft.Widget.Calendar.View({\n                    yyyy       : this_month.format('YYYY'),\n                    mm         : this_month.format('MM'),\n                    delegate   : handler,\n                    Day        : MyDay,\n                });\n                \n                Craft.Core.Bootstrap.boot({\n                    didBootApplication : function(options){\n                        Craft.Core.Defaults.ALLOW_COMPONENT_SHORTCUT = true;\n                        calendar.loadView();\n                        document.getElementById('CraftRoot').appendChild(calendar.view);\n                    }\n                });\n            }\n        };\n    \u003c/script\u003e\n\u003c/head\u003e\n\u003cbody id=\"CraftRoot\"\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n``` \n\n## License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftkit%2Fcraft-bootloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraftkit%2Fcraft-bootloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftkit%2Fcraft-bootloader/lists"}