gatsby-attainlabs-cms 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/gatsby-node.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,10 +18,10 @@ npm install gatsby-attainlabs-cms
|
|
|
18
18
|
|
|
19
19
|
### 1. Add environment variable
|
|
20
20
|
|
|
21
|
-
At the root of your Gatsby site, create a `.env
|
|
21
|
+
At the root of your Gatsby site, create a `.env` file if it doesn’t already exist:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
touch .env
|
|
24
|
+
touch .env
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Inside the file, add your Azure DevOps Personal Access Token (PAT):
|
package/gatsby-node.js
CHANGED
|
@@ -56,7 +56,7 @@ export const onPreInit = async (_, pluginOptions) => {
|
|
|
56
56
|
localBasePath: path.resolve("./src/cms/components/global"),
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
|
-
repoPath: `/apps/cms/src/
|
|
59
|
+
repoPath: `/apps/cms/src/gatsby-plugin-theme-ui/${brands[brand]}`,
|
|
60
60
|
localBasePath: path.resolve("./src/gatsby-plugin-theme-ui"),
|
|
61
61
|
},
|
|
62
62
|
];
|
|
@@ -97,10 +97,10 @@ export const onPreInit = async (_, pluginOptions) => {
|
|
|
97
97
|
// Keep only index.tsx files
|
|
98
98
|
const items = (result.value || []).filter(
|
|
99
99
|
(i) =>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
!i.isFolder &&
|
|
101
|
+
i.gitObjectType === "blob" &&
|
|
102
|
+
(posix.basename(i.path) === "index.tsx" ||
|
|
103
|
+
posix.extname(i.path) === ".ts")
|
|
104
104
|
);
|
|
105
105
|
|
|
106
106
|
console.log(`Found ${items.length} files in ${repoPath}`);
|