-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shopify Billing API example initial commit
- Loading branch information
0 parents
commit d547e8f
Showing
32 changed files
with
1,229 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.cache | ||
build | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Markdown syntax specifies that trailing whitespaces can be meaningful, | ||
# so let’s not trim those. e.g. 2 trailing spaces = linebreak (<br />) | ||
# See https://daringfireball.net/projects/markdown/syntax#p | ||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
build | ||
public/build | ||
shopify-app-remix | ||
*/*.yml | ||
.shopify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** @type {import('@types/eslint').Linter.BaseConfig} */ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
"@remix-run/eslint-config", | ||
"@remix-run/eslint-config/node", | ||
"@remix-run/eslint-config/jest-testing-library", | ||
"prettier", | ||
], | ||
globals: { | ||
shopify: "readonly" | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
node_modules | ||
|
||
/.cache | ||
/build | ||
/app/build | ||
/public/build/ | ||
/public/_dev | ||
/app/public/build | ||
/prisma/dev.sqlite | ||
/prisma/dev.sqlite-journal | ||
database.sqlite | ||
|
||
.env | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const fs = require("node:fs"); | ||
const apiVersion = require("@shopify/shopify-app-remix").LATEST_API_VERSION; | ||
|
||
function getConfig() { | ||
const config = { | ||
projects: { | ||
// Storefront API | ||
// Here is the config to tell graphql.vscode-graphql to use the storefront GraphQL Schema | ||
// Steps: | ||
// 1. Uncomment lines 14-17 (the shopifyStorefrontApi property) | ||
// 2. Update the documents array to point to files that use the storefront API | ||
// Do not mix and match storefront and admin API documents in the same file. | ||
// If a route needs both APIs, create a separate file for each API. | ||
// shopifyStorefrontApi: { | ||
// schema: `https://shopify.dev/storefront-graphql-direct-proxy/${apiVersion}`, | ||
// documents: ["./app/routes/app.storefront.jsx"], | ||
// }, | ||
shopifyAdminApi: { | ||
schema: `https://shopify.dev/admin-graphql-direct-proxy/${apiVersion}`, | ||
documents: ["./app/**/*.{graphql,js,ts,jsx,tsx}"], | ||
}, | ||
}, | ||
}; | ||
|
||
let extensions = []; | ||
try { | ||
extensions = fs.readdirSync("./extensions"); | ||
} catch { | ||
// ignore if no extensions | ||
} | ||
|
||
for (const entry of extensions) { | ||
const extensionPath = `./extensions/${entry}`; | ||
const schema = `${extensionPath}/schema.graphql`; | ||
if (!fs.existsSync(schema)) { | ||
continue; | ||
} | ||
config.projects[entry] = { | ||
schema, | ||
documents: [`${extensionPath}/**/*.graphql`], | ||
}; | ||
} | ||
|
||
return config; | ||
} | ||
|
||
module.exports = getConfig(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
engine-strict=true | ||
auto-install-peers=true | ||
shamefully-hoist=true | ||
enable-pre-post-scripts=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package.json | ||
.cache | ||
.shadowenv.d | ||
.vscode | ||
build | ||
node_modules | ||
prisma | ||
public | ||
shopify-app-remix | ||
.github | ||
tmp | ||
*.yml | ||
.shopify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:18-alpine | ||
|
||
EXPOSE 3000 | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN npm install --omit=dev | ||
# Remove CLI packages since we don't need them in production by default. | ||
# Remove this line if you want to run CLI commands in your container. | ||
RUN npm remove @shopify/app @shopify/cli | ||
RUN npm run build | ||
|
||
# You'll probably want to remove this in production, it's here to make it easier to test things! | ||
RUN rm -f prisma/dev.sqlite | ||
|
||
CMD ["npm", "run", "docker-start"] |
Oops, something went wrong.