mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 07:56:59 +00:00
fix linting issue
This commit is contained in:
parent
41c05838e7
commit
37a5e61ca0
34
.eslintrc.js
34
.eslintrc.js
@ -19,30 +19,30 @@ module.exports = {
|
|||||||
case: 'kebabCase'
|
case: 'kebabCase'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"prettier/prettier": "warn",
|
'prettier/prettier': 'warn',
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
'@typescript-eslint/no-unused-vars': 'off',
|
||||||
"unused-imports/no-unused-imports": "error",
|
'unused-imports/no-unused-imports': 'error',
|
||||||
"no-template-curly-in-string": "error",
|
'no-template-curly-in-string': 'error',
|
||||||
"unused-imports/no-unused-vars": [
|
'unused-imports/no-unused-vars': [
|
||||||
"warn",
|
'warn',
|
||||||
{
|
{
|
||||||
"vars": "all",
|
vars: 'all',
|
||||||
"varsIgnorePattern": "^_",
|
varsIgnorePattern: '^_',
|
||||||
"args": "after-used",
|
args: 'after-used',
|
||||||
"argsIgnorePattern": "^_"
|
argsIgnorePattern: '^_'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"settings": {
|
settings: {
|
||||||
"tailwindcss": {
|
tailwindcss: {
|
||||||
"config": "./tailwind.config.js",
|
config: './tailwind.config.js',
|
||||||
"callees": ["cx"]
|
callees: ['cx']
|
||||||
},
|
},
|
||||||
"tailwindcss/classnames-order": [
|
'tailwindcss/classnames-order': [
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
"callees": ["cx"],
|
callees: ['cx'],
|
||||||
"config": "./tailwind.config.js"
|
config: './tailwind.config.js'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
68
README.md
68
README.md
@ -80,18 +80,12 @@ Once installed, you'll need to create a `SHOPIFY_STOREFRONT_ACCESS_TOKEN` enviro
|
|||||||
<summary>Expand to view detailed walkthrough</summary>
|
<summary>Expand to view detailed walkthrough</summary>
|
||||||
|
|
||||||
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/apps`.
|
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/apps`.
|
||||||
1. Click the green `Shopify App Store` button.
|
1. Click the green `Shopify App Store` button. 
|
||||||

|
1. Search for `Headless` and click on the `Headless` app. 
|
||||||
1. Search for `Headless` and click on the `Headless` app.
|
1. Click the black `Add app` button. 
|
||||||

|
1. Click the green `Add sales channel` button. 
|
||||||
1. Click the black `Add app` button.
|
1. Click the green `Create storefront` button. 
|
||||||

|
1. Copy and paste the public access token and assign it to a `SHOPIFY_STOREFRONT_ACCESS_TOKEN` environment variable. 
|
||||||
1. Click the green `Add sales channel` button.
|
|
||||||

|
|
||||||
1. Click the green `Create storefront` button.
|
|
||||||

|
|
||||||
1. Copy and paste the public access token and assign it to a `SHOPIFY_STOREFRONT_ACCESS_TOKEN` environment variable.
|
|
||||||

|
|
||||||
1. If you ever need to reference the public access token again, you can navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/headless_storefronts`.
|
1. If you ever need to reference the public access token again, you can navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/headless_storefronts`.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -106,21 +100,14 @@ Follow the installation instructions and configure the theme with your headless
|
|||||||
<details>
|
<details>
|
||||||
<summary>Expand to view detailed walkthrough</summary>
|
<summary>Expand to view detailed walkthrough</summary>
|
||||||
|
|
||||||
1. Download [Shopify Headless Theme](https://github.com/instantcommerce/shopify-headless-theme).
|
1. Download [Shopify Headless Theme](https://github.com/instantcommerce/shopify-headless-theme). 
|
||||||

|
|
||||||
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/themes`.
|
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/themes`.
|
||||||
1. Click `Add theme`, then `Upload zip file`.
|
1. Click `Add theme`, then `Upload zip file`. 
|
||||||

|
1. Select the downloaded zip file from above, and click the green `Upload file` button. 
|
||||||
1. Select the downloaded zip file from above, and click the green `Upload file` button.
|
1. Click `Customize`. 
|
||||||

|
1. Click `Theme settings` (ie. the paintbrush icon), expand the `STOREFRONT` section, enter your headless store domain, click the gray `Publish` button. 
|
||||||
1. Click `Customize`.
|
1. Confirm the theme change by clicking the green `Save and publish` button. 
|
||||||

|
1. The headless theme should now be your current active theme. 
|
||||||
1. Click `Theme settings` (ie. the paintbrush icon), expand the `STOREFRONT` section, enter your headless store domain, click the gray `Publish` button.
|
|
||||||

|
|
||||||
1. Confirm the theme change by clicking the green `Save and publish` button.
|
|
||||||

|
|
||||||
1. The headless theme should now be your current active theme.
|
|
||||||

|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### Branding & Design
|
### Branding & Design
|
||||||
@ -141,27 +128,21 @@ You can use Shopify's admin to customize these pages to match your brand and des
|
|||||||
#### Checkout, order status, and order history
|
#### Checkout, order status, and order history
|
||||||
|
|
||||||
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/checkout`.
|
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/checkout`.
|
||||||
1. Click the green `Customize` button.
|
1. Click the green `Customize` button. 
|
||||||

|
1. Click `Branding` (ie. the paintbrush icon) and customize your brand. Please note, there are three steps / pages to the checkout flow. Use the dropdown to change pages and adjust branding as needed on each page. Click `Save` when you are done. 
|
||||||
1. Click `Branding` (ie. the paintbrush icon) and customize your brand. Please note, there are three steps / pages to the checkout flow. Use the dropdown to change pages and adjust branding as needed on each page. Click `Save` when you are done.
|
|
||||||

|
|
||||||
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/branding`.
|
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/branding`.
|
||||||
1. Customize settings to match your brand.
|
1. Customize settings to match your brand. 
|
||||||

|
|
||||||
|
|
||||||
#### Emails
|
#### Emails
|
||||||
|
|
||||||
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/email_settings`.
|
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/email_settings`.
|
||||||
1. Customize settings to match your brand.
|
1. Customize settings to match your brand. 
|
||||||

|
|
||||||
|
|
||||||
#### Favicon
|
#### Favicon
|
||||||
|
|
||||||
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/themes`.
|
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/themes`.
|
||||||
1. Click the green `Customize` button.
|
1. Click the green `Customize` button. 
|
||||||

|
1. Click `Theme settings` (ie. the paintbrush icon), expand the `FAVICON` section, upload favicon, then click the `Save` button. 
|
||||||
1. Click `Theme settings` (ie. the paintbrush icon), expand the `FAVICON` section, upload favicon, then click the `Save` button.
|
|
||||||

|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -189,9 +170,7 @@ Next.js is pre-configured to listen for the following Shopify webhook events and
|
|||||||
#### Configure Shopify webhooks
|
#### Configure Shopify webhooks
|
||||||
|
|
||||||
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/notifications`.
|
1. Navigate to `https://[your-shopify-store-subdomain].myshopify.com/admin/settings/notifications`.
|
||||||
1. Add webhooks for all six event topics listed above. You can add more sets for other preview urls, environments, or local development. Append `?secret=[SECRET]` to each url, where `[SECRET]` is the secret you created above.
|
1. Add webhooks for all six event topics listed above. You can add more sets for other preview urls, environments, or local development. Append `?secret=[SECRET]` to each url, where `[SECRET]` is the secret you created above.  
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### Testing webhooks during local development
|
#### Testing webhooks during local development
|
||||||
|
|
||||||
@ -200,11 +179,8 @@ The easiest way to test webhooks while developing locally is to use [ngrok](http
|
|||||||
1. [Install and configure ngrok](https://ngrok.com/download) (you will need to create an account).
|
1. [Install and configure ngrok](https://ngrok.com/download) (you will need to create an account).
|
||||||
1. Run your app locally, `npm run dev`.
|
1. Run your app locally, `npm run dev`.
|
||||||
1. In a separate terminal session, run `ngrok http 3000`.
|
1. In a separate terminal session, run `ngrok http 3000`.
|
||||||
1. Use the url generated by ngrok and add or update your webhook urls in Shopify.
|
1. Use the url generated by ngrok and add or update your webhook urls in Shopify.  
|
||||||

|
1. You can now make changes to your store and your local app should receive updates. You can also use the `Send test notification` button to trigger a generic webhook test. 
|
||||||

|
|
||||||
1. You can now make changes to your store and your local app should receive updates. You can also use the `Send test notification` button to trigger a generic webhook test.
|
|
||||||

|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
18
license.md
18
license.md
@ -2,20 +2,8 @@ The MIT License (MIT)
|
|||||||
|
|
||||||
Copyright (c) 2023 Vercel, Inc.
|
Copyright (c) 2023 Vercel, Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user