@smileid/web-components 1.5.0 → 2.0.0

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.
Files changed (81) hide show
  1. package/package.json +21 -11
  2. package/{components → src/components}/combobox/src/Combobox.js +4 -1
  3. package/{components → src/components}/document/src/DocumentCaptureScreens.js +1 -1
  4. package/{components → src/components}/end-user-consent/src/EndUserConsent.js +4 -1
  5. package/{components → src/components}/navigation/src/Navigation.js +4 -1
  6. package/{components → src/components}/selfie/src/SelfieCaptureScreens.js +7 -15
  7. package/{components → src/components}/selfie/src/selfie-capture/SelfieCapture.js +39 -8
  8. package/{components → src/components}/signature-pad/package.json +1 -1
  9. package/{components → src/components}/signature-pad/src/SignaturePad.js +4 -1
  10. package/{components → src/components}/smart-camera-web/src/SmartCameraWeb.js +1 -1
  11. package/{components → src/components}/totp-consent/src/TotpConsent.js +1 -1
  12. package/.eslintrc.cjs +0 -72
  13. package/cypress/e2e/smart-camera-web-agent-mode.cy.js +0 -144
  14. package/cypress/e2e/smart-camera-web-attribution.cy.js +0 -249
  15. package/cypress/e2e/smart-camera-web-back-press.cy.js +0 -481
  16. package/cypress/e2e/smart-camera-web-complete-flow.cy.js +0 -221
  17. package/cypress/e2e/smart-camera-web-hide-back-to-host.cy.js +0 -61
  18. package/cypress/e2e/smart-camera-web-hide-instructions.cy.js +0 -334
  19. package/cypress/e2e/smart-camera-web.cy.js +0 -309
  20. package/cypress/fixtures/example.json +0 -5
  21. package/cypress/pages/capture-back-of-id-hide-attribution.html +0 -44
  22. package/cypress/pages/capture-back-of-id-navigation.html +0 -72
  23. package/cypress/pages/smart-camera-web-agent-mode.html +0 -36
  24. package/cypress/pages/smart-camera-web-complete-flow.html +0 -42
  25. package/cypress/pages/smart-camera-web-hide-instructions.html +0 -38
  26. package/cypress/pages/smart-camera-web.html +0 -38
  27. package/cypress/support/commands.js +0 -144
  28. package/cypress/support/e2e.js +0 -20
  29. package/cypress.config.js +0 -11
  30. package/esbuild.js +0 -119
  31. package/generate-exports.js +0 -34
  32. /package/{components → src/components}/README.md +0 -0
  33. /package/{components → src/components}/attribution/PoweredBySmileId.js +0 -0
  34. /package/{components → src/components}/camera-permission/CameraPermission.js +0 -0
  35. /package/{components → src/components}/camera-permission/CameraPermission.stories.js +0 -0
  36. /package/{components → src/components}/combobox/src/index.js +0 -0
  37. /package/{components → src/components}/document/src/DocumentCaptureScreens.stories.js +0 -0
  38. /package/{components → src/components}/document/src/README.md +0 -0
  39. /package/{components → src/components}/document/src/document-capture/DocumentCapture.js +0 -0
  40. /package/{components → src/components}/document/src/document-capture/DocumentCapture.stories.js +0 -0
  41. /package/{components → src/components}/document/src/document-capture/README.md +0 -0
  42. /package/{components → src/components}/document/src/document-capture/index.js +0 -0
  43. /package/{components → src/components}/document/src/document-capture-instructions/DocumentCaptureInstructions.js +0 -0
  44. /package/{components → src/components}/document/src/document-capture-instructions/DocumentCaptureInstructions.stories.js +0 -0
  45. /package/{components → src/components}/document/src/document-capture-instructions/README.md +0 -0
  46. /package/{components → src/components}/document/src/document-capture-instructions/index.js +0 -0
  47. /package/{components → src/components}/document/src/document-capture-review/DocumentCaptureReview.js +0 -0
  48. /package/{components → src/components}/document/src/document-capture-review/DocumentCaptureReview.stories.js +0 -0
  49. /package/{components → src/components}/document/src/document-capture-review/README.md +0 -0
  50. /package/{components → src/components}/document/src/document-capture-review/index.js +0 -0
  51. /package/{components → src/components}/document/src/index.js +0 -0
  52. /package/{components → src/components}/end-user-consent/src/EndUserConsent.stories.js +0 -0
  53. /package/{components → src/components}/end-user-consent/src/index.js +0 -0
  54. /package/{components → src/components}/navigation/src/Navigation.stories.js +0 -0
  55. /package/{components → src/components}/navigation/src/index.js +0 -0
  56. /package/{components → src/components}/selfie/README.md +0 -0
  57. /package/{components → src/components}/selfie/src/SelfieCaptureScreens.stories.js +0 -0
  58. /package/{components → src/components}/selfie/src/index.js +0 -0
  59. /package/{components → src/components}/selfie/src/selfie-capture/SelfieCapture.stories.js +0 -0
  60. /package/{components → src/components}/selfie/src/selfie-capture/index.js +0 -0
  61. /package/{components → src/components}/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.js +0 -0
  62. /package/{components → src/components}/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.stories.js +0 -0
  63. /package/{components → src/components}/selfie/src/selfie-capture-instructions/index.js +0 -0
  64. /package/{components → src/components}/selfie/src/selfie-capture-review/SelfieCaptureReview.js +0 -0
  65. /package/{components → src/components}/selfie/src/selfie-capture-review/SelfieCaptureReview.stories.js +0 -0
  66. /package/{components → src/components}/selfie/src/selfie-capture-review/index.js +0 -0
  67. /package/{components → src/components}/signature-pad/package-lock.json +0 -0
  68. /package/{components → src/components}/signature-pad/src/SignaturePad.stories.js +0 -0
  69. /package/{components → src/components}/signature-pad/src/index.js +0 -0
  70. /package/{components → src/components}/smart-camera-web/src/README.md +0 -0
  71. /package/{components → src/components}/smart-camera-web/src/SmartCameraWeb.stories.js +0 -0
  72. /package/{components → src/components}/totp-consent/src/index.js +0 -0
  73. /package/{domain → src/domain}/camera/src/README.md +0 -0
  74. /package/{domain → src/domain}/camera/src/SmartCamera.js +0 -0
  75. /package/{domain → src/domain}/constants/src/Constants.js +0 -0
  76. /package/{domain → src/domain}/file-upload/README.md +0 -0
  77. /package/{domain → src/domain}/file-upload/src/SmartFileUpload.js +0 -0
  78. /package/{index.js → src/index.js} +0 -0
  79. /package/{styles → src/styles}/README.md +0 -0
  80. /package/{styles → src/styles}/src/styles.js +0 -0
  81. /package/{styles → src/styles}/src/typography.js +0 -0
