{"action":"created","comment":{"url":"https://api.github.com/repos/MoOx/statinamic/pulls/comments/50817193","id":50817193,"diff_hunk":"@@ -107,6 +107,12 @@ export default (config, options = {}) => {\n     noInfo: true,\n   }))\n   server.use(options.baseUrl.pathname, router)\n+  // Serve staticAssets on development\n+  if (options.staticAssets !== undefined) {\n+    const staticAssets = options.staticAssets\n+    const route = options.baseUrl.pathname + staticAssets.route\n+    server.use(route, express.static(staticAssets.path))\n+  }","path":"src/builder/server.js","position":9,"original_position":9,"commit_id":"405b47ffb35649e6e3455ed4356425d4890d04dd","original_commit_id":"405b47ffb35649e6e3455ed4356425d4890d04dd","user":{"login":"MoOx","id":157534,"avatar_url":"https://avatars.githubusercontent.com/u/157534?v=3","gravatar_id":"","url":"https://api.github.com/users/MoOx","html_url":"https://github.com/MoOx","followers_url":"https://api.github.com/users/MoOx/followers","following_url":"https://api.github.com/users/MoOx/following{/other_user}","gists_url":"https://api.github.com/users/MoOx/gists{/gist_id}","starred_url":"https://api.github.com/users/MoOx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoOx/subscriptions","organizations_url":"https://api.github.com/users/MoOx/orgs","repos_url":"https://api.github.com/users/MoOx/repos","events_url":"https://api.github.com/users/MoOx/events{/privacy}","received_events_url":"https://api.github.com/users/MoOx/received_events","type":"User","site_admin":false},"body":"yeah but now (with webpack first) the issue is more probably. Anyway, good idea.","created_at":"2016-01-26T10:25:10Z","updated_at":"2016-01-26T10:25:10Z","html_url":"https://github.com/MoOx/statinamic/pull/94#discussion_r50817193","pull_request_url":"https://api.github.com/repos/MoOx/statinamic/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/MoOx/statinamic/pulls/comments/50817193"},"html":{"href":"https://github.com/MoOx/statinamic/pull/94#discussion_r50817193"},"pull_request":{"href":"https://api.github.com/repos/MoOx/statinamic/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/MoOx/statinamic/pulls/94","id":57002329,"html_url":"https://github.com/MoOx/statinamic/pull/94","diff_url":"https://github.com/MoOx/statinamic/pull/94.diff","patch_url":"https://github.com/MoOx/statinamic/pull/94.patch","issue_url":"https://api.github.com/repos/MoOx/statinamic/issues/94","number":94,"state":"open","locked":false,"title":"Serve static assets (images, video, ...)","user":{"login":"thangngoc89","id":3049054,"avatar_url":"https://avatars.githubusercontent.com/u/3049054?v=3","gravatar_id":"","url":"https://api.github.com/users/thangngoc89","html_url":"https://github.com/thangngoc89","followers_url":"https://api.github.com/users/thangngoc89/followers","following_url":"https://api.github.com/users/thangngoc89/following{/other_user}","gists_url":"https://api.github.com/users/thangngoc89/gists{/gist_id}","starred_url":"https://api.github.com/users/thangngoc89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thangngoc89/subscriptions","organizations_url":"https://api.github.com/users/thangngoc89/orgs","repos_url":"https://api.github.com/users/thangngoc89/repos","events_url":"https://api.github.com/users/thangngoc89/events{/privacy}","received_events_url":"https://api.github.com/users/thangngoc89/received_events","type":"User","site_admin":false},"body":"- Copy assets folder to dist folder on static build\r\n- Serve with express static on development\r\n\r\nexample config:\r\n\r\n\r\n```\r\nbuilder({\r\n  staticAssets: \"assets\" // relative to content folder\r\n...\r\n```\r\nor\r\n```\r\nbuilder({\r\n  staticAssets: {\r\n    path: \"assets\", // relative to content folder\r\n    route: \"/some-path/assets\"\r\n  },\r\n...\r\n```\r\n\r\n### TODO\r\n- [x] Write code\r\n- [x] Add this feature to docs site\r\n- [x] Add this feature to boilerplate (add comment to docs site)\r\n- [x] Add to change log\r\n- [ ] Write docs","created_at":"2016-01-24T12:42:07Z","updated_at":"2016-01-26T10:25:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f40fb029a08c4dda7659db7f1fed9f4b31bf1fa7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MoOx/statinamic/pulls/94/commits","review_comments_url":"https://api.github.com/repos/MoOx/statinamic/pulls/94/comments","review_comment_url":"https://api.github.com/repos/MoOx/statinamic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MoOx/statinamic/issues/94/comments","statuses_url":"https://api.github.com/repos/MoOx/statinamic/statuses/405b47ffb35649e6e3455ed4356425d4890d04dd","head":{"label":"thangngoc89:static-assets","ref":"static-assets","sha":"405b47ffb35649e6e3455ed4356425d4890d04dd","user":{"login":"thangngoc89","id":3049054,"avatar_url":"https://avatars.githubusercontent.com/u/3049054?v=3","gravatar_id":"","url":"https://api.github.com/users/thangngoc89","html_url":"https://github.com/thangngoc89","followers_url":"https://api.github.com/users/thangngoc89/followers","following_url":"https://api.github.com/users/thangngoc89/following{/other_user}","gists_url":"https://api.github.com/users/thangngoc89/gists{/gist_id}","starred_url":"https://api.github.com/users/thangngoc89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thangngoc89/subscriptions","organizations_url":"https://api.github.com/users/thangngoc89/orgs","repos_url":"https://api.github.com/users/thangngoc89/repos","events_url":"https://api.github.com/users/thangngoc89/events{/privacy}","received_events_url":"https://api.github.com/users/thangngoc89/received_events","type":"User","site_admin":false},"repo":{"id":50190589,"name":"statinamic","full_name":"thangngoc89/statinamic","owner":{"login":"thangngoc89","id":3049054,"avatar_url":"https://avatars.githubusercontent.com/u/3049054?v=3","gravatar_id":"","url":"https://api.github.com/users/thangngoc89","html_url":"https://github.com/thangngoc89","followers_url":"https://api.github.com/users/thangngoc89/followers","following_url":"https://api.github.com/users/thangngoc89/following{/other_user}","gists_url":"https://api.github.com/users/thangngoc89/gists{/gist_id}","starred_url":"https://api.github.com/users/thangngoc89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thangngoc89/subscriptions","organizations_url":"https://api.github.com/users/thangngoc89/orgs","repos_url":"https://api.github.com/users/thangngoc89/repos","events_url":"https://api.github.com/users/thangngoc89/events{/privacy}","received_events_url":"https://api.github.com/users/thangngoc89/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thangngoc89/statinamic","description":"A static website generator to create dynamic website using React components.","fork":true,"url":"https://api.github.com/repos/thangngoc89/statinamic","forks_url":"https://api.github.com/repos/thangngoc89/statinamic/forks","keys_url":"https://api.github.com/repos/thangngoc89/statinamic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thangngoc89/statinamic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thangngoc89/statinamic/teams","hooks_url":"https://api.github.com/repos/thangngoc89/statinamic/hooks","issue_events_url":"https://api.github.com/repos/thangngoc89/statinamic/issues/events{/number}","events_url":"https://api.github.com/repos/thangngoc89/statinamic/events","assignees_url":"https://api.github.com/repos/thangngoc89/statinamic/assignees{/user}","branches_url":"https://api.github.com/repos/thangngoc89/statinamic/branches{/branch}","tags_url":"https://api.github.com/repos/thangngoc89/statinamic/tags","blobs_url":"https://api.github.com/repos/thangngoc89/statinamic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thangngoc89/statinamic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thangngoc89/statinamic/git/refs{/sha}","trees_url":"https://api.github.com/repos/thangngoc89/statinamic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thangngoc89/statinamic/statuses/{sha}","languages_url":"https://api.github.com/repos/thangngoc89/statinamic/languages","stargazers_url":"https://api.github.com/repos/thangngoc89/statinamic/stargazers","contributors_url":"https://api.github.com/repos/thangngoc89/statinamic/contributors","subscribers_url":"https://api.github.com/repos/thangngoc89/statinamic/subscribers","subscription_url":"https://api.github.com/repos/thangngoc89/statinamic/subscription","commits_url":"https://api.github.com/repos/thangngoc89/statinamic/commits{/sha}","git_commits_url":"https://api.github.com/repos/thangngoc89/statinamic/git/commits{/sha}","comments_url":"https://api.github.com/repos/thangngoc89/statinamic/comments{/number}","issue_comment_url":"https://api.github.com/repos/thangngoc89/statinamic/issues/comments{/number}","contents_url":"https://api.github.com/repos/thangngoc89/statinamic/contents/{+path}","compare_url":"https://api.github.com/repos/thangngoc89/statinamic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thangngoc89/statinamic/merges","archive_url":"https://api.github.com/repos/thangngoc89/statinamic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thangngoc89/statinamic/downloads","issues_url":"https://api.github.com/repos/thangngoc89/statinamic/issues{/number}","pulls_url":"https://api.github.com/repos/thangngoc89/statinamic/pulls{/number}","milestones_url":"https://api.github.com/repos/thangngoc89/statinamic/milestones{/number}","notifications_url":"https://api.github.com/repos/thangngoc89/statinamic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thangngoc89/statinamic/labels{/name}","releases_url":"https://api.github.com/repos/thangngoc89/statinamic/releases{/id}","deployments_url":"https://api.github.com/repos/thangngoc89/statinamic/deployments","created_at":"2016-01-22T15:47:28Z","updated_at":"2016-01-22T15:47:29Z","pushed_at":"2016-01-26T10:12:43Z","git_url":"git://github.com/thangngoc89/statinamic.git","ssh_url":"git@github.com:thangngoc89/statinamic.git","clone_url":"https://github.com/thangngoc89/statinamic.git","svn_url":"https://github.com/thangngoc89/statinamic","homepage":"http://moox.io/statinamic/","size":367,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MoOx:master","ref":"master","sha":"46af2d670dfca625c2ef4ca59c78317ee21fb1f4","user":{"login":"MoOx","id":157534,"avatar_url":"https://avatars.githubusercontent.com/u/157534?v=3","gravatar_id":"","url":"https://api.github.com/users/MoOx","html_url":"https://github.com/MoOx","followers_url":"https://api.github.com/users/MoOx/followers","following_url":"https://api.github.com/users/MoOx/following{/other_user}","gists_url":"https://api.github.com/users/MoOx/gists{/gist_id}","starred_url":"https://api.github.com/users/MoOx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoOx/subscriptions","organizations_url":"https://api.github.com/users/MoOx/orgs","repos_url":"https://api.github.com/users/MoOx/repos","events_url":"https://api.github.com/users/MoOx/events{/privacy}","received_events_url":"https://api.github.com/users/MoOx/received_events","type":"User","site_admin":false},"repo":{"id":41730120,"name":"statinamic","full_name":"MoOx/statinamic","owner":{"login":"MoOx","id":157534,"avatar_url":"https://avatars.githubusercontent.com/u/157534?v=3","gravatar_id":"","url":"https://api.github.com/users/MoOx","html_url":"https://github.com/MoOx","followers_url":"https://api.github.com/users/MoOx/followers","following_url":"https://api.github.com/users/MoOx/following{/other_user}","gists_url":"https://api.github.com/users/MoOx/gists{/gist_id}","starred_url":"https://api.github.com/users/MoOx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoOx/subscriptions","organizations_url":"https://api.github.com/users/MoOx/orgs","repos_url":"https://api.github.com/users/MoOx/repos","events_url":"https://api.github.com/users/MoOx/events{/privacy}","received_events_url":"https://api.github.com/users/MoOx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MoOx/statinamic","description":"A static website generator to create dynamic website using React components.","fork":false,"url":"https://api.github.com/repos/MoOx/statinamic","forks_url":"https://api.github.com/repos/MoOx/statinamic/forks","keys_url":"https://api.github.com/repos/MoOx/statinamic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MoOx/statinamic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MoOx/statinamic/teams","hooks_url":"https://api.github.com/repos/MoOx/statinamic/hooks","issue_events_url":"https://api.github.com/repos/MoOx/statinamic/issues/events{/number}","events_url":"https://api.github.com/repos/MoOx/statinamic/events","assignees_url":"https://api.github.com/repos/MoOx/statinamic/assignees{/user}","branches_url":"https://api.github.com/repos/MoOx/statinamic/branches{/branch}","tags_url":"https://api.github.com/repos/MoOx/statinamic/tags","blobs_url":"https://api.github.com/repos/MoOx/statinamic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MoOx/statinamic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MoOx/statinamic/git/refs{/sha}","trees_url":"https://api.github.com/repos/MoOx/statinamic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MoOx/statinamic/statuses/{sha}","languages_url":"https://api.github.com/repos/MoOx/statinamic/languages","stargazers_url":"https://api.github.com/repos/MoOx/statinamic/stargazers","contributors_url":"https://api.github.com/repos/MoOx/statinamic/contributors","subscribers_url":"https://api.github.com/repos/MoOx/statinamic/subscribers","subscription_url":"https://api.github.com/repos/MoOx/statinamic/subscription","commits_url":"https://api.github.com/repos/MoOx/statinamic/commits{/sha}","git_commits_url":"https://api.github.com/repos/MoOx/statinamic/git/commits{/sha}","comments_url":"https://api.github.com/repos/MoOx/statinamic/comments{/number}","issue_comment_url":"https://api.github.com/repos/MoOx/statinamic/issues/comments{/number}","contents_url":"https://api.github.com/repos/MoOx/statinamic/contents/{+path}","compare_url":"https://api.github.com/repos/MoOx/statinamic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MoOx/statinamic/merges","archive_url":"https://api.github.com/repos/MoOx/statinamic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MoOx/statinamic/downloads","issues_url":"https://api.github.com/repos/MoOx/statinamic/issues{/number}","pulls_url":"https://api.github.com/repos/MoOx/statinamic/pulls{/number}","milestones_url":"https://api.github.com/repos/MoOx/statinamic/milestones{/number}","notifications_url":"https://api.github.com/repos/MoOx/statinamic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MoOx/statinamic/labels{/name}","releases_url":"https://api.github.com/repos/MoOx/statinamic/releases{/id}","deployments_url":"https://api.github.com/repos/MoOx/statinamic/deployments","created_at":"2015-09-01T09:40:57Z","updated_at":"2016-01-24T18:33:10Z","pushed_at":"2016-01-26T10:12:44Z","git_url":"git://github.com/MoOx/statinamic.git","ssh_url":"git@github.com:MoOx/statinamic.git","clone_url":"https://github.com/MoOx/statinamic.git","svn_url":"https://github.com/MoOx/statinamic","homepage":"http://moox.io/statinamic/","size":2005,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":28,"forks":8,"open_issues":28,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MoOx/statinamic/pulls/94"},"html":{"href":"https://github.com/MoOx/statinamic/pull/94"},"issue":{"href":"https://api.github.com/repos/MoOx/statinamic/issues/94"},"comments":{"href":"https://api.github.com/repos/MoOx/statinamic/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/MoOx/statinamic/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/MoOx/statinamic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MoOx/statinamic/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/MoOx/statinamic/statuses/405b47ffb35649e6e3455ed4356425d4890d04dd"}}}}