@akinon/projectzero 1.44.0 ā 1.45.0-rc.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/CHANGELOG.md +41 -0
- package/README.md +3 -2
- package/app-template/.lintstagedrc.js +5 -4
- package/app-template/CHANGELOG.md +953 -20
- package/app-template/docs/basic-setup.md +1 -1
- package/app-template/docs/plugins.md +7 -7
- package/app-template/package-lock.json +29303 -0
- package/app-template/package.json +23 -21
- package/app-template/public/locales/en/account.json +4 -4
- package/app-template/public/locales/tr/account.json +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/[...prettyurl]/page.tsx +8 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/address/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/coupons/page.tsx +4 -4
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/profile/page.tsx +1 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/page.tsx +5 -2
- package/app-template/src/app/[commerce]/[locale]/[currency]/orders/completed/[token]/page.tsx +12 -8
- package/app-template/src/components/checkbox.tsx +2 -2
- package/app-template/src/components/input.tsx +19 -7
- package/app-template/src/components/price.tsx +9 -4
- package/app-template/src/redux/reducers/category.ts +7 -1
- package/app-template/src/settings.js +6 -1
- package/app-template/src/views/account/address-card.tsx +2 -2
- package/app-template/src/views/account/address-form.tsx +22 -7
- package/app-template/src/views/account/contact-form.tsx +23 -6
- package/app-template/src/views/account/favorite-item.tsx +2 -2
- package/app-template/src/views/account/favourite-products/favourite-products-list.tsx +5 -1
- package/app-template/src/views/breadcrumb.tsx +4 -1
- package/app-template/src/views/category/category-info.tsx +31 -17
- package/app-template/src/views/category/filters/filter-item.tsx +131 -0
- package/app-template/src/views/category/filters/index.tsx +5 -105
- package/app-template/src/views/category/layout.tsx +5 -3
- package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +33 -4
- package/app-template/src/views/checkout/steps/payment/options/redirection.tsx +43 -37
- package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +19 -3
- package/app-template/src/views/checkout/steps/shipping/address-box.tsx +2 -2
- package/app-template/src/views/checkout/steps/shipping/addresses.tsx +1 -1
- package/app-template/src/views/checkout/steps/shipping/shipping-options.tsx +230 -37
- package/app-template/src/views/find-in-store/index.tsx +2 -3
- package/app-template/src/views/header/mobile-menu.tsx +25 -8
- package/app-template/tsconfig.json +14 -4
- package/app-template/yarn.lock +1824 -1953
- package/commands/create.ts +29 -5
- package/dist/commands/create.js +25 -2
- package/package.json +2 -2
package/commands/create.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as fs from 'fs';
|
|
|
3
3
|
import * as readline from 'readline';
|
|
4
4
|
import { slugify } from '../utils';
|
|
5
5
|
|
|
6
|
+
const { execSync } = require('child_process');
|
|
6
7
|
const loadingSpinner = require('loading-spinner');
|
|
7
8
|
|
|
8
9
|
interface Question {
|
|
@@ -139,7 +140,8 @@ export default async (): Promise<void> => {
|
|
|
139
140
|
const answers = await getAnswers();
|
|
140
141
|
const brandName =
|
|
141
142
|
answers.brandName === '.' ? path.basename(workingDir) : answers.brandName;
|
|
142
|
-
const projectDir = path.resolve(workingDir, slugify(brandName));
|
|
143
|
+
const projectDir = answers.brandName === '.' ? workingDir : path.resolve(workingDir, slugify(brandName));
|
|
144
|
+
const relativeProjectDir = answers.brandName === '.' ? '.' : slugify(brandName);
|
|
143
145
|
|
|
144
146
|
if (!fs.existsSync(projectDir)) {
|
|
145
147
|
fs.mkdirSync(projectDir, { recursive: true });
|
|
@@ -174,12 +176,34 @@ export default async (): Promise<void> => {
|
|
|
174
176
|
name: slugify(brandName)
|
|
175
177
|
});
|
|
176
178
|
|
|
179
|
+
|
|
180
|
+
console.log('\x1b[34m%s\x1b[0m', '\nš Installing packages...\n');
|
|
181
|
+
|
|
182
|
+
execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
|
|
183
|
+
|
|
177
184
|
loadingSpinner.stop();
|
|
178
185
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
186
|
+
const successMessage = `
|
|
187
|
+
⨠${brandName} project is ready at \x1b[4m${projectDir}\x1b[0m
|
|
188
|
+
|
|
189
|
+
Within the directory, the following commands are available:
|
|
190
|
+
|
|
191
|
+
\x1b[35m$ yarn dev\x1b[0m
|
|
192
|
+
\x1b[32mLaunches the development server.\x1b[0m
|
|
193
|
+
|
|
194
|
+
\x1b[35m$ yarn build\x1b[0m
|
|
195
|
+
\x1b[32mCompiles the app into static files for production.\x1b[0m
|
|
196
|
+
|
|
197
|
+
\x1b[35m$ yarn start\x1b[0m
|
|
198
|
+
\x1b[32mRuns the production server.\x1b[0m
|
|
199
|
+
`;
|
|
200
|
+
|
|
201
|
+
const getStartedMessage = answers.brandName === '.'
|
|
202
|
+
? 'To get started, you can type:\n\n \x1b[35m$ yarn dev\x1b[0m\n'
|
|
203
|
+
: `To get started, you can type:\n\n \x1b[35m$ cd ${relativeProjectDir}\x1b[0m\n \x1b[35m$ yarn dev\x1b[0m\n`;
|
|
183
204
|
|
|
205
|
+
console.log('\x1b[32m%s\x1b[0m', successMessage);
|
|
206
|
+
console.log('\x1b[36m%s\x1b[0m', getStartedMessage);
|
|
207
|
+
console.log('\x1b[33m%s\x1b[0m', 'Project setup is complete\n');
|
|
184
208
|
console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
|
|
185
209
|
};
|
package/dist/commands/create.js
CHANGED
|
@@ -39,6 +39,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
39
39
|
const fs = __importStar(require("fs"));
|
|
40
40
|
const readline = __importStar(require("readline"));
|
|
41
41
|
const utils_1 = require("../utils");
|
|
42
|
+
const { execSync } = require('child_process');
|
|
42
43
|
const loadingSpinner = require('loading-spinner');
|
|
43
44
|
const workingDir = path_1.default.resolve(process.cwd());
|
|
44
45
|
const rl = readline.createInterface({
|
|
@@ -131,7 +132,8 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
131
132
|
}
|
|
132
133
|
const answers = yield getAnswers();
|
|
133
134
|
const brandName = answers.brandName === '.' ? path_1.default.basename(workingDir) : answers.brandName;
|
|
134
|
-
const projectDir = path_1.default.resolve(workingDir, (0, utils_1.slugify)(brandName));
|
|
135
|
+
const projectDir = answers.brandName === '.' ? workingDir : path_1.default.resolve(workingDir, (0, utils_1.slugify)(brandName));
|
|
136
|
+
const relativeProjectDir = answers.brandName === '.' ? '.' : (0, utils_1.slugify)(brandName);
|
|
135
137
|
if (!fs.existsSync(projectDir)) {
|
|
136
138
|
fs.mkdirSync(projectDir, { recursive: true });
|
|
137
139
|
}
|
|
@@ -154,7 +156,28 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
154
156
|
updateFileContents(path_1.default.join(projectDir, 'package.json'), {
|
|
155
157
|
name: (0, utils_1.slugify)(brandName)
|
|
156
158
|
});
|
|
159
|
+
console.log('\x1b[34m%s\x1b[0m', '\nš Installing packages...\n');
|
|
160
|
+
execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
|
|
157
161
|
loadingSpinner.stop();
|
|
158
|
-
|
|
162
|
+
const successMessage = `
|
|
163
|
+
⨠${brandName} project is ready at \x1b[4m${projectDir}\x1b[0m
|
|
164
|
+
|
|
165
|
+
Within the directory, the following commands are available:
|
|
166
|
+
|
|
167
|
+
\x1b[35m$ yarn dev\x1b[0m
|
|
168
|
+
\x1b[32mLaunches the development server.\x1b[0m
|
|
169
|
+
|
|
170
|
+
\x1b[35m$ yarn build\x1b[0m
|
|
171
|
+
\x1b[32mCompiles the app into static files for production.\x1b[0m
|
|
172
|
+
|
|
173
|
+
\x1b[35m$ yarn start\x1b[0m
|
|
174
|
+
\x1b[32mRuns the production server.\x1b[0m
|
|
175
|
+
`;
|
|
176
|
+
const getStartedMessage = answers.brandName === '.'
|
|
177
|
+
? 'To get started, you can type:\n\n \x1b[35m$ yarn dev\x1b[0m\n'
|
|
178
|
+
: `To get started, you can type:\n\n \x1b[35m$ cd ${relativeProjectDir}\x1b[0m\n \x1b[35m$ yarn dev\x1b[0m\n`;
|
|
179
|
+
console.log('\x1b[32m%s\x1b[0m', successMessage);
|
|
180
|
+
console.log('\x1b[36m%s\x1b[0m', getStartedMessage);
|
|
181
|
+
console.log('\x1b[33m%s\x1b[0m', 'Project setup is complete\n');
|
|
159
182
|
console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
|
|
160
183
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/projectzero",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0-rc.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CLI tool to manage your Project Zero Next project",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"loading-spinner": "^1.2.1",
|
|
23
23
|
"prompt-checkbox": "2.2.0",
|
|
24
|
-
"semver": "7.
|
|
24
|
+
"semver": "7.6.2",
|
|
25
25
|
"temp": "0.9.4",
|
|
26
26
|
"yargs": "^17.6.0"
|
|
27
27
|
}
|