{"id":21377213,"url":"https://github.com/softchef/cdk-vue","last_synced_at":"2025-07-13T10:31:27.870Z","repository":{"id":37022352,"uuid":"343973968","full_name":"SoftChef/cdk-vue","owner":"SoftChef","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-09T00:28:54.000Z","size":5096,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-02T17:07:14.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoftChef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-03T02:15:06.000Z","updated_at":"2024-03-09T10:22:41.000Z","dependencies_parsed_at":"2022-07-07T21:03:36.343Z","dependency_job_id":null,"html_url":"https://github.com/SoftChef/cdk-vue","commit_stats":null,"previous_names":[],"tags_count":448,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftChef%2Fcdk-vue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftChef%2Fcdk-vue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftChef%2Fcdk-vue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftChef%2Fcdk-vue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftChef","download_url":"https://codeload.github.com/SoftChef/cdk-vue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225872148,"owners_count":17537364,"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":[],"created_at":"2024-11-22T09:19:36.342Z","updated_at":"2024-11-22T09:19:36.980Z","avatar_url":"https://github.com/SoftChef.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS CDK with VueJs\n\n[![npm version](https://badge.fury.io/js/%40softchef%2Fcdk-vue.svg)](https://badge.fury.io/js/%40softchef%2Fcdk-vue)\n![Release](https://github.com/SoftChef/cdk-vue/workflows/Release/badge.svg)\n![npm](https://img.shields.io/npm/dt/@softchef/cdk-vue?label=NPM%20Downloads\u0026color=orange)\n\nAWS CDK with VueJs package will auto deploy website with VueJs to S3 bucket and CloudFront distribution.\n\nVueJs will build on local environment or docker container, it's based with Vue-CLI project. Then use S3-Deployment to upload to specify S3 bucket.\n\nIf you have many resource arguments will pass to frontend, the config property will generate config.js to specify S3 bucket. It's a VueJs extendsion and archive config in Vue.$config operation.\n\n![Architecture](docs/cdk-vue.png)\n\n## Installation\n\n```\n  npm install @softchef/cdk-vue\n  // or\n  yarn add @softchef/cdk-vue\n```\n\n## Example\n```\nimport { VueDeployment } from '@softchef/cdk-vue'\n// In your stack\n// Basic deployment\nconst website = new VueDeployment(this, 'Website', {\n  source: `${CLIENTS_PATH}`,\n  config: {\n    apiId: articleApi.restApiId, // RestApi\n    userPoolId: userPool.userPoolId, // UserPool\n    foo: {\n      bar: {\n        value: 123 // Customize config\n      }\n    }\n  }\n})\n```\n\n## VueDeployment Properties\n\n```\n{\n  source: string;\n\n  // Use target bucket or create new bucket(if not specify)\n  bucket?: s3.Bucket;\n\n  // Specify S3 bucket name, if not specify will random generate\n  bucketName?: string;\n\n  // S3 bucket prefix, ex: \"/website\"\n  websiteDirectoryPrefix?: string;\n\n  // CloudFront distribution defaultRootObject, default is \"index.html\"\n  indexHtml?: string;\n\n  // CloudFront will enable/disable Ipv6 options\n  enableIpv6?: boolean;\n\n  // Pass env variables to Vue-CLI bundling, you can get its in process.env(frontend)\n  environment?: { [ key: string ]: string };\n\n  // Pass bundling arguments to Vue-CLI\n  bundlingArguments?: string;\n\n  // Force run Vue-CLI build in local\n  runsLocally?: boolean;\n\n  // Force use docker to bundling\n  forceDockerBundling?: boolean;\n\n  // Specify the \"config.js\" in your web bucket key, default is \"/config.js\"\n  configJsKey?: string;\n\n  // Config object will upload to web bucket(config.js)\n  config?: { [key: string]: any };\n}\n```\n\n## VueJs Example\n\n```\n// In public/index.html\n\u003cscript type=\"text/javascript\" src=\"/config.js\"\u003e\n\n// In main.js or app.js\nVue.use(window.CloudDeploymentConfig)\n\n// In *.vue\nexport default {\n  mounted () {\n    this.$config.get('apiId')\n    this.$config.get('foo.bar.value') // use \".\" to get value recursively\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftchef%2Fcdk-vue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftchef%2Fcdk-vue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftchef%2Fcdk-vue/lists"}