{"_id":"54b35d6ad8ea260b00e4e5e7","__v":0,"project":"54b2c91287873d1f00dbebdb","category":{"_id":"54b2cb87db3c741400eac8c2","project":"54b2c91287873d1f00dbebdb","__v":29,"pages":["54b2cbacdb3c741400eac8c3","54b35b4cd8ea260b00e4e5e0","54b35b64d8ea260b00e4e5e2","54b35be2d8ea260b00e4e5e4","54b35c13aad2810b009507d5","54b35d6ad8ea260b00e4e5e7","54b3646daad2810b009507da","54b3648d73abe90b00106f7c","54b364aad8ea260b00e4e5ef","54b364dfd8ea260b00e4e5f1","54b3652ed8ea260b00e4e5f3","54b3655573abe90b00106f80","54b365b8aad2810b009507de","54b3669d73abe90b00106f8c","54b366e4d8ea260b00e4e5f7","54b3670e73abe90b00106f8f","54b3672cd8ea260b00e4e5f9","54b3674573abe90b00106f91","54b3675baad2810b009507e0","54b3679a73abe90b00106f93","54b367e9aad2810b009507e3","54b3680573abe90b00106f95","54b36869aad2810b009507e5","54b368a5d8ea260b00e4e5fc","54b368cdd8ea260b00e4e5fe","54b368fad8ea260b00e4e600","54b36961d8ea260b00e4e602","54b36980aad2810b009507e8","54b369a373abe90b00106f97"],"version":"54b2c93f336cfb0b00608c28","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-11T19:14:15.926Z","from_sync":false,"order":3,"slug":"commands","title":"Commands"},"user":"54a3af95ad78941600ca2e2a","version":{"_id":"54b2c93f336cfb0b00608c28","forked_from":"54b2c91287873d1f00dbebde","project":"54b2c91287873d1f00dbebdb","__v":4,"createdAt":"2015-01-11T19:04:31.031Z","releaseDate":"2015-01-11T19:04:31.031Z","categories":["54b2c93f336cfb0b00608c29","54b2cb87db3c741400eac8c2","54b35d86aad2810b009507d7","54b35d91aad2810b009507d8"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.4.0","version":"0.4.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-01-12T05:36:42.523Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"bosco cdn\\nbosco cdn minify\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThis command will run the bundling and minification process and then serve all of the static assets locally, which defaults to http://localhost:7334/. It will watch the assets specified in the bosco-service.json file and reload if they change.\n\nIt is expected that you leave this command running while doing development on services, as if you are also using Compoxure and bundle-version then it provides the versioned HTML fragments that allow the static assets to be included in other pages.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Service Configuration Requirements\"\n}\n[/block]\nFor this command to work you must have configured the bosco-service.json file in the base of the micro services who would like to take part in the asset minification process.\n\nAn example bosco-service.json file is shown below for a simple service that doesn't have its own build script:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"tags\\\":[\\\"review\\\"],\\n    \\\"assets\\\": {\\n        \\\"basePath\\\": \\\"/src/public\\\",\\n        \\\"js\\\": {\\n            \\\"bottom\\\": [\\n                \\\"js/report-review.js\\\",\\n                \\\"js/lib/lean-modal.min.js\\\",\\n                \\\"js/moderate-review.js\\\"\\n            ]\\n        },\\n        \\\"css\\\": {\\n            \\\"top\\\": [\\n                \\\"css/reviews.sass\\\"\\n            ]\\n        }\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\nFor a project that has it's own build step, you can have Bosco wrap around it:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\n{\\n    \\\"build\\\":{\\n        \\\"command\\\":\\\"gulp build\\\",\\n        \\\"watch\\\":{\\n            \\\"command\\\":\\\"gulp build --watch\\\",\\n            \\\"ready\\\":\\\"Finished 'build'\\\"\\n        }\\n    },\\n    \\\"assets\\\": {\\n        \\\"basePath\\\":\\\"/dist\\\",\\n         \\\"js\\\": {\\n            \\\"upload\\\": [\\n                \\\"js/tsl-uploader.js\\\"\\n            ]\\n        },\\n        \\\"css\\\": {\\n             \\\"upload\\\": [\\n                \\\"css/tsl-uploader.css\\\"\\n            ]\\n        },\\n        \\\"images\\\": {\\n            \\\"upload\\\" :[\\n                \\\"img\\\"\\n            ]\\n        }\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"Serve static assets locally during development.","slug":"cdn","type":"basic","title":"cdn"}

cdn

Serve static assets locally during development.

[block:code] { "codes": [ { "code": "bosco cdn\nbosco cdn minify", "language": "text" } ] } [/block] This command will run the bundling and minification process and then serve all of the static assets locally, which defaults to http://localhost:7334/. It will watch the assets specified in the bosco-service.json file and reload if they change. It is expected that you leave this command running while doing development on services, as if you are also using Compoxure and bundle-version then it provides the versioned HTML fragments that allow the static assets to be included in other pages. [block:api-header] { "type": "basic", "title": "Service Configuration Requirements" } [/block] For this command to work you must have configured the bosco-service.json file in the base of the micro services who would like to take part in the asset minification process. An example bosco-service.json file is shown below for a simple service that doesn't have its own build script: [block:code] { "codes": [ { "code": "{\n \"tags\":[\"review\"],\n \"assets\": {\n \"basePath\": \"/src/public\",\n \"js\": {\n \"bottom\": [\n \"js/report-review.js\",\n \"js/lib/lean-modal.min.js\",\n \"js/moderate-review.js\"\n ]\n },\n \"css\": {\n \"top\": [\n \"css/reviews.sass\"\n ]\n }\n }\n}", "language": "json" } ] } [/block] For a project that has it's own build step, you can have Bosco wrap around it: [block:code] { "codes": [ { "code": "\n{\n \"build\":{\n \"command\":\"gulp build\",\n \"watch\":{\n \"command\":\"gulp build --watch\",\n \"ready\":\"Finished 'build'\"\n }\n },\n \"assets\": {\n \"basePath\":\"/dist\",\n \"js\": {\n \"upload\": [\n \"js/tsl-uploader.js\"\n ]\n },\n \"css\": {\n \"upload\": [\n \"css/tsl-uploader.css\"\n ]\n },\n \"images\": {\n \"upload\" :[\n \"img\"\n ]\n }\n }\n}", "language": "json" } ] } [/block]