{"id":22616355,"url":"https://github.com/xpepermint/vue-builder","last_synced_at":"2025-04-11T12:23:32.520Z","repository":{"id":57394771,"uuid":"71300662","full_name":"xpepermint/vue-builder","owner":"xpepermint","description":"Server-side and client-side rendering for Vue.js.","archived":false,"fork":false,"pushed_at":"2023-02-10T02:46:20.000Z","size":193,"stargazers_count":34,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T06:05:28.472Z","etag":null,"topics":["ssr","vue","webpack"],"latest_commit_sha":null,"homepage":null,"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/xpepermint.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-18T23:39:14.000Z","updated_at":"2024-07-18T23:28:51.000Z","dependencies_parsed_at":"2024-01-14T06:04:22.823Z","dependency_job_id":"e19f501b-b2d8-4a9e-bc8d-ba78536a0cf3","html_url":"https://github.com/xpepermint/vue-builder","commit_stats":{"total_commits":30,"total_committers":1,"mean_commits":30.0,"dds":0.0,"last_synced_commit":"d3b53a2e50e26b0a41774b70da32aa870241b742"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpepermint%2Fvue-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpepermint%2Fvue-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpepermint%2Fvue-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpepermint%2Fvue-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xpepermint","download_url":"https://codeload.github.com/xpepermint/vue-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248401368,"owners_count":21097328,"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","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":["ssr","vue","webpack"],"created_at":"2024-12-08T19:12:15.968Z","updated_at":"2025-04-11T12:23:32.493Z","avatar_url":"https://github.com/xpepermint.png","language":"JavaScript","funding_links":[],"categories":["Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Development Tools"],"readme":"![Build Status](https://travis-ci.org/xpepermint/vue-builder.svg?branch=master)\u0026nbsp;[![NPM Version](https://badge.fury.io/js/vue-builder.svg)](https://badge.fury.io/js/vue-builder)\u0026nbsp;[![Dependency Status](https://gemnasium.com/xpepermint/vue-builder.svg)](https://gemnasium.com/xpepermint/vue-builder)\n\n# [vue](http://vuejs.org)-[builder](https://webpack.github.io)\n\n\u003e Server-side and client-side rendering for Vue.js.\n\n\u003cimg src=\"logo.png\" height=\"60\" style=\"margin-bottom: 20px\" /\u003e\n\nThis package provides tools for rendering [Vue.js](http://vuejs.org) applications server-side and client-side using the [Webpack](https://webpack.github.io) module bundler.\n\nThis is an open source package for [Vue.js](http://vuejs.org/). The source code is available on [GitHub](https://github.com/xpepermint/vue-builder) where you can also find our [issue tracker](https://github.com/xpepermint/vue-builder/issues).\n\n## Related\n\n### Packages\n\n* [express-vue-builder](https://github.com/xpepermint/express-vue-builder): Vue.js server-side rendering middleware for Express.js.\n* [express-vue-dev](https://github.com/xpepermint/express-vue-dev): Vue.js development server middleware for Express.js.\n* [koa-vue-builder](https://github.com/kristianmandrup/koa-vue-builder): Vue.js server-side rendering middleware for Koa.js.\n* [koa-vue-dev](https://github.com/kristianmandrup/koa-vue-dev): Vue.js development server middleware for Koa.js.\n* [vue-cli-template](https://github.com/xpepermint/vue-cli-template): A simple server-side rendering CLI template for Vue.js.\n\n### Examples\n\n* [vue-example](https://github.com/xpepermint/vue-example): Vue.js example application\n\n## Install\n\nRun the command below to install the package.\n\n```\n$ npm install --save-dev vue vue-server-renderer\n$ npm install --save-dev vue-builder\n```\n\n## Usage\n\nCreate a Webpack configuration object then use the `VueBuilder` class to build and compile the application.\n\n```js\nconst config = require('./webpack.config.js'); /* your webpack configuration */\nconst {VueBuilder} = require('vue-builder');\n\n// create Vue.js builder\nconst builder = new VueBuilder(config);\n// build application to ./dist\nlet files = await builder.build();\n// build application entry to string\nlet source = await builder.compile();\n```\n\nUse the `VueRender` class to render the application.\n\n```js\nconst {VueBuilder} = require('vue-builder');\n\n// create Vue.js renderer\nconst render = new VueRender(source); // source=builder.render()\n// render to stream\nlet stream = render.renderToStream();\n// render to string\nlet html = await render.renderToString();\n```\n\n## API\n\n**VueBuilder(config)**\n\n\u003e Core class for building server-side and client-side bundles.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| config | Object | Yes | - | Webpack configuration object.\n\n**VueBuilder.prototype.build()**:Promise\n\n\u003e Returns a promise which saves application files to the destination folder.\n\n**VueBuilder.prototype.compile()**:Promise\n\n\u003e Returns a promise which compiles the application bundle and returns the the source code as string.\n\n**VueRender(source, options)**\n\n\u003e Core class for server-side application rendering.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| source | String | Yes | - | Bundle source code.\n| options | Object | No | - | [Renderer options](https://www.npmjs.com/package/vue-server-renderer#renderer-options).\n\n**VueRender.prototype.renderToStream(ctx)**:Stream\n\n\u003e Renders the application and returns a stream.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| ctx | Object | No | {} | Application context object.\n\n**VueRender.prototype.renderToString(ctx)**:Promise\n\n\u003e Returns a promise which renders the application and returns a string.\n\n| Option | Type | Required | Default | Description\n|--------|------|----------|---------|------------\n| ctx | Object | No | {} | Application context object.\n\n## License (MIT)\n\n```\nCopyright (c) 2016 Kristijan Sedlak \u003cxpepermint@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpepermint%2Fvue-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxpepermint%2Fvue-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpepermint%2Fvue-builder/lists"}