@jobber/generators 0.7.0 → 0.7.2

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/CHANGELOG.md CHANGED
@@ -1,13 +1,24 @@
1
- ---
2
- name: Generators
3
- menu: Changelog
4
- ---
5
-
6
- # @jobber/generators: Change Log
1
+ # Change Log
7
2
 
8
3
  All notable changes to this project will be documented in this file.
9
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
10
5
 
6
+ ## [0.7.2](https://github.com/GetJobber/atlantis/compare/@jobber/generators@0.7.1...@jobber/generators@0.7.2) (2023-02-28)
7
+
8
+ **Note:** Version bump only for package @jobber/generators
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.7.1](https://github.com/GetJobber/atlantis/compare/@jobber/generators@0.7.0...@jobber/generators@0.7.1) (2023-02-28)
15
+
16
+ **Note:** Version bump only for package @jobber/generators
17
+
18
+
19
+
20
+
21
+
11
22
  # [0.7.0](https://github.com/GetJobber/atlantis/compare/@jobber/generators@0.6.0...@jobber/generators@0.7.0) (2023-02-23)
12
23
 
13
24
 
package/index.js CHANGED
@@ -7,7 +7,7 @@ module.exports = function (plop, config) {
7
7
  const { basePath, templateGlob } = Object.assign(
8
8
  {
9
9
  basePath: "packages/components/src",
10
- templateGlob: "!(*.stories.*)",
10
+ templateGlob: "*",
11
11
  },
12
12
  config || {},
13
13
  );
@@ -30,23 +30,6 @@ module.exports = function (plop, config) {
30
30
  default: basePath,
31
31
  directoryOnly: true,
32
32
  },
33
- {
34
- type: "expand",
35
- name: "storybook",
36
- message: "Create Storybook mdx?",
37
- choices: [
38
- {
39
- key: "y",
40
- name: "Yes",
41
- value: "yes",
42
- },
43
- {
44
- key: "n",
45
- name: "No",
46
- value: "no",
47
- },
48
- ],
49
- },
50
33
  ],
51
34
  actions: [
52
35
  /**
@@ -63,18 +46,6 @@ module.exports = function (plop, config) {
63
46
  base: "templates/component",
64
47
  templateFiles: `templates/component/${templateGlob}`,
65
48
  },
66
- {
67
- type: "addMany",
68
- destination: `{{path}}/{{name}}/`,
69
- base: "templates/component",
70
- templateFiles: `templates/component/*.stories.*`,
71
- skip(data) {
72
- if (data.storybook !== "yes") {
73
- return "Not adding storybook file";
74
- }
75
- return;
76
- },
77
- },
78
49
  ],
79
50
  });
80
51
  };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@jobber/generators",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "scripts": {},
7
7
  "dependencies": {
8
8
  "inquirer-path": "^1.0.0-beta5"
9
9
  },
10
- "gitHead": "80ab88b320ffbb94af1dfd20c055ebd771c4bcaa"
10
+ "gitHead": "da982c762a30359a626d4f8a81806ae754589798"
11
11
  }
@@ -1,18 +1,17 @@
1
1
  import React from "react";
2
- import renderer from "react-test-renderer";
3
2
  import { cleanup, fireEvent, render } from "@testing-library/react";
4
3
  import { {{name}} } from ".";
5
4
 
6
5
  afterEach(cleanup);
7
6
 
8
7
  it("renders a {{name}}", () => {
9
- const tree = renderer.create(<{{name}} text="Foo" />).toJSON();
10
- expect(tree).toMatchSnapshot();
8
+ const { container } = render(<{{name}} text="Foo" />);
9
+ expect(container).toMatchSnapshot();
11
10
  });
12
11
 
13
12
  it("renders a loud {{name}}", () => {
14
- const tree = renderer.create(<{{name}} text="Foo" loud={true} />).toJSON();
15
- expect(tree).toMatchSnapshot();
13
+ const { container } = render(<{{name}} text="Foo" loud={true} />);
14
+ expect(container).toMatchSnapshot();
16
15
  });
17
16
 
18
17
  test("it should call the handler with the new value", () => {
@@ -1,106 +0,0 @@
1
- ---
2
- name: {{ pascalCase name }}
3
- menu: Components
4
- route: /components/{{ dashCase name }}
5
- showDirectoryLink: true
6
- ---
7
-
8
- import { Playground, Props } from "docz";
9
- import { {{name}} } from ".";
10
-
11
- # {{ titleCase name }}
12
-
13
- ```ts
14
- import { {{ name }} } from "@jobber/components/{{ name }}";
15
- ```
16
-
17
- <Playground>
18
- <{{ name }} text="Bob" />
19
- </Playground>
20
-
21
- <!--
22
- INTERFACE: This is for the proposal stage of the component
23
-
24
- Provide an example of what the component looks like in code. How would you use
25
- it from another React component? This should consist primarily of code blocks.
26
- This section can be deleted once the component is built, when the Playground
27
- will demonstrate this at a higher fidelity.
28
- -->
29
-
30
- ## Props
31
-
32
- <Props of={ {{ name }} } />
33
-
34
- <!--
35
- It is not necessary to provide an example of each prop. Use usage examples to
36
- highlight key features of a component or particular considerations.
37
-
38
- See `Button.mdx` for a good example of this.
39
- -->
40
-
41
- ## Usage guidelines
42
-
43
- The `<{{name}}>` will... _Add a brief description of the component_
44
-
45
- <!--
46
- What is the design purpose of this component? How do its responsibilities
47
- relate to other components? What should this component not be used for? What
48
- are some related components in Atlantis? Try to describe this component not
49
- in terms of what it looks like or what elements make it up, but what function
50
- it performs or how it enables a user to perform tasks (e.g. “Buttons allow users
51
- to initiate, complete, and reverse actions.” vs “Buttons are rectangular elements
52
- that have a green background and white text”).
53
- -->
54
-
55
- ## Content guidelines
56
-
57
- <!--
58
- What type of content does this component present (documents, text, images, other components)?
59
- What is the recommended, or expected, amount of content? What is the components’ behaviour when
60
- the provided content diverges from what is expected (image aspect ratio, amount of text, video
61
- vs audio, filesize)? Are there any important references to the [Product Vocabulary](https://atlantis.getjobber.com/guides/product-vocabulary)
62
- that should be made regarding this component? What happens when content is unavailable or unreliable
63
- (poor connection, empty states, flaky GPS data?)
64
- -->
65
-
66
- ## Accessibility
67
-
68
- <!--
69
- Describe the accessibility concerns for the component. How does it handle touch vs cursor vs
70
- keyboard events? Should it capture input? What should a screen reader see when it's focuse?
71
- -->
72
-
73
- ## Responsiveness
74
-
75
- <!--
76
- How should the component behave on an iPhone 8? An iPad? A 1920x1080 monitor? How does the
77
- component appear when the component itself is less than 375px wide? Less than 640px wide?
78
- Less than 1200px wide? Greater than 1200px? Does it change when the device DPI is higher
79
- or lower?
80
- -->
81
-
82
- ## Mockup
83
-
84
- <iframe
85
- style="border: 1px solid rgba(0, 0, 0, 0.1);"
86
- width="800"
87
- height="450"
88
- src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F3BXCXXD9glMtj8RAHjXiQC%2FDesign-System-Contribution-TEMPLATE%3Fnode-id%3D332%253A5526"
89
- allowfullscreen>
90
- </iframe>
91
-
92
- <!--
93
- Insert a Figma mockup from the [Design System Contribution template](https://www.figma.com/file/3BXCXXD9glMtj8RAHjXiQC/Design-System-Contribution-TEMPLATE?node-id=26%3A2)
94
- that conveys the visual design of the component, with variants and state accounted for.
95
- Consider progressive enhancement; might this rely on newer browser features that aren’t
96
- widely supported yet?
97
- -->
98
-
99
- ## Notes
100
-
101
- <!--
102
- What decisions worth remembering have gone into this component? Did we consider any potentially valuable
103
- functionality that we’re not implementing right now for scope purposes? Are there any design decisions
104
- that might need explaining beyond the usage guidelines? This will help consumers understand this component
105
- more fully.
106
- -->