Skip to content

Commit

Permalink
npx create-ikas-theme initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dizefurkan committed Aug 2, 2022
1 parent b53c0cc commit 46aefae
Show file tree
Hide file tree
Showing 66 changed files with 1,187 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ikas-theme/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
[
"next/babel",
{
"preset-react": { "throwIfNamespace": false },
}
]
],
"plugins": []
}
5 changes: 5 additions & 0 deletions ikas-theme/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NEXT_PUBLIC_ENV=local
NEXT_PUBLIC_BASE_URL=https://api.myikas.com/api/sf
NEXT_PUBLIC_IMG_BASE_URL=https://cdn.myikas.com/
NEXT_PUBLIC_UPLOAD_GQL_URL=https://api.myikas.com/api/admin/graphql
NEXT_PUBLIC_GQL_URL=https://api.myikas.com/api/sf/graphql
72 changes: 72 additions & 0 deletions ikas-theme/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
```bash
▓░ ▓▓ ▓▓
▓▓▓░ ▓▓
░▓▓▓░ ▓▓ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓
▒▓▓▓▓▓▓▓▓▓▓░▒ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓▓
░▓▓▓ ▓▓ ▓▓▓▓▓▓▓ ▓▓ ▓▓ ▓▓▓
░▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓
```

This is an [ikas⚡️](https://ikas.com) theme generated by [`create-ikas-theme`](https://ikas.dev/docs/intro).

---

## Getting Started

1. Add your configs to `config.json`

```json
{
"themeId": "",
"storefrontId": "",
"apiKey": ""
}
```

2. Install dependencies

```bash
npm install
# or
yarn install
```

3. Run the development server:

```bash
npm run dev
# or
yarn dev
```

4. Create your first section from ikas theme editor

You can start add components to your theme. The page auto-updates as you edit the file.

Open [http://localhost:3333](http://localhost:3333) with your browser to see the result.

## Learn More

To learn more about ikas, take a look at the following resources:

- [ikas documentation](https://ikas.dev/docs) - learn about ikas features and API.

## Deploy on ikas

To deploy your ikas theme just press to `Upload Theme` button on the ikas dashboard theme editor.

💡 Before upload we suggest you to run local build

```bash
npm run build
# or
yarn run build
```

If there is no error then you can upload your theme 🎉

## Help

Do you need help? [Contact us](https://ikas.com)

Powered by ikas.
5 changes: 5 additions & 0 deletions ikas-theme/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"themeId": "",
"storefrontId": "",
"apiKey": ""
}
5 changes: 5 additions & 0 deletions ikas-theme/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
47 changes: 47 additions & 0 deletions ikas-theme/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const withTM = require("next-transpile-modules")([
"@ikas/storefront",
"@ikas/storefront-api",
"@ikas/storefront-assets",
"@ikas/storefront-cmd",
"@ikas/storefront-config",
"@ikas/storefront-model-functions",
"@ikas/storefront-models",
"@ikas/storefront-next",
"@ikas/storefront-providers",
]);

const config = {
i18n: {
defaultLocale: "en",
locales: ["en"],
localeDetection: false,
},
basePath: process.env.NEXTJS_BASE_PATH || "",

images: {
deviceSizes: [
180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 1950, 2560, 3840,
],
},

webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
config.resolve.fallback.net = false;
config.resolve.fallback.encoding = false;
config.resolve.fallback.crypto = false;
config.resolve.fallback.assert = false;
config.resolve.fallback.stream = false;
config.module.rules = [
...config.module.rules,
{
test: /@ikas/i,
sideEffects: false,
},
];
}
return config;
},
};

module.exports = withTM(config);
61 changes: 61 additions & 0 deletions ikas-theme/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "ikas-theme",
"version": "0.0.1",
"private": true,
"scripts": {
"upgradeDependencies": "yarn upgrade @ikas/storefront @ikas/storefront-api @ikas/storefront-assets @ikas/storefront-cmd @ikas/storefront-config @ikas/storefront-model-functions @ikas/storefront-models @ikas/storefront-next @ikas/storefront-providers",
"dev": "next dev -p 3333",
"build": "next build",
"start": "next start",
"generate": "ikas --generate",
"prettier:all": "npx prettier@^2.1 './**/src/**/*.(ts|tsx|css|scss)' --write"
},
"dependencies": {
"@ikas/fe-api-client": "^1.0.16",
"@ikas/storefront": "^4.0.0-alpha.63",
"@ikas/storefront-api": "^4.0.0-alpha.63",
"@ikas/storefront-assets": "^4.0.0-alpha.63",
"@ikas/storefront-cmd": "^4.0.0-alpha.63",
"@ikas/storefront-config": "^4.0.0-alpha.63",
"@ikas/storefront-model-functions": "^4.0.0-alpha.63",
"@ikas/storefront-models": "^4.0.0-alpha.63",
"@ikas/storefront-next": "^4.0.0-alpha.63",
"@ikas/storefront-providers": "^4.0.0-alpha.63",
"next": "12.2.0",
"query-string": "^6.13.8",
"react": "17.0.2",
"react-dom": "17.0.2",
"mobx": "^6.1.3",
"axios": "^0.26.0",
"lodash": "^4.17.20",
"archiver": "^5.3.0",
"cors": "^2.8.5",
"html-react-parser": "^1.4.0",
"mobx-react-lite": "^3.1.5",
"next-transpile-modules": "^9.0.0",
"ts-essentials": "^7.0.1"
},
"devDependencies": {
"@types/node": "^14.14.6",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@types/cors": "^2.8.9",
"@types/archiver": "^5.1.0",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"eslint": "^6.6.0",
"eslint-config-react-app": "^5.2.1",
"eslint-loader": "3.0.3",
"eslint-plugin-flowtype": "4.6.0",
"eslint-plugin-import": "2.20.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "^1.6.1",
"sass": "^1.43.4",
"typescript": "^4.5.2"
},
"resolutions": {
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2"
}
}
Binary file added ikas-theme/public/favicon.ico
Binary file not shown.
39 changes: 39 additions & 0 deletions ikas-theme/public/ikas.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ikas-theme/public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
11 changes: 11 additions & 0 deletions ikas-theme/src/components/__generated__/editor.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ikas-theme/src/components/__generated__/pages/404.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ikas-theme/src/components/__generated__/pages/[slug]/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ikas-theme/src/components/__generated__/pages/blog/[slug].ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ikas-theme/src/components/__generated__/pages/blog/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ikas-theme/src/components/__generated__/pages/cart.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions ikas-theme/src/components/__generated__/pages/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 46aefae

Please sign in to comment.