handoff-app 0.4.0 → 0.4.1

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
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.4.1] - 2023-04-16
10
+
11
+ ### Bugfixes
12
+ - Fixes a typing error in the project config
13
+ - Fixes an issue where the path of the integrations are relative to the project
14
+ - Fixes an issue where local integrations aren't properly merged on watch
15
+ - Updates the installed template to match the latest desired state
16
+
9
17
  ## [0.4.0] - 2023-04-16
10
18
 
11
19
  This release introduces two major new features - framework integrations
@@ -16,20 +16,20 @@ export interface Integration {
16
16
 
17
17
  export interface FigmaSearch {
18
18
  size: ComponentSizeMap[];
19
- components: FigmaComponentSearch;
19
+ components: FigmaComponentList;
20
20
  }
21
21
 
22
22
  export interface FigmaComponentList {
23
- alert?: FigmaComponentStructure | null;
24
- button?: FigmaComponentStructure | null;
25
- checkbox?: FigmaComponentStructure | null;
26
- input?: FigmaComponentStructure | null;
27
- modal?: FigmaComponentStructure | null;
28
- pagination?: FigmaComponentStructure | null;
29
- radio?: FigmaComponentStructure | null;
30
- select?: FigmaComponentStructure | null;
31
- switch?: FigmaComponentStructure | null;
32
- tooltip?: FigmaComponentStructure | null;
23
+ alert?: FigmaComponentSearch | null;
24
+ button?: FigmaComponentSearch | null;
25
+ checkbox?: FigmaComponentSearch | null;
26
+ input?: FigmaComponentSearch | null;
27
+ modal?: FigmaComponentSearch | null;
28
+ pagination?: FigmaComponentSearch | null;
29
+ radio?: FigmaComponentSearch | null;
30
+ select?: FigmaComponentSearch | null;
31
+ switch?: FigmaComponentSearch | null;
32
+ tooltip?: FigmaComponentSearch | null;
33
33
  }
34
34
 
35
35
  export interface FigmaComponentSearch {
@@ -9744,7 +9744,7 @@ const getPathToIntegration = () => {
9744
9744
  const integrationFolder = 'integrations';
9745
9745
  const defaultIntegration = 'bootstrap';
9746
9746
  const defaultVersion = '5.2';
9747
- const defaultPath = path__default["default"].resolve(path__default["default"].join(integrationFolder, defaultIntegration, defaultVersion));
9747
+ const defaultPath = path__default["default"].resolve(path__default["default"].join(__dirname, integrationFolder, defaultIntegration, defaultVersion));
9748
9748
  const config = documentationObject.getFetchConfig();
9749
9749
  if (config.integration) {
9750
9750
  if (config.integration.name === 'custom') {
@@ -9744,7 +9744,7 @@ const getPathToIntegration = () => {
9744
9744
  const integrationFolder = 'integrations';
9745
9745
  const defaultIntegration = 'bootstrap';
9746
9746
  const defaultVersion = '5.2';
9747
- const defaultPath = path__default["default"].resolve(path__default["default"].join(integrationFolder, defaultIntegration, defaultVersion));
9747
+ const defaultPath = path__default["default"].resolve(path__default["default"].join(__dirname, integrationFolder, defaultIntegration, defaultVersion));
9748
9748
  const config = documentationObject.getFetchConfig();
9749
9749
  if (config.integration) {
9750
9750
  if (config.integration.name === 'custom') {
@@ -14,7 +14,7 @@ export const getPathToIntegration = () => {
14
14
  const defaultIntegration = 'bootstrap';
15
15
  const defaultVersion = '5.2';
16
16
 
17
- const defaultPath = path.resolve(path.join(integrationFolder, defaultIntegration, defaultVersion));
17
+ const defaultPath = path.resolve(path.join(__dirname, integrationFolder, defaultIntegration, defaultVersion));
18
18
 
19
19
  const config = getFetchConfig();
20
20
  if (config.integration) {
@@ -2,31 +2,35 @@
2
2
 
3
3
  /** @type {import('handoff-app/client-config').Config} */
4
4
  const config = {
5
- title: 'Demo Design System', // The Title of your project
6
- client: 'Demo Software', // The name of your org
7
- google_tag_manager: null, // A GTM tag id. If null, GTM will not be added
8
- integration: { // Integration exports a prebuild token map
9
- name: 'bootstrap', // Pick the integration type (bootstrap)
10
- version: '5.2', // Pick the integration version
5
+ title: 'Demo Design System', // The Title of your project
6
+ client: 'Demo Software', // The name of your org
7
+ google_tag_manager: null, // A GTM tag id. If null, GTM will not be added
8
+ integration: {
9
+ // Integration exports a prebuild token map
10
+ name: 'bootstrap', // Pick the integration type (bootstrap)
11
+ version: '5.2', // Pick the integration version
11
12
  },
12
- componentSizeMap: [ // Component size map allows you to map figma
13
- { // size names (small, medium, large) to customize
14
- figma: 'small', // your token names to match the sizes used
15
- css: 'sm', // in your project like (sm, md, lg)
16
- },
17
- {
18
- figma: 'medium',
19
- css: 'md',
20
- },
21
- {
22
- figma: 'large',
23
- css: 'lg',
24
- },
25
- ],
26
- figma: { // figma allows you to customize the way handoff
27
- components: { // fetches from figma.
28
- alert: { // Customize the alert fetch
29
- search: 'Alert', // Search for alerts in a frame called Alert
13
+ figma: { // figma allows you to customize the way handoff fetches from figma.
14
+ size: [
15
+ // Component size map allows you to map figma
16
+ {
17
+ // size names (small, medium, large) to customize
18
+ figma: 'small', // your token names to match the sizes used
19
+ css: 'sm', // in your project like (sm, md, lg)
20
+ },
21
+ {
22
+ figma: 'medium',
23
+ css: 'md',
24
+ },
25
+ {
26
+ figma: 'large',
27
+ css: 'lg',
28
+ },
29
+ ],
30
+ components: {
31
+ alert: {
32
+ // Customize the alert fetch
33
+ search: 'Alert', // Search for alerts in a frame called Alert
30
34
  },
31
35
  button: {
32
36
  search: 'Button',
@@ -57,10 +61,11 @@ const config = {
57
61
  },
58
62
  },
59
63
  },
60
- poweredBy: true, // Show Powered By Handoff at the bottom of the site
61
- logo: '/logo.svg', // The logo to use on the site
62
- favicon: '/favicon.ico', // The Favicon for the site
63
- type_sort: [ // The preferred type sorting
64
+ poweredBy: true, // Show Powered By Handoff at the bottom of the site
65
+ logo: '/logo.svg', // The logo to use on the site
66
+ favicon: '/favicon.ico', // The Favicon for the site
67
+ type_sort: [
68
+ // The preferred type sorting
64
69
  'Heading 1',
65
70
  'Heading 2',
66
71
  'Heading 3',
@@ -75,13 +80,13 @@ const config = {
75
80
  ],
76
81
  // Containers for holding design elements. This object will be overwritten on fetch
77
82
  design: { color: [], typography: [], effect: [] },
78
- // Containers for holding assets. This object will be overwritten on fetch
83
+ // Containers for holding assets. This object will be overwritten on fetch
79
84
  assets: { icons: [], logos: [] },
80
- // The sample text to use on the typography page
81
- type_copy: 'Almost before we knew it, we had left the ground.',
85
+ // The sample text to use on the typography page
86
+ type_copy: 'Almost before we knew it, we had left the ground.',
82
87
  // The sort order of the color types
83
- color_sort: ['primary', 'secondary', 'extra', 'system'],
84
- // The sort order of the component types
88
+ color_sort: ['primary', 'secondary', 'extra', 'system'],
89
+ // The sort order of the component types
85
90
  component_sort: ['primary', 'secondary', 'transparent'],
86
91
  };
87
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "handoff-app",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Automated documentation toolchain for building client side documentation from figma",
5
5
  "author ": {
6
6
  "name": "Convertiv",