{"id":21277937,"url":"https://github.com/b13/grunt-requirejs-vue-component-registration","last_synced_at":"2025-08-01T05:04:10.170Z","repository":{"id":57255623,"uuid":"130209409","full_name":"b13/grunt-requirejs-vue-component-registration","owner":"b13","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-05T13:00:51.000Z","size":60,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-18T07:43:17.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-19T12:03:13.000Z","updated_at":"2018-04-23T09:23:26.000Z","dependencies_parsed_at":"2022-09-04T21:51:59.494Z","dependency_job_id":null,"html_url":"https://github.com/b13/grunt-requirejs-vue-component-registration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/b13/grunt-requirejs-vue-component-registration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-vue-component-registration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-vue-component-registration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-vue-component-registration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-vue-component-registration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b13","download_url":"https://codeload.github.com/b13/grunt-requirejs-vue-component-registration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-vue-component-registration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267053869,"owners_count":24028182,"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-07-25T02:00:09.625Z","response_time":70,"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":[],"created_at":"2024-11-21T10:08:19.792Z","updated_at":"2025-08-01T05:04:10.032Z","avatar_url":"https://github.com/b13.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-requirejs-vue-component-registration\n\n\u003e Create vue component config for async loading with requirejs\n\n## Getting Started\nThis plugin requires Grunt `~0.4.5`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-requirejs-vue-component-registration --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-requirejs-vue-component-registration');\n```\n\n## The \"requirejsVueComponentRegistration\" task\n\n### Overview\nCreate vue component config for async loading with requirejs.\n\n```js\ngrunt.initConfig({\n    requirejsVueComponentRegistration: {\n        options: {\n            files: ['pathToVueFiles/**/*.vue'],\n            basePath: 'basePathToVueFiles',\n            targetFile: 'basePathToVueFiles/registerComponents.js'\n        }\n    }\n});\n```\n\n\ntargetFile output:\n\n```js\ndefine([\n    \"Vue\"\n], function(Vue) {\n\n    /**\n     * register vue components for async loading\n     */\n\n    return (function() {\n\n        function registerComponents() {\n\n            Vue.component('nice-component', function (resolve, reject) {\n                require([\"vue!/Components/niceComponent\"], function(component) {\n                    resolve(component);\n                });\n            });\n\n        }\n\n        return registerComponents();\n\t});\n});\n```\n\n## Release History\n* Big bang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fgrunt-requirejs-vue-component-registration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb13%2Fgrunt-requirejs-vue-component-registration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fgrunt-requirejs-vue-component-registration/lists"}