{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/slate/issues/289","repository_url":"https://api.github.com/repos/Shopify/slate","labels_url":"https://api.github.com/repos/Shopify/slate/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/slate/issues/289/comments","events_url":"https://api.github.com/repos/Shopify/slate/issues/289/events","html_url":"https://github.com/Shopify/slate/issues/289","id":258593471,"node_id":"MDU6SXNzdWUyNTg1OTM0NzE=","number":289,"title":"Allow code to be organized in subfolders in `src/snippets` and `src/sections`","user":{"login":"t-kelly","id":4837696,"node_id":"MDQ6VXNlcjQ4Mzc2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/4837696?v=4","gravatar_id":"","url":"https://api.github.com/users/t-kelly","html_url":"https://github.com/t-kelly","followers_url":"https://api.github.com/users/t-kelly/followers","following_url":"https://api.github.com/users/t-kelly/following{/other_user}","gists_url":"https://api.github.com/users/t-kelly/gists{/gist_id}","starred_url":"https://api.github.com/users/t-kelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-kelly/subscriptions","organizations_url":"https://api.github.com/users/t-kelly/orgs","repos_url":"https://api.github.com/users/t-kelly/repos","events_url":"https://api.github.com/users/t-kelly/events{/privacy}","received_events_url":"https://api.github.com/users/t-kelly/received_events","type":"User","site_admin":false},"labels":[{"id":428946136,"node_id":"MDU6TGFiZWw0Mjg5NDYxMzY=","url":"https://api.github.com/repos/Shopify/slate/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":843919768,"node_id":"MDU6TGFiZWw4NDM5MTk3Njg=","url":"https://api.github.com/repos/Shopify/slate/labels/v1.x","name":"v1.x","color":"99e8ff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-09-18T19:28:17Z","updated_at":"2018-11-28T20:53:08Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Developers like to keep their repos organized. One way of doing this is through folders and file groupings. This organizational method is possible in folders like `src/styles` and `src/scripts` but not possible in `src/snippets` and `src/sections`.\r\n\r\nLet's allow developers to create whatever folder structure they want in the main `src/` folders, and then output those folders in the correct structure for Shopify servers in the `dist/` folder.\r\n\r\nFor example\r\n```\r\nsrc/\r\n-- snippets/\r\n---- snippet-1/\r\n------ snippet-1a.liquid\r\n------ snippet-1b.liquid\r\n---- snippet-2/\r\n------ snippet-2a.liquid\r\n------ snippet-2b.liquid\r\n```\r\nwould be transformed into the following on build:\r\n```\r\ndist/\r\n-- snippets/\r\n---- snippet-1a.liquid\r\n---- snippet-1b.liquid\r\n---- snippet-2a.liquid\r\n---- snippet-2b.liquid\r\n```\r\n\r\nRelated https://github.com/Shopify/slate/issues/271\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Shopify/slate/issues/comments/442600564","html_url":"https://github.com/Shopify/slate/issues/289#issuecomment-442600564","issue_url":"https://api.github.com/repos/Shopify/slate/issues/289","id":442600564,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjYwMDU2NA==","user":{"login":"tshamz","id":2075200,"node_id":"MDQ6VXNlcjIwNzUyMDA=","avatar_url":"https://avatars2.githubusercontent.com/u/2075200?v=4","gravatar_id":"","url":"https://api.github.com/users/tshamz","html_url":"https://github.com/tshamz","followers_url":"https://api.github.com/users/tshamz/followers","following_url":"https://api.github.com/users/tshamz/following{/other_user}","gists_url":"https://api.github.com/users/tshamz/gists{/gist_id}","starred_url":"https://api.github.com/users/tshamz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tshamz/subscriptions","organizations_url":"https://api.github.com/users/tshamz/orgs","repos_url":"https://api.github.com/users/tshamz/repos","events_url":"https://api.github.com/users/tshamz/events{/privacy}","received_events_url":"https://api.github.com/users/tshamz/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T20:53:08Z","updated_at":"2018-11-28T20:53:08Z","author_association":"CONTRIBUTOR","body":"@RustyDev try updating the paths to this...\r\n\r\n```\r\nnew CopyWebpackPlugin([\r\n    { from: 'snippets/**/*', to: '../snippets/', flatten: true },\r\n    { from: 'sections/**/*', to: '../sections/', flatten: true },\r\n]),\r\n```\r\n\r\nThis will work, but anytime you update a file in one of your snippets/sections subdirectories, the watcher will upload two files. One of the uploads will succeed, and one will fail since the CopyWebpackPlugin from core.js is still trying to upload the unflattened file. Idk how to go about disabling the patterns for `snippets/` and `sections/` from the core.js instance of CopyWebpackPlugin, but if you can figure that out you should be good to go."}}
{"actor":{"display_login":"tshamz"}}