{"_id":"5914b0b842c6a22300b9dbae","__v":0,"project":"55b2d5baa74a380d00e290c4","category":{"_id":"5914b04e7c2c552d008b7104","project":"55b2d5baa74a380d00e290c4","version":"590a04f2ed80861900cbc737","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-05-11T18:41:18.682Z","from_sync":false,"order":9,"slug":"cordova-ionic","title":"Cordova / Ionic"},"parentDoc":null,"version":{"_id":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":4,"createdAt":"2017-05-03T16:27:30.085Z","releaseDate":"2017-05-03T16:27:30.085Z","categories":["590a04f3ed80861900cbc738","590a04f3ed80861900cbc739","590a04f3ed80861900cbc73a","590a04f3ed80861900cbc73b","590a04f3ed80861900cbc73c","590a04f3ed80861900cbc73d","590a04f3ed80861900cbc73e","590a04f3ed80861900cbc73f","590a04f3ed80861900cbc740","590a04f3ed80861900cbc741","590a04f3ed80861900cbc742","590a04f3ed80861900cbc743","590a04f3ed80861900cbc744","590a04f3ed80861900cbc745","590a04f3ed80861900cbc746","590a04f3ed80861900cbc747","590a04f3ed80861900cbc748","590a04f3ed80861900cbc749","590a04f3ed80861900cbc74a","590a04f3ed80861900cbc74b","590a04f3ed80861900cbc74c","590a04f3ed80861900cbc74d","59124949de13f61900336a7a","5914b04e7c2c552d008b7104","5914b47242c6a22300b9dc20"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"7.0.0","version":"7"},"user":"55b2d5626862a10d00887af9","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-05-11T18:43:04.291Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"While buddybuild natively supports Cordova, additional steps are required to integrate Meteor into your build.\n\nTo start with, ensure you have checked in the `.meteor` folder in your project, excluding the `local` folder as buddybuild doesn't need it. Without it, buddybuild won't be able to build your project.\n[block:api-header]\n{\n  \"title\": \"New Project\"\n}\n[/block]\nFirst, we need to tell buddybuild how to build your meteor project.  We can do this by having a buddybuild_postclone.sh file in the root of your repository. You can find more informations about our custom build steps [here](doc:custom-prebuild-and-postbuild-steps).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl https://install.meteor.com/ | sh\\nmeteor add-platform $PLATFORM\\nmeteor build $PLATFORM --server $SERVER\\n\",\n      \"language\": \"shell\",\n      \"name\": \"buddybuild_postclone.sh\"\n    }\n  ]\n}\n[/block]\nOnce you have that file in your repository, follow the steps to [sign up with buddybuild](doc:selecting-an-app). Your first build will fail, because buddybuild doesn't yet know about the `$PLATFORM` and `$SERVER` environment variables we are using in the post clone script.\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/369e0ba-Screen_Shot_2017-05-08_at_15.23.31.png\",\n        \"Screen Shot 2017-05-08 at 15.23.31.png\",\n        828,\n        772,\n        \"#1f9add\"\n      ],\n      \"caption\": \"Failed Build\"\n    }\n  ]\n}\n[/block]\nThe `$PLATFORM` variable should be either **ios** or **android**, depending on which platform you want to build this project for. The `$SERVER` variable should represent your development server in the format server:port. Once you've added those 2 variables, retry the build.\n\nbuddybuild will detect many apps and frameworks within your project, make sure to select the correct one.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/56be5e1-Screen_Shot_2017-05-08_at_15.39.53.png\",\n        \"Screen Shot 2017-05-08 at 15.39.53.png\",\n        748,\n        1194,\n        \"#2a97d8\"\n      ]\n    }\n  ]\n}\n[/block]\nFor iOS projects, you should select the workspace project, the one not within a .meteor folder.  For android you can select the Android project.","excerpt":"","slug":"meteor-setup","type":"basic","title":"Meteor Setup"}
While buddybuild natively supports Cordova, additional steps are required to integrate Meteor into your build. To start with, ensure you have checked in the `.meteor` folder in your project, excluding the `local` folder as buddybuild doesn't need it. Without it, buddybuild won't be able to build your project. [block:api-header] { "title": "New Project" } [/block] First, we need to tell buddybuild how to build your meteor project. We can do this by having a buddybuild_postclone.sh file in the root of your repository. You can find more informations about our custom build steps [here](doc:custom-prebuild-and-postbuild-steps). [block:code] { "codes": [ { "code": "curl https://install.meteor.com/ | sh\nmeteor add-platform $PLATFORM\nmeteor build $PLATFORM --server $SERVER\n", "language": "shell", "name": "buddybuild_postclone.sh" } ] } [/block] Once you have that file in your repository, follow the steps to [sign up with buddybuild](doc:selecting-an-app). Your first build will fail, because buddybuild doesn't yet know about the `$PLATFORM` and `$SERVER` environment variables we are using in the post clone script. [block:image] { "images": [ { "image": [ "https://files.readme.io/369e0ba-Screen_Shot_2017-05-08_at_15.23.31.png", "Screen Shot 2017-05-08 at 15.23.31.png", 828, 772, "#1f9add" ], "caption": "Failed Build" } ] } [/block] The `$PLATFORM` variable should be either **ios** or **android**, depending on which platform you want to build this project for. The `$SERVER` variable should represent your development server in the format server:port. Once you've added those 2 variables, retry the build. buddybuild will detect many apps and frameworks within your project, make sure to select the correct one. [block:image] { "images": [ { "image": [ "https://files.readme.io/56be5e1-Screen_Shot_2017-05-08_at_15.39.53.png", "Screen Shot 2017-05-08 at 15.39.53.png", 748, 1194, "#2a97d8" ] } ] } [/block] For iOS projects, you should select the workspace project, the one not within a .meteor folder. For android you can select the Android project.