Repository: Shopify/themekit
Pull request #642 (2019-06-19 14:15:42)

Sections everywhere
This is adding support for sections-everywhere 😉 

### Warn Checklist
- [ ] This changes the interface and requires a Major/Minor version change.
- [ ] I have :tophat:'d these changes by using the commands I changed by hand.
- [ ] I have added a dependancy to the project.



Patch:
diff --git a/changelog.txt b/changelog.txt
index 9580297..bbb41f5 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,8 @@
 v1.0.1
 ======================
+- Added support for Sections-Everywhere
+- Changes file watcher to be more flexible by polling recursivly instead of
+individually on each folder
 - Added chocolatey installation option
 - Fixed relative filepath saving in the directory config
 - Fixed an issue with updating to a invalid version
diff --git a/src/file/path.go b/src/file/path.go
index 3dddbe1..8a6d17b 100644
--- a/src/file/path.go
+++ b/src/file/path.go
@@ -7,14 +7,17 @@ import (
 
 var (
 	assetLocations = []string{
-		"templates/customers",
 		"assets",
 		"config",
+		"content",
+		"frame",
 		"layout",
-		"snippets",
-		"templates",
 		"locales",
+		"pages",
 		"sections",
+		"snippets",
+		"templates",
+		"templates/customers",
 	}
 )
 
diff --git a/src/release/release.go b/src/release/release.go
index 1cc2aa5..cdf04c7 100644
--- a/src/release/release.go
+++ b/src/release/release.go
@@ -30,7 +30,7 @@ var (
 		"windows-amd64": "theme.exe",
 	}
 	// ThemeKitVersion is the version build of the library
-	ThemeKitVersion, _ = version.NewVersion("1.0.0")
+	ThemeKitVersion, _ = version.NewVersion("1.0.1")
 )
 
 const (


Test patch:
diff --git a/src/file/path_test.go b/src/file/path_test.go
index e8c7479..f56af9e 100644
--- a/src/file/path_test.go
+++ b/src/file/path_test.go
@@ -29,16 +29,21 @@ func TestPathToProject(t *testing.T) {
 func TestDirInProject(t *testing.T) {
 	root := filepath.Join("long", "path", "to")
 	tests := map[string]bool{
-		"": false,
-		filepath.Join(root, "misc"):                false,
+		"":                                         false,
 		filepath.Join(root, "assets"):              true,
-		filepath.Join(root, "templates/customers"): true,
 		filepath.Join(root, "config"):              true,
+		filepath.Join(root, "content"):             true,
+		filepath.Join(root, "css"):                 false,
+		filepath.Join(root, "frame"):               true,
 		filepath.Join(root, "layout"):              true,
-		filepath.Join(root, "snippets"):            true,
-		filepath.Join(root, "templates"):           true,
 		filepath.Join(root, "locales"):             true,
+		filepath.Join(root, "misc"):                false,
+		filepath.Join(root, "node_modules"):        false,
+		filepath.Join(root, "pages"):               true,
 		filepath.Join(root, "sections"):            true,
+		filepath.Join(root, "snippets"):            true,
+		filepath.Join(root, "templates"):           true,
+		filepath.Join(root, "templates/customers"): true,
 	}
 	for input, expected := range tests {
 		assert.Equal(t, expected, isProjectDirectory(root, input), input)
@@ -48,8 +53,8 @@ func TestDirInProject(t *testing.T) {
 func TestPathInProject(t *testing.T) {
 	root := filepath.Join("long", "path", "to")
 	tests := map[string]bool{
-		"": false,
-		filepath.Join(root, "config.yml"):                            false,
+		"":                                false,
+		filepath.Join(root, "config.yml"): false,
 		filepath.Join(root, "misc", "other.html"):                    false,
 		filepath.Join(root, "assets", "logo.png"):                    true,
 		filepath.Join(root, "node_modules", "assets", "logo.png"):    false,