Skip to content

Commit

Permalink
Merge pull request #17 from Kazuki-tam/feature/packages
Browse files Browse the repository at this point in the history
Update: packages and lint files
  • Loading branch information
Kazuki-tam authored Aug 12, 2023
2 parents 37048e6 + 9430615 commit 9ee88ca
Show file tree
Hide file tree
Showing 357 changed files with 2,185 additions and 1,158 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"tabWidth": 2
"tabWidth": 2,
"plugins": ["@shopify/prettier-plugin-liquid"]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/dlv-npm-1.1.3-187c903a21-d7381bca22.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-3340e2eb10-8.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/qs-npm-6.10.3-172e1a3fb7-0fac5e6c71.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/qs-npm-6.2.3-9521e04257-6a5d982963.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ shopify-email-notification is a template repository for email notifications.

[![Release (latest by date)](https://img.shields.io/github/v/release/Kazuki-tam/shopify-email-notification)](https://github.com/Kazuki-tam/shopify-email-notification/releases/tag/v0.0.1)
[![Issues](https://img.shields.io/github/issues/Kazuki-tam/shopify-email-notification)](https://github.com/Kazuki-tam/shopify-email-notification/issues)
![Maintenance](https://img.shields.io/maintenance/yes/2022)
![Maintenance](https://img.shields.io/maintenance/yes/2023)
![Release date](https://img.shields.io/github/release-date/Kazuki-tam/shopify-email-notification)

## Features
Expand All @@ -21,7 +21,7 @@ shopify-email-notification is a template repository for email notifications.
- Built in useful commands

## Requirements
- [Node v16.17.0 or higher](https://nodejs.org/en/)
- [Node v16 or higher](https://nodejs.org/en/)
- [Shopify store](https://shopify.dev/themes/tools/development-stores#create-a-development-store-for-a-client)

## Main dependencies
Expand Down Expand Up @@ -137,14 +137,6 @@ Open returns notification pages.
yarn returns
```

### Staff order notifications command

Open staff order notification pages.

```bash
yarn staffOrderNotifications
```

### Format command

Format this project code.
Expand Down
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shopify-email-notification",
"version": "0.0.5",
"version": "0.0.6",
"description": "shopify-email-notification is a template repository for email notifications.",
"author": "Kazuki Yonemoto (https://dev.to/tim_yone)",
"license": "MIT",
Expand All @@ -15,8 +15,8 @@
"checkTypes": "tsc --noEmit",
"checkLicense": "license-checker --production",
"format": "npm-run-all --parallel 'format:*'",
"format:server": "prettier --write --plugin-search-dir=. 'server/**/*.{js,ts}'",
"format:views": "prettier --write --plugin-search-dir=. 'views/**/*.liquid'",
"format:server": "prettier --write 'server/**/*.{js,ts}'",
"format:views": "prettier --write 'views/**/*.liquid'",
"eslint": "eslint 'server**/*.{js,ts}'",
"eslint:fix": "eslint --fix 'server/**/*.{js,ts}'",
"admin": "FLAG=admin ts-node tasks/opener",
Expand Down Expand Up @@ -64,32 +64,32 @@
"postInstall": "typesync"
},
"devDependencies": {
"@shopify/prettier-plugin-liquid": "^0.2.1",
"@types/browser-sync": "^3001.0.28-alpha",
"@types/eslint": "^8.4.5",
"@types/express": "^4.17.13",
"@types/jest": "^28.1.6",
"@shopify/prettier-plugin-liquid": "^1.2.2",
"@types/browser-sync": "^2.27.0",
"@types/eslint": "^8.44.2",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.3",
"@types/nodemon": "^1.19.2",
"@types/opener": "^1.4.0",
"@types/prettier": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"browser-sync": "^2.27.10",
"dotenv": "^16.0.1",
"eslint": "^8.21.0",
"eslint-plugin-jest": "^26.7.0",
"jest": "^28.1.3",
"nodemon": "^2.0.19",
"@types/prettier": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"browser-sync": "^2.29.3",
"dotenv": "^16.3.1",
"eslint": "^8.47.0",
"eslint-plugin-jest": "^27.2.3",
"jest": "^29.6.2",
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"opener": "^1.5.2",
"prettier": "^2.7.1",
"ts-jest": "^28.0.7",
"prettier": "^3.0.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^4.7.4",
"typesync": "^0.9.2"
"typescript": "^4.9.5",
"typesync": "^0.11.1"
},
"dependencies": {
"express": "^4.18.1",
"liquidjs": "^10.0.0"
"express": "^4.18.2",
"liquidjs": "^10.8.4"
}
}
12 changes: 3 additions & 9 deletions tasks/opener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,18 @@ const openUrl = () => {
if (FLAG === 'order_cancelled') {
targetUrl = `${ADMIN_URL}email_templates/order_cancelled/edit`
}
if (FLAG === 'order_payment_receipt') {
targetUrl = `${ADMIN_URL}email_templates/order_payment_receipt/edit`
}
if (FLAG === 'refund_notification') {
targetUrl = `${ADMIN_URL}email_templates/refund_notification/edit`
}
if (FLAG === 'draft_order_invoice') {
targetUrl = `${ADMIN_URL}email_templates/draft_order_invoice/edit`
}
if (FLAG === 'buy_online') {
targetUrl = `${ADMIN_URL}email_templates/buy_online/edit`
}
if (FLAG === 'abandoned_checkout_notification') {
targetUrl = `${ADMIN_URL}email_templates/abandoned_checkout_notification/edit`
}
if (FLAG === 'pos_exchange_receipt') {
targetUrl = `${ADMIN_URL}email_templates/pos_exchange_receipt/edit`
}
if (FLAG === 'pos_exchange_v2_receipt') {
targetUrl = `${ADMIN_URL}email_templates/pos_exchange_v2_receipt/edit`
}
if (FLAG === 'gift_card_notification') {
targetUrl = `${ADMIN_URL}email_templates/gift_card_notification/edit`
}
Expand Down
2 changes: 1 addition & 1 deletion views/en/customer/company-contact-welcome-email.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
in to place your first order.
{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
2 changes: 1 addition & 1 deletion views/en/customer/contact-buyer.liquid
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
2 changes: 1 addition & 1 deletion views/en/customer/customer-account-activation.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
you have to do is activate it.
{%- endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
2 changes: 1 addition & 1 deletion views/en/customer/customer-account-welcome.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You've activated your customer account. Next time you shop with us, log in for faster checkout.
{%- endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
2 changes: 1 addition & 1 deletion views/en/customer/customer-password-reset.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
request a new password, you can safely delete this email.
{%- endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
to do anything.
{%- endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
7 changes: 5 additions & 2 deletions views/en/local-delivery/local-delivery-delivered.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Haven’t received your order? <a href='mailto:{{ shop.email }}'>Let us know</a>.
{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down Expand Up @@ -110,7 +110,10 @@
{% if fulfillment.tracking_numbers.size > 0 %}
<p class='disclaimer__subtext'>
<br>
{% if fulfillment.tracking_numbers.size == 1 and fulfillment.tracking_company and fulfillment.tracking_url %}
{% if fulfillment.tracking_numbers.size == 1
and fulfillment.tracking_company
and fulfillment.tracking_url
%}
{{ fulfillment.tracking_company }} tracking number:
<a href='{{ fulfillment.tracking_url }}'>{{ fulfillment.tracking_numbers.first }}</a>
{% elsif fulfillment.tracking_numbers.size == 1 %}
Expand Down
2 changes: 1 addition & 1 deletion views/en/local-delivery/local-out-for-delivery.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Your order is on its way and will arrive soon.
{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
2 changes: 1 addition & 1 deletion views/en/local-delivery/missed-delivery.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Hi {{ customer.first_name }}, we weren’t able to deliver your order.
{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
11 changes: 7 additions & 4 deletions views/en/local-pickup/pickup-receipt.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% capture email_title %}Your order has been picked up{% endcapture %}
{% capture email_body %}Thank you for shopping at {{ shop_name }}{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down Expand Up @@ -300,14 +300,14 @@
{% assign transaction_size = 0 %}
{% assign transaction_amount = 0 %}
{% for transaction in transactions %}
{% unless transaction.kind == "capture" or transaction.kind == "void" %}
{% unless transaction.kind == 'capture' or transaction.kind == 'void' %}
{% assign transaction_size = transaction_size | plus: 1 %}
{% assign transaction_amount = transaction_amount | plus: transaction.amount %}
{% endunless %}
{% endfor %}
<table class='row subtotal-table subtotal-table--total'>
{% if payment_terms %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: "%b %d, %Y" %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: '%b %d, %Y' %}

<tr class='subtotal-line'>
<td class='subtotal-line__title'>
Expand Down Expand Up @@ -365,7 +365,10 @@
</tr>

{% for transaction in transactions %}
{% if transaction.status == "success" and transaction.kind == "authorization" or transaction.kind == "sale" %}
{% if transaction.status == 'success'
and transaction.kind == 'authorization'
or transaction.kind == 'sale'
%}
{% if transaction.payment_details.credit_card_company %}
{% capture transaction_name -%}
{{- transaction.payment_details.credit_card_company }} (ending in
Expand Down
11 changes: 7 additions & 4 deletions views/en/local-pickup/ready-for-pickup.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% capture email_title %}Your order is ready for pickup{% endcapture %}
{% capture email_body %}Bring your confirmation email when you come to collect your order.{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down Expand Up @@ -384,14 +384,14 @@
{% assign transaction_size = 0 %}
{% assign transaction_amount = 0 %}
{% for transaction in transactions %}
{% unless transaction.kind == "capture" or transaction.kind == "void" %}
{% unless transaction.kind == 'capture' or transaction.kind == 'void' %}
{% assign transaction_size = transaction_size | plus: 1 %}
{% assign transaction_amount = transaction_amount | plus: transaction.amount %}
{% endunless %}
{% endfor %}
<table class='row subtotal-table subtotal-table--total'>
{% if payment_terms %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: "%b %d, %Y" %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: '%b %d, %Y' %}

<tr class='subtotal-line'>
<td class='subtotal-line__title'>
Expand Down Expand Up @@ -449,7 +449,10 @@
</tr>

{% for transaction in transactions %}
{% if transaction.status == "success" and transaction.kind == "authorization" or transaction.kind == "sale" %}
{% if transaction.status == 'success'
and transaction.kind == 'authorization'
or transaction.kind == 'sale'
%}
{% if transaction.payment_details.credit_card_company %}
{% capture transaction_name -%}
{{- transaction.payment_details.credit_card_company }} (ending in
Expand Down
2 changes: 1 addition & 1 deletion views/en/orders/abandoned-checkout-notification.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% endif %}
{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down
11 changes: 7 additions & 4 deletions views/en/orders/buy-online.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% capture email_title %}Are you ready to complete your order?{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down Expand Up @@ -297,14 +297,14 @@
{% assign transaction_size = 0 %}
{% assign transaction_amount = 0 %}
{% for transaction in transactions %}
{% unless transaction.kind == "capture" or transaction.kind == "void" %}
{% unless transaction.kind == 'capture' or transaction.kind == 'void' %}
{% assign transaction_size = transaction_size | plus: 1 %}
{% assign transaction_amount = transaction_amount | plus: transaction.amount %}
{% endunless %}
{% endfor %}
<table class='row subtotal-table subtotal-table--total'>
{% if payment_terms %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: "%b %d, %Y" %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: '%b %d, %Y' %}

<tr class='subtotal-line'>
<td class='subtotal-line__title'>
Expand Down Expand Up @@ -362,7 +362,10 @@
</tr>

{% for transaction in transactions %}
{% if transaction.status == "success" and transaction.kind == "authorization" or transaction.kind == "sale" %}
{% if transaction.status == 'success'
and transaction.kind == 'authorization'
or transaction.kind == 'sale'
%}
{% if transaction.payment_details.credit_card_company %}
{% capture transaction_name -%}
{{- transaction.payment_details.credit_card_company }} (ending in
Expand Down
11 changes: 7 additions & 4 deletions views/en/orders/draft-order-invoice.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% endif %}
{% endcapture %}

<!DOCTYPE html>
<!doctype html>
<html lang='en'>
<head>
<title>{{ email_title }}</title>
Expand Down Expand Up @@ -318,14 +318,14 @@
{% assign transaction_size = 0 %}
{% assign transaction_amount = 0 %}
{% for transaction in transactions %}
{% unless transaction.kind == "capture" or transaction.kind == "void" %}
{% unless transaction.kind == 'capture' or transaction.kind == 'void' %}
{% assign transaction_size = transaction_size | plus: 1 %}
{% assign transaction_amount = transaction_amount | plus: transaction.amount %}
{% endunless %}
{% endfor %}
<table class='row subtotal-table subtotal-table--total'>
{% if payment_terms %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: "%b %d, %Y" %}
{% assign due_at_date = payment_terms.next_payment.due_at | date: '%b %d, %Y' %}

<tr class='subtotal-line'>
<td class='subtotal-line__title'>
Expand Down Expand Up @@ -383,7 +383,10 @@
</tr>

{% for transaction in transactions %}
{% if transaction.status == "success" and transaction.kind == "authorization" or transaction.kind == "sale" %}
{% if transaction.status == 'success'
and transaction.kind == 'authorization'
or transaction.kind == 'sale'
%}
{% if transaction.payment_details.credit_card_company %}
{% capture transaction_name -%}
{{- transaction.payment_details.credit_card_company }} (ending in
Expand Down
Loading

0 comments on commit 9ee88ca

Please sign in to comment.