@@ -1,44 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1" />
5
- <style>
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- body {
13
- max-width: 100%;
14
- min-height: 100%;
15
- }
16
-
17
- smart-camera-web {
18
- margin-left: auto;
19
- margin-right: auto;
20
- max-width: 40ch;
21
- padding: 1rem;
22
- width: auto;
23
- }
24
- </style>
25
- </head>
26
-
27
- <body>
28
- <smart-camera-web
29
- capture-id="back"
30
- hide-attribution
31
- disable-image-tests
32
- document-capture-modes="camera,upload"
33
- >
34
- </smart-camera-web>
35
-
36
- <script src="./js/components/smart-camera-web/src/SmartCameraWeb.js"></script>
37
- <script>
38
- const app = document.querySelector('smart-camera-web');
39
- app.addEventListener('smart-camera-web.publish', async (e) => {
40
- console.log(e.detail);
41
- });
42
- </script>
43
- </body>
44
- </html>
@@ -1,72 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1" />
5
- <style>
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- body {
13
- max-width: 100%;
14
- min-height: 100%;
15
- }
16
- button[data-type='icon'] {
17
- align-items: center;
18
- background-color: transparent;
19
- border: 0;
20
- cursor: pointer;
21
- display: flex;
22
- padding: 0;
23
- }
24
- .justify-right {
25
- justify-content: end !important;
26
- }
27
-
28
- .nav {
29
- display: flex;
30
- justify-content: space-between;
31
- }
32
-
33
- .back-button {
34
- display: block !important;
35
- }
36
-
37
- .back-button-text {
38
- font-size: 11px;
39
- line-height: 11px;
40
- color: #3886f7;
41
- }
42
-
43
- smart-camera-web {
44
- margin-left: auto;
45
- margin-right: auto;
46
- max-width: 40ch;
47
- padding: 1rem;
48
- width: auto;
49
- }
50
- </style>
51
- </head>
52
-
53
- <body>
54
- <smart-camera-web capture-id="back" disable-image-tests show-navigation>
55
- </smart-camera-web>
56
-
57
- <script src="./js/components/smart-camera-web/src/SmartCameraWeb.js"></script>
58
- <script>
59
- const app = document.querySelector('smart-camera-web');
60
- app.addEventListener('smart-camera-web.publish', async (e) => {
61
- console.log(e.detail);
62
- });
63
- app.addEventListener('smart-camera-web.cancelled', async (e) => {
64
- location.href = '/back_pressed';
65
- });
66
-
67
- app.addEventListener('smart-camera-web.close', async (e) => {
68
- location.href = '/closed';
69
- });
70
- </script>
71
- </body>
72
- </html>
@@ -1,36 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1" />
5
- <style>
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- body {
13
- max-width: 100%;
14
- min-height: 100%;
15
- }
16
-
17
- smart-camera-web {
18
- margin-left: auto;
19
- margin-right: auto;
20
- max-width: 40ch;
21
- padding: 1rem;
22
- width: auto;
23
- }
24
- </style>
25
- </head>
26
-
27
- <body>
28
- <smart-camera-web></smart-camera-web>
29
-
30
- <script src="./js/components/smart-camera-web/src/SmartCameraWeb.js"></script>
31
- <script>
32
- const app = document.querySelector('smart-camera-web');
33
- app.addEventListener('smart-camera-web.published', async (e) => {});
34
- </script>
35
- </body>
36
- </html>
@@ -1,42 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1" />
5
- <style>
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- body {
13
- max-width: 100%;
14
- min-height: 100%;
15
- }
16
-
17
- smart-camera-web {
18
- margin-left: auto;
19
- margin-right: auto;
20
- max-width: 40ch;
21
- padding: 1rem;
22
- width: auto;
23
- }
24
- </style>
25
- </head>
26
-
27
- <body>
28
- <smart-camera-web
29
- capture-id
30
- disable-image-tests
31
- theme-color="#001093"
32
- ></smart-camera-web>
33
-
34
- <script src="./js/components/smart-camera-web/src/SmartCameraWeb.js"></script>
35
- <script>
36
- const app = document.querySelector('smart-camera-web');
37
- app.addEventListener('smart-camera-web.published', async (e) => {
38
- console.log(e.detail);
39
- });
40
- </script>
41
- </body>
42
- </html>
@@ -1,38 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1" />
5
- <style>
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- body {
13
- max-width: 100%;
14
- min-height: 100%;
15
- }
16
-
17
- smart-camera-web {
18
- margin-left: auto;
19
- margin-right: auto;
20
- max-width: 40ch;
21
- padding: 1rem;
22
- width: auto;
23
- }
24
- </style>
25
- </head>
26
-
27
- <body>
28
- <smart-camera-web disable-image-tests hide-instructions></smart-camera-web>
29
-
30
- <script src="./js/components/smart-camera-web/src/SmartCameraWeb.js"></script>
31
- <script>
32
- const app = document.querySelector('smart-camera-web');
33
- app.addEventListener('imagesComputed', async (e) => {
34
- console.log(e.detail);
35
- });
36
- </script>
37
- </body>
38
- </html>
@@ -1,38 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1" />
5
- <style>
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- body {
13
- max-width: 100%;
14
- min-height: 100%;
15
- }
16
-
17
- smart-camera-web {
18
- margin-left: auto;
19
- margin-right: auto;
20
- max-width: 40ch;
21
- padding: 1rem;
22
- width: auto;
23
- }
24
- </style>
25
- </head>
26
-
27
- <body>
28
- <smart-camera-web disable-image-tests></smart-camera-web>
29
-
30
- <script src="./js/components/smart-camera-web/src/SmartCameraWeb.js"></script>
31
- <script>
32
- const app = document.querySelector('smart-camera-web');
33
- app.addEventListener('smart-camera-web.published', async (e) => {
34
- console.log(e.detail);
35
- });
36
- </script>
37
- </body>
38
- </html>
@@ -1,144 +0,0 @@
1
- // ***********************************************
2
- // This example commands.js shows you how to
3
- // create various custom commands and overwrite
4
- // existing commands.
5
- //
6
- // For more comprehensive examples of custom
7
- // commands please read more here:
8
- // https://on.cypress.io/custom-commands
9
- // ***********************************************
10
- //
11
- //
12
- // -- This is a parent command --
13
- // Cypress.Commands.add('login', (email, password) => { ... })
14
- //
15
- //
16
- // -- This is a child command --
17
- // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
18
- //
19
- //
20
- // -- This is a dual command --
21
- // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
22
- //
23
- //
24
- // -- This will overwrite an existing command --
25
- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
26
- Cypress.Commands.add('exitScreens', () => {
27
- cy.location('pathname').should('eq', '/closed');
28
- cy.get('smart-camera-web').should('not.exist');
29
- });
30
-
31
- Cypress.Commands.add('navigateFaceCaptureScreens', () => {
32
- cy.clock();
33
- cy.get('smart-camera-web')
34
- .shadow()
35
- .find('selfie-capture-instructions')
36
- .shadow()
37
- .find('#allow')
38
- .click();
39
-
40
- cy.get('smart-camera-web')
41
- .shadow()
42
- .find('selfie-capture-instructions')
43
- .should('not.be.visible');
44
-
45
- cy.get('smart-camera-web')
46
- .shadow()
47
- .find('selfie-capture')
48
- .should('be.visible');
49
- cy.get('smart-camera-web')
50
- .shadow()
51
- .find('selfie-capture')
52
- .shadow()
53
- .should('contain.text', 'Take a Selfie');
54
- cy.get('smart-camera-web')
55
- .shadow()
56
- .find('selfie-capture')
57
- .shadow()
58
- .find('#start-image-capture')
59
- .click();
60
-
61
- cy.tick(8000);
62
-
63
- cy.get('smart-camera-web')
64
- .shadow()
65
- .find('selfie-capture')
66
- .shadow()
67
- .should('not.be.visible');
68
-
69
- cy.get('smart-camera-web')
70
- .shadow()
71
- .find('selfie-capture-review')
72
- .should('be.visible');
73
-
74
- cy.get('smart-camera-web')
75
- .shadow()
76
- .find('selfie-capture-review')
77
- .shadow()
78
- .find('#select-id-image')
79
- .click();
80
-
81
- cy.get('smart-camera-web')
82
- .shadow()
83
- .find('selfie-capture-review')
84
- .shadow()
85
- .should('not.be.visible');
86
- });
87
-
88
- Cypress.Commands.add('navigateDocumentFrontCaptureWithInstructions', () => {
89
- cy.get('smart-camera-web')
90
- .shadow()
91
- .find('document-capture-instructions')
92
- .should('be.visible');
93
-
94
- cy.get('smart-camera-web')
95
- .shadow()
96
- .find('document-capture-instructions#document-capture-instructions-front')
97
- .shadow()
98
- .find('#take-photo')
99
- .click();
100
-
101
- cy.get('smart-camera-web')
102
- .shadow()
103
- .find('document-capture-instructions#document-capture-instructions-front')
104
- .should('not.be.visible');
105
-
106
- cy.get('smart-camera-web')
107
- .shadow()
108
- .find('document-capture#document-capture-front')
109
- .should('be.visible');
110
-
111
- cy.get('smart-camera-web')
112
- .shadow()
113
- .find('document-capture#document-capture-front')
114
- .shadow()
115
- .find('#capture-id-image')
116
- .click();
117
-
118
- cy.get('smart-camera-web')
119
- .shadow()
120
- .find('document-capture#document-capture-front')
121
- .should('not.be.visible');
122
-
123
- cy.get('smart-camera-web')
124
- .shadow()
125
- .find('document-capture-review#front-of-document-capture-review')
126
- .should('be.visible');
127
-
128
- cy.get('smart-camera-web')
129
- .shadow()
130
- .find('document-capture-review#front-of-document-capture-review')
131
- .shadow()
132
- .find('#select-id-image')
133
- .click();
134
-
135
- cy.get('smart-camera-web')
136
- .shadow()
137
- .find('document-capture-review#front-of-document-capture-review')
138
- .should('not.be.visible');
139
-
140
- cy.get('smart-camera-web')
141
- .shadow()
142
- .find('document-capture-instructions#document-capture-instructions-back')
143
- .should('be.visible');
144
- });
@@ -1,20 +0,0 @@
1
- // ***********************************************************
2
- // This example support/e2e.js is processed and
3
- // loaded automatically before your test files.
4
- //
5
- // This is a great place to put global configuration and
6
- // behavior that modifies Cypress.
7
- //
8
- // You can change the location of this file or turn off
9
- // automatically serving support files with the
10
- // 'supportFile' configuration option.
11
- //
12
- // You can read more here:
13
- // https://on.cypress.io/configuration
14
- // ***********************************************************
15
-
16
- // Import commands.js using ES2015 syntax:
17
- import './commands';
18
-
19
- // Alternatively you can use CommonJS syntax:
20
- // require('./commands')
package/cypress.config.js DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from 'cypress';
2
-
3
- export default defineConfig({
4
- e2e: {
5
- baseUrl: 'http://localhost:8000',
6
- experimentalStudio: true,
7
- setupNodeEvents() {
8
- // implement node event listeners here
9
- },
10
- },
11
- });
package/esbuild.js DELETED
@@ -1,119 +0,0 @@
1
- import esbuild from 'esbuild';
2
- import fs from 'fs';
3
- import path from 'path';
4
- import { createRequire } from 'node:module';
5
-
6
- // Import the package.json file to get the version number by using the createRequire function
7
- const require = createRequire(import.meta.url);
8
- const { exports } = require('./package.json');
9
-
10
- // Get the paths from the exports field
11
- const exportPaths = Object.values(exports).map((filePath) =>
12
- path.join(process.cwd(), filePath),
13
- );
14
-
15
- /**
16
- * Ensures a directory exists. If not, creates it.
17
- * @param {string} dirPath - The path to the directory.
18
- */
19
- const ensureDirSync = (dirPath) => {
20
- if (!fs.existsSync(dirPath)) {
21
- fs.mkdirSync(dirPath, { recursive: true });
22
- }
23
- };
24
-
25
- /**
26
- * Recursively copies files from source to destination with a filter option.
27
- * @param {string} srcDir - The source directory.
28
- * @param {string} destDir - The destination directory.
29
- * @param {Function} filterFn - A function to filter which files to copy.
30
- */
31
- const copySync = (srcDir, destDir, filterFn) => {
32
- const entries = fs.readdirSync(srcDir, { withFileTypes: true });
33
-
34
- entries.forEach((entry) => {
35
- const srcPath = path.join(srcDir, entry.name);
36
- const destPath = path.join(destDir, entry.name);
37
-
38
- if (entry.isDirectory()) {
39
- ensureDirSync(destPath);
40
- copySync(srcPath, destPath, filterFn);
41
- } else if (!filterFn || filterFn(entry.name)) {
42
- fs.copyFileSync(srcPath, destPath);
43
- }
44
- });
45
- };
46
-
47
- /**
48
- * Copies specific files from source to destination based on a pattern.
49
- * @param {string} srcDir - The source directory.
50
- * @param {string} pattern - A wildcard pattern to filter files. e.g., '*.html'
51
- * @param {string} destDir - The destination directory.
52
- */
53
- const copyFiles = (srcDir, pattern, destDir) => {
54
- const files = fs
55
- .readdirSync(srcDir)
56
- .filter((file) => file.match(new RegExp(pattern.replace('*', '.*'))));
57
- files.forEach((file) => {
58
- const srcPath = path.join(srcDir, file);
59
- const destPath = path.join(destDir, file);
60
- fs.copyFileSync(srcPath, destPath);
61
- });
62
- };
63
-
64
- /**
65
- * Performs preparatory tasks for production mode.
66
- * Clears the 'dist' directory, ensures it exists,
67
- * and copies necessary files.
68
- */
69
- const prebuildDist = () => {
70
- if (fs.existsSync('dist')) {
71
- fs.rmSync('build', { recursive: true });
72
- }
73
- ensureDirSync('dist');
74
- copySync('src', 'dist', (file) => !file.endsWith('.js'));
75
- };
76
-
77
- /**
78
- * Performs preparatory tasks for development mode.
79
- * Clears the 'build' directory, ensures it exists,
80
- * copies necessary files, and copies HTML pages from cypress.
81
- */
82
- const prebuild = () => {
83
- if (fs.existsSync('build')) {
84
- fs.rmSync('build', { recursive: true });
85
- }
86
- ensureDirSync('build');
87
- // copySync('dist', 'cypress/pages/instrumentation', (file) => !file.endsWith('.js'));
88
- copyFiles('cypress/pages', '*.html', 'build');
89
- };
90
-
91
- if (process.env.NODE_ENV === 'development') {
92
- prebuild();
93
- } else {
94
- prebuildDist();
95
- }
96
-
97
- const devOptions = {
98
- bundle: true,
99
- minify: process.env.MINIFY === 'true',
100
- };
101
-
102
- const prodOptions = {
103
- bundle: true,
104
- minify: true,
105
- };
106
-
107
- if (process.env.NODE_ENV === 'development') {
108
- esbuild.build({
109
- ...devOptions,
110
- entryPoints: exportPaths,
111
- outdir: 'build/js',
112
- });
113
- } else {
114
- esbuild.build({
115
- ...prodOptions,
116
- entryPoints: exportPaths,
117
- outdir: 'dist/js',
118
- });
119
- }
@@ -1,34 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
-
4
- const componentsDir = './components';
5
- const outputFilePath = './index.js';
6
-
7
- const getDirectories = (source) =>
8
- fs
9
- .readdirSync(source, { withFileTypes: true })
10
- .filter((dirent) => dirent.isDirectory())
11
- .map((dirent) => dirent.name);
12
-
13
- const generateExports = () => {
14
- const componentDirs = getDirectories(componentsDir);
15
- let exportStatements = '';
16
-
17
- componentDirs.forEach((dir) => {
18
- const srcPath = path.join(componentsDir, dir, 'src');
19
- if (fs.existsSync(srcPath)) {
20
- const files = fs.readdirSync(srcPath);
21
- files.forEach((file) => {
22
- const fileName = path.parse(file).name;
23
- const exportName = fileName.charAt(0).toUpperCase() + fileName.slice(1);
24
- exportStatements += `import ${exportName} from './components/${dir}/src/${fileName}';\n`;
25
- exportStatements += `export { ${exportName} };\n`;
26
- });
27
- }
28
- });
29
-
30
- fs.writeFileSync(outputFilePath, exportStatements);
31
- };
32
-
33
- generateExports();
34
- export default generateExports;
File without changes
File without changes