generator-bitloops 0.1.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.
- package/LICENSE +21 -0
- package/README.md +9 -0
- package/app/index.js +20 -0
- package/package.json +28 -0
- package/setup/index.js +209 -0
- package/setup/templates/cypress.config.ts +8 -0
- package/setup/templates/globals.css +137 -0
- package/setup/templates/meyer.css +133 -0
- package/setup/templates/next.app.layout.tsx +19 -0
- package/setup/templates/next.app.page.tsx +7 -0
- package/setup/templates/next.config.js +6 -0
- package/setup/templates/storybook.preview.ts +15 -0
- package/setup/templates/tailwind.config.ts +9 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Bitloops
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# generator-bitloops
|
|
2
|
+
|
|
3
|
+
The Yeoman Bitloops Generator is used by the Bitloops Platform to setup your Bitloops projects.
|
|
4
|
+
|
|
5
|
+
Nonetheless, you can use it independently to setup your next next.js project with TypeScript, Tailwind, Storybook and Cypress all ready to go!
|
|
6
|
+
|
|
7
|
+
## How to run it
|
|
8
|
+
|
|
9
|
+
`npx yo bitloops:setup --project="Your Project Name" --nextjs --typescript --tailwind --storybook --cypress`
|
package/app/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Generator from 'yeoman-generator';
|
|
2
|
+
|
|
3
|
+
export default class extends Generator {
|
|
4
|
+
constructor(args, opts) {
|
|
5
|
+
// Calling the super constructor is important so our generator is correctly set up
|
|
6
|
+
super(args, opts);
|
|
7
|
+
|
|
8
|
+
// Next, add your custom code
|
|
9
|
+
this.option('next'); // This method adds support for a `--next` flag
|
|
10
|
+
this.option('typescript'); // This method adds support for a `--typescript` flag
|
|
11
|
+
this.option('tailwind'); // This method adds support for a `--tailwind` flag
|
|
12
|
+
this.option('storybook'); // This method adds support for a `--storybook` flag
|
|
13
|
+
this.option('cypress'); // This method adds support for a `--cypress` flag
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message() {
|
|
17
|
+
this.log('You need to select a sub-method. E.g. `npx yo bitloops:setup`');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "generator-bitloops",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Bitloops Yeoman generator",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Bitloops S.A.",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/bitloops/generator-bitloops"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"files": [
|
|
13
|
+
"app",
|
|
14
|
+
"setup"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"bitloops",
|
|
18
|
+
"nextjs",
|
|
19
|
+
"tailwindcss",
|
|
20
|
+
"typescript",
|
|
21
|
+
"storybook",
|
|
22
|
+
"cypress",
|
|
23
|
+
"yeoman-generator"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"yeoman-generator": "^7.3.3"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/setup/index.js
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { exec } from 'child_process';
|
|
3
|
+
import Generator from 'yeoman-generator';
|
|
4
|
+
|
|
5
|
+
function toKebabCase(str) {
|
|
6
|
+
return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase().replace(/\s+/g, '-');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default class extends Generator {
|
|
10
|
+
constructor(args, opts) {
|
|
11
|
+
super(args, opts);
|
|
12
|
+
|
|
13
|
+
// Define options
|
|
14
|
+
this.option('project', {
|
|
15
|
+
type: String,
|
|
16
|
+
description: 'Project name (used to create the project folder)',
|
|
17
|
+
required: true,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
this.option('nextjs', {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
description: 'Install Next.js',
|
|
23
|
+
required: true, // Make Next.js mandatory
|
|
24
|
+
default: false,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
this.option('typescript', {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
description: 'Add TypeScript support',
|
|
30
|
+
default: false,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
this.option('tailwind', {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
description: 'Add Tailwind CSS',
|
|
36
|
+
default: false,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
this.option('storybook', {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
description: 'Add Storybook',
|
|
42
|
+
default: false,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
this.option('cypress', {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
description: 'Add Cypress for testing',
|
|
48
|
+
default: false,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
this.installNextJS = async function() {
|
|
52
|
+
// Clone Next.js template with Tailwind if specified, using the project name
|
|
53
|
+
const createNextAppCommand = ['-y', 'create-next-app@latest'];
|
|
54
|
+
createNextAppCommand.push(toKebabCase(this.options.project)); // Use the project name for the directory
|
|
55
|
+
createNextAppCommand.push('--app');
|
|
56
|
+
createNextAppCommand.push('--empty');
|
|
57
|
+
createNextAppCommand.push('--src-dir');
|
|
58
|
+
if (this.options.storybook) {
|
|
59
|
+
// Disable TurboPack for Storybook compatibility given the Next.js downgrade that will follow
|
|
60
|
+
createNextAppCommand.push('--no-turbopack');
|
|
61
|
+
} else {
|
|
62
|
+
createNextAppCommand.push('--turbopack');
|
|
63
|
+
}
|
|
64
|
+
createNextAppCommand.push('--import-alias');
|
|
65
|
+
createNextAppCommand.push('@/*');
|
|
66
|
+
createNextAppCommand.push('--use-npm');
|
|
67
|
+
createNextAppCommand.push('--eslint');
|
|
68
|
+
|
|
69
|
+
if (this.options.typescript) {
|
|
70
|
+
createNextAppCommand.push('--typescript'); // This will avoid the TypeScript prompt
|
|
71
|
+
} else {
|
|
72
|
+
createNextAppCommand.push('--js');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (this.options.tailwind) {
|
|
76
|
+
createNextAppCommand.push('--tailwind');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
this.log("Installing Next.js...");
|
|
80
|
+
await new Promise((resolve, error) => {exec(`npx ${createNextAppCommand.join(' ')} && cd ${toKebabCase(this.options.project)} && npm install next@14 react@18 react-dom@18`).on('exit', (code) => {
|
|
81
|
+
this.destinationRoot(this.destinationPath(toKebabCase(this.options.project)));
|
|
82
|
+
resolve();
|
|
83
|
+
});});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
this.installStorybook = function() {
|
|
87
|
+
// Conditionally initialize Storybook
|
|
88
|
+
if (this.options.storybook) {
|
|
89
|
+
this.log("Adding Storybook...");
|
|
90
|
+
this.spawnCommandSync('npx', ['-y', 'storybook@latest', 'init', '--no-dev']);
|
|
91
|
+
if (this.options.tailwind) {
|
|
92
|
+
this.spawnCommandSync('npx', ['storybook@latest', 'add', '@storybook/addon-styling-webpack']);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
this.installCypress = function() {
|
|
98
|
+
// Conditionally add Cypress
|
|
99
|
+
if (this.options.cypress) {
|
|
100
|
+
this.log("Adding Cypress...");
|
|
101
|
+
this.spawnCommandSync('npm', ['install', '--save-dev', 'cypress']);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
this.patchFiles = async function() {
|
|
106
|
+
// await new Promise((resolve, reject) => this.fs.commit((err) => (err ? reject(err) : resolve())));
|
|
107
|
+
if (this.options.storybook) {
|
|
108
|
+
if (this.options.typescript) {
|
|
109
|
+
this.log('Replace Next.js\' TypeScript configuration file with JS...');
|
|
110
|
+
// Remove TypeScript configuration files given they require Next.js 15
|
|
111
|
+
fs.unlinkSync(this.destinationPath('next.config.ts'));
|
|
112
|
+
this.fs.copyTpl(
|
|
113
|
+
this.templatePath('next.config.js'),
|
|
114
|
+
this.destinationPath('next.config.js'),
|
|
115
|
+
);
|
|
116
|
+
this.log(`Deleted next.config.ts and created next.config.js instead`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Conditionally initialize Storybook
|
|
121
|
+
if (this.options.storybook) {
|
|
122
|
+
this.log("Making Storybook changes...");
|
|
123
|
+
if (this.options.tailwind) {
|
|
124
|
+
fs.unlinkSync(this.destinationPath('.storybook/preview.ts'));
|
|
125
|
+
this.log('Setting up Tailwind CSS with Storybook...');
|
|
126
|
+
this.fs.copyTpl(
|
|
127
|
+
this.templatePath('storybook.preview.ts'),
|
|
128
|
+
this.destinationPath('.storybook/preview.ts'),
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
this.log('Removing default Storybook stories...');
|
|
132
|
+
try {
|
|
133
|
+
fs.rmSync(this.destinationPath('src/stories'), { recursive: true, force: true });
|
|
134
|
+
console.log('Sample stories directory deleted successfully!');
|
|
135
|
+
} catch (err) {
|
|
136
|
+
console.error('Error deleting sample stories directory:', err);
|
|
137
|
+
}
|
|
138
|
+
fs.unlinkSync(this.destinationPath('tailwind.config.ts'));
|
|
139
|
+
this.fs.copyTpl(
|
|
140
|
+
this.templatePath('tailwind.config.ts'),
|
|
141
|
+
this.destinationPath('tailwind.config.ts'),
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (this.options.cypress) {
|
|
146
|
+
this.log("Adding Cypress config...");
|
|
147
|
+
this.fs.copyTpl(
|
|
148
|
+
this.templatePath('cypress.config.ts'),
|
|
149
|
+
this.destinationPath('cypress.config.ts'),
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
fs.unlinkSync(this.destinationPath('src/app/page.tsx'));
|
|
154
|
+
this.fs.copyTpl(
|
|
155
|
+
this.templatePath('next.app.page.tsx'),
|
|
156
|
+
this.destinationPath('src/app/page.tsx'),
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
fs.unlinkSync(this.destinationPath('src/app/layout.tsx'));
|
|
160
|
+
this.fs.copyTpl(
|
|
161
|
+
this.templatePath('next.app.layout.tsx'),
|
|
162
|
+
this.destinationPath('src/app/layout.tsx'),
|
|
163
|
+
{ projectName: this.options.project },
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
this.log('Adding Meyer reset in global.css...');
|
|
167
|
+
fs.unlinkSync(this.destinationPath('src/app/globals.css'));
|
|
168
|
+
this.fs.copyTpl(
|
|
169
|
+
this.templatePath('globals.css'),
|
|
170
|
+
this.destinationPath('src/app/globals.css'),
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
initializing() {
|
|
176
|
+
// Check if the project name and --nextjs flag are provided
|
|
177
|
+
if (!this.options.project) {
|
|
178
|
+
this.log("Error: --project option is required to specify the project name.");
|
|
179
|
+
process.exit(1);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (!this.options.nextjs) {
|
|
183
|
+
this.log("Error: --nextjs option is currently required to scaffold a project.");
|
|
184
|
+
process.exit(1);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
this.log(`Initializing project ${toKebabCase(this.options.project)} with the selected options...`);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
async main() {
|
|
191
|
+
await this.installNextJS();
|
|
192
|
+
this.log('Installing Storybook');
|
|
193
|
+
this.installStorybook();
|
|
194
|
+
this.log('Installing Cypress');
|
|
195
|
+
this.installCypress();
|
|
196
|
+
this.log('Patching files');
|
|
197
|
+
await this.patchFiles();
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
end() {
|
|
201
|
+
this.log(`Your Bitloops project '${toKebabCase(this.options.project)}' setup is complete! 🎉🎉🎉`);
|
|
202
|
+
this.log('');
|
|
203
|
+
this.log('Use the following commands to start:');
|
|
204
|
+
this.log("- `npm run dev` to start the Next.js app.");
|
|
205
|
+
if (this.options.storybook) this.log("- `npm run storybook` to start Storybook.");
|
|
206
|
+
if (this.options.cypress) this.log("- `npx cypress open --e2e --browser chrome` to open Cypress.");
|
|
207
|
+
if (this.options.cypress) this.log("- `npx cypress run --e2e --browser chrome` to run Cypress on the terminal.");
|
|
208
|
+
}
|
|
209
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* Tailwind CSS */
|
|
2
|
+
@tailwind base;
|
|
3
|
+
@tailwind components;
|
|
4
|
+
@tailwind utilities;
|
|
5
|
+
|
|
6
|
+
/* MEYER */
|
|
7
|
+
|
|
8
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
|
9
|
+
v2.0 | 20110126
|
|
10
|
+
License: none (public domain)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
html,
|
|
14
|
+
body,
|
|
15
|
+
div,
|
|
16
|
+
span,
|
|
17
|
+
applet,
|
|
18
|
+
object,
|
|
19
|
+
iframe,
|
|
20
|
+
h1,
|
|
21
|
+
h2,
|
|
22
|
+
h3,
|
|
23
|
+
h4,
|
|
24
|
+
h5,
|
|
25
|
+
h6,
|
|
26
|
+
p,
|
|
27
|
+
blockquote,
|
|
28
|
+
pre,
|
|
29
|
+
a,
|
|
30
|
+
abbr,
|
|
31
|
+
acronym,
|
|
32
|
+
address,
|
|
33
|
+
big,
|
|
34
|
+
cite,
|
|
35
|
+
code,
|
|
36
|
+
del,
|
|
37
|
+
dfn,
|
|
38
|
+
em,
|
|
39
|
+
img,
|
|
40
|
+
ins,
|
|
41
|
+
kbd,
|
|
42
|
+
q,
|
|
43
|
+
s,
|
|
44
|
+
samp,
|
|
45
|
+
small,
|
|
46
|
+
strike,
|
|
47
|
+
strong,
|
|
48
|
+
sub,
|
|
49
|
+
sup,
|
|
50
|
+
tt,
|
|
51
|
+
var,
|
|
52
|
+
b,
|
|
53
|
+
u,
|
|
54
|
+
i,
|
|
55
|
+
center,
|
|
56
|
+
dl,
|
|
57
|
+
dt,
|
|
58
|
+
dd,
|
|
59
|
+
ol,
|
|
60
|
+
ul,
|
|
61
|
+
li,
|
|
62
|
+
fieldset,
|
|
63
|
+
form,
|
|
64
|
+
label,
|
|
65
|
+
legend,
|
|
66
|
+
table,
|
|
67
|
+
caption,
|
|
68
|
+
tbody,
|
|
69
|
+
tfoot,
|
|
70
|
+
thead,
|
|
71
|
+
tr,
|
|
72
|
+
th,
|
|
73
|
+
td,
|
|
74
|
+
article,
|
|
75
|
+
aside,
|
|
76
|
+
canvas,
|
|
77
|
+
details,
|
|
78
|
+
embed,
|
|
79
|
+
figure,
|
|
80
|
+
figcaption,
|
|
81
|
+
footer,
|
|
82
|
+
header,
|
|
83
|
+
hgroup,
|
|
84
|
+
menu,
|
|
85
|
+
nav,
|
|
86
|
+
output,
|
|
87
|
+
ruby,
|
|
88
|
+
section,
|
|
89
|
+
summary,
|
|
90
|
+
time,
|
|
91
|
+
mark,
|
|
92
|
+
audio,
|
|
93
|
+
video {
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: 0;
|
|
96
|
+
border-width: 0px;
|
|
97
|
+
font-size: 100%;
|
|
98
|
+
font: inherit;
|
|
99
|
+
vertical-align: baseline;
|
|
100
|
+
}
|
|
101
|
+
/* HTML5 display-role reset for older browsers */
|
|
102
|
+
article,
|
|
103
|
+
aside,
|
|
104
|
+
details,
|
|
105
|
+
figcaption,
|
|
106
|
+
figure,
|
|
107
|
+
footer,
|
|
108
|
+
header,
|
|
109
|
+
hgroup,
|
|
110
|
+
menu,
|
|
111
|
+
nav,
|
|
112
|
+
section {
|
|
113
|
+
display: block;
|
|
114
|
+
}
|
|
115
|
+
body {
|
|
116
|
+
line-height: 1;
|
|
117
|
+
}
|
|
118
|
+
ol,
|
|
119
|
+
ul {
|
|
120
|
+
list-style: none;
|
|
121
|
+
}
|
|
122
|
+
blockquote,
|
|
123
|
+
q {
|
|
124
|
+
quotes: none;
|
|
125
|
+
}
|
|
126
|
+
blockquote:before,
|
|
127
|
+
blockquote:after,
|
|
128
|
+
q:before,
|
|
129
|
+
q:after {
|
|
130
|
+
content: '';
|
|
131
|
+
content: none;
|
|
132
|
+
}
|
|
133
|
+
table {
|
|
134
|
+
border-collapse: collapse;
|
|
135
|
+
border-spacing: 0;
|
|
136
|
+
}
|
|
137
|
+
/** END MEYER */
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
|
|
2
|
+
/* MEYER */
|
|
3
|
+
|
|
4
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
|
5
|
+
v2.0 | 20110126
|
|
6
|
+
License: none (public domain)
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
html,
|
|
10
|
+
body,
|
|
11
|
+
div,
|
|
12
|
+
span,
|
|
13
|
+
applet,
|
|
14
|
+
object,
|
|
15
|
+
iframe,
|
|
16
|
+
h1,
|
|
17
|
+
h2,
|
|
18
|
+
h3,
|
|
19
|
+
h4,
|
|
20
|
+
h5,
|
|
21
|
+
h6,
|
|
22
|
+
p,
|
|
23
|
+
blockquote,
|
|
24
|
+
pre,
|
|
25
|
+
a,
|
|
26
|
+
abbr,
|
|
27
|
+
acronym,
|
|
28
|
+
address,
|
|
29
|
+
big,
|
|
30
|
+
cite,
|
|
31
|
+
code,
|
|
32
|
+
del,
|
|
33
|
+
dfn,
|
|
34
|
+
em,
|
|
35
|
+
img,
|
|
36
|
+
ins,
|
|
37
|
+
kbd,
|
|
38
|
+
q,
|
|
39
|
+
s,
|
|
40
|
+
samp,
|
|
41
|
+
small,
|
|
42
|
+
strike,
|
|
43
|
+
strong,
|
|
44
|
+
sub,
|
|
45
|
+
sup,
|
|
46
|
+
tt,
|
|
47
|
+
var,
|
|
48
|
+
b,
|
|
49
|
+
u,
|
|
50
|
+
i,
|
|
51
|
+
center,
|
|
52
|
+
dl,
|
|
53
|
+
dt,
|
|
54
|
+
dd,
|
|
55
|
+
ol,
|
|
56
|
+
ul,
|
|
57
|
+
li,
|
|
58
|
+
fieldset,
|
|
59
|
+
form,
|
|
60
|
+
label,
|
|
61
|
+
legend,
|
|
62
|
+
table,
|
|
63
|
+
caption,
|
|
64
|
+
tbody,
|
|
65
|
+
tfoot,
|
|
66
|
+
thead,
|
|
67
|
+
tr,
|
|
68
|
+
th,
|
|
69
|
+
td,
|
|
70
|
+
article,
|
|
71
|
+
aside,
|
|
72
|
+
canvas,
|
|
73
|
+
details,
|
|
74
|
+
embed,
|
|
75
|
+
figure,
|
|
76
|
+
figcaption,
|
|
77
|
+
footer,
|
|
78
|
+
header,
|
|
79
|
+
hgroup,
|
|
80
|
+
menu,
|
|
81
|
+
nav,
|
|
82
|
+
output,
|
|
83
|
+
ruby,
|
|
84
|
+
section,
|
|
85
|
+
summary,
|
|
86
|
+
time,
|
|
87
|
+
mark,
|
|
88
|
+
audio,
|
|
89
|
+
video {
|
|
90
|
+
margin: 0;
|
|
91
|
+
padding: 0;
|
|
92
|
+
border-width: 0px;
|
|
93
|
+
font-size: 100%;
|
|
94
|
+
font: inherit;
|
|
95
|
+
vertical-align: baseline;
|
|
96
|
+
}
|
|
97
|
+
/* HTML5 display-role reset for older browsers */
|
|
98
|
+
article,
|
|
99
|
+
aside,
|
|
100
|
+
details,
|
|
101
|
+
figcaption,
|
|
102
|
+
figure,
|
|
103
|
+
footer,
|
|
104
|
+
header,
|
|
105
|
+
hgroup,
|
|
106
|
+
menu,
|
|
107
|
+
nav,
|
|
108
|
+
section {
|
|
109
|
+
display: block;
|
|
110
|
+
}
|
|
111
|
+
body {
|
|
112
|
+
line-height: 1;
|
|
113
|
+
}
|
|
114
|
+
ol,
|
|
115
|
+
ul {
|
|
116
|
+
list-style: none;
|
|
117
|
+
}
|
|
118
|
+
blockquote,
|
|
119
|
+
q {
|
|
120
|
+
quotes: none;
|
|
121
|
+
}
|
|
122
|
+
blockquote:before,
|
|
123
|
+
blockquote:after,
|
|
124
|
+
q:before,
|
|
125
|
+
q:after {
|
|
126
|
+
content: '';
|
|
127
|
+
content: none;
|
|
128
|
+
}
|
|
129
|
+
table {
|
|
130
|
+
border-collapse: collapse;
|
|
131
|
+
border-spacing: 0;
|
|
132
|
+
}
|
|
133
|
+
/** END MEYER */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import "./globals.css";
|
|
3
|
+
|
|
4
|
+
export const metadata: Metadata = {
|
|
5
|
+
title: "<%= projectName %>",
|
|
6
|
+
description: "Generated by Bitloops",
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function RootLayout({
|
|
10
|
+
children,
|
|
11
|
+
}: Readonly<{
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}>) {
|
|
14
|
+
return (
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<body>{children}</body>
|
|
17
|
+
</html>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Preview } from "@storybook/react";
|
|
2
|
+
import "../src/app/globals.css";
|
|
3
|
+
|
|
4
|
+
const preview: Preview = {
|
|
5
|
+
parameters: {
|
|
6
|
+
controls: {
|
|
7
|
+
matchers: {
|
|
8
|
+
color: /(background|color)$/i,
|
|
9
|
+
date: /Date$/i,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default preview;
|