Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayanth@Aries authored and Jayanth@Aries committed Feb 22, 2024
0 parents commit 48994c6
Show file tree
Hide file tree
Showing 150 changed files with 149,149 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ENABLE_NEW_JSX_TRANSFORM="true"
FAST_REFRESH="true"

CLOUD_IDENTIFIER=gcp-us
APPLICATION_ID=todo-application-id
APPLICATION_URL=https://todo.url.com/url
INITIAL_PROJECT_KEY=bundles-starter-development
ENTRY_POINT_URI_PATH=custom-objects-editor
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist/**
node_modules/*
coverage/*
public/*
schema.graphql
*.rest.graphql
61 changes: 61 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
process.env.ENABLE_NEW_JSX_TRANSFORM = 'true';

/**
* @type {import("eslint").Linter.Config}
*/
module.exports = {
extends: [
'@commercetools-frontend/eslint-config-mc-app',
"eslint:recommended",
// "plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
plugins: ['graphql', 'unused-imports'],
overrides: [
{
files: ['**/*.ctp.graphql'],
rules: {
'graphql/template-strings': [
'error',
{
env: 'literal',
schemaJson: require('./schemas/ctp.json'),
},
],
},
},
],
ignorePatterns: ['public/', 'node_nodules/', '*.config.js', '.eslintrc.js', '*.d.ts'],
rules: {
quotes: ['error', 'single'],
// we want to force semicolons
semi: ['error', 'always'],
// we use 2 spaces to indent our code
indent: ['error', 2, { "SwitchCase": 1 }],

// we want to avoid extraneous spaces
'no-multi-spaces': ['error'],
'react/jsx-uses-react': ['error'],
'react/jsx-uses-vars': ['error'],
'import/order': ['error'],
'import/newline-after-import': ['error'],
'react/prop-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off', //disable for CI
'no-unused-vars': 'off', // or "@typescript-eslint/no-unused-vars": "off",
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
},
};
Binary file added .github/.DS_Store
Binary file not shown.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Custom Applications CI

on: [push]

env:
CI: true

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --pure-lockfile
- name: Lint
run: yarn run lint
- name: Test
run: yarn run test
- name: Build
run: yarn run build
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules/
dist/
coverage/
public/
csp.json
env.json
.env.local
.firebase/
.firebaserc
firebase.json
lambda.js
_site/
.sass-cache/
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package.json
**/dist/
**/public/
**/coverage/
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"trailingComma": "es5",
"singleQuote": true,
"parser": "typescript",
"overrides": [
{
"files": "*.json",
"options": {
"parser": "json"
}
},
{
"files": "*.graphql",
"options": {
"parser": "graphql"
}
}
]
}
26 changes: 26 additions & 0 deletions @types-extensions/graphql-ctp/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* THIS IS A GENERATED FILE */
/* eslint-disable import/no-duplicates */

declare module '*/fetch-channel-details.ctp.graphql' {
import { DocumentNode } from 'graphql';
const defaultDocument: DocumentNode;
export const FetchChannelDetails: DocumentNode;

export default defaultDocument;
}

declare module '*/fetch-channels.ctp.graphql' {
import { DocumentNode } from 'graphql';
const defaultDocument: DocumentNode;
export const FetchChannels: DocumentNode;

export default defaultDocument;
}

declare module '*/update-channel-details.ctp.graphql' {
import { DocumentNode } from 'graphql';
const defaultDocument: DocumentNode;
export const UpdateChannelDetails: DocumentNode;

export default defaultDocument;
}
11 changes: 11 additions & 0 deletions @types/commercetools__sync-actions/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
declare module '@commercetools/sync-actions' {
export type SyncAction = { action: string; [x: string]: unknown };
function buildActions<NextDraft, OriginalDraft>(
nextDraft: NextDraft,
originalDraft: OriginalDraft
): SyncAction[];
export type Syncer = {
buildActions: typeof buildActions;
};
export function createSyncChannels(): Syncer;
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 commercetools

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<p align="center">
<a href="https://commercetools.com/">
<img alt="commercetools logo" src="https://unpkg.com/@commercetools-frontend/assets/logos/commercetools_primary-logo_horizontal_RGB.png">
</a>
<b>Custom Application starter template</b>
</p>

A starter template to [develop Custom Applications](https://docs.commercetools.com/custom-applications/) for the Merchant Center.

# Installing the template

Read the [Getting started](https://docs.commercetools.com/custom-applications/getting-started) documentation for more information.

# Developing the Custom Application

Learn more about [developing a Custom Application](https://docs.commercetools.com/custom-applications/development) and [how to use the CLI](https://docs.commercetools.com/custom-applications/api-reference/cli).
Loading

0 comments on commit 48994c6

Please sign in to comment.