Skip to content

Commit

Permalink
feat(generators): added .gitattributes file (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreszorro authored Dec 14, 2024
2 parents 6149640 + ca4d1e6 commit be2e29b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions e2e/scfz.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ describe("e2e", () => {
"environments",
"docs",
"decisions",
".gitattributes",
".gitignore",
"scripts",
"containers",
Expand Down
5 changes: 5 additions & 0 deletions lib/generators/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ const generator: GeneratorDefinition<WorkspaceAnswers> = {
path: "architecture/.gitignore",
templateFile: "templates/.gitignore",
} as AddAction<WorkspaceAnswers>,
{
type: "add",
path: "architecture/.gitattributes",
templateFile: "templates/.gitattributes",
} as AddAction<WorkspaceAnswers>,
{
type: "add",
path: "architecture/.env-arch",
Expand Down
1 change: 1 addition & 0 deletions lib/templates/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
workspace.json binary
2 changes: 2 additions & 0 deletions lib/templates/bundle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import envArch from "./.env-arch.hbs";
import gitattributes from "./.gitattributes";
import gitignore from "./.gitignore";
import componentsComponent from "./components/component.hbs";
import constant from "./constant.hbs";
Expand All @@ -24,6 +25,7 @@ import workspace from "./workspace.hbs";

const templatesMap = new Map([
["templates/.env-arch", envArch],
["templates/.gitattributes", gitattributes],
["templates/.gitignore", gitignore],
["templates/components/component.hbs", componentsComponent],
["templates/constant.hbs", constant],
Expand Down
6 changes: 6 additions & 0 deletions lib/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ declare module "*.gitignore" {
export default content;
}

declare module "*.gitattributes" {
const content: string;

export default content;
}

declare module "*.sh" {
const content: string;

Expand Down

0 comments on commit be2e29b

Please sign in to comment.