Skip to content

Commit

Permalink
new tailwind config with @apply support
Browse files Browse the repository at this point in the history
  • Loading branch information
itswadesh committed Apr 27, 2020
1 parent 3a7dc93 commit bd9129b
Show file tree
Hide file tree
Showing 61 changed files with 3,522 additions and 2,102 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
@@ -0,0 +1,5 @@
node_modules

dist

data
41 changes: 41 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,41 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:jest/recommended",
"prettier",
"plugin:prettier/recommended",
"prettier/@typescript-eslint",
"prettier/react"
],
"plugins": ["react-hooks"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"settings": {
"react": {
"version": "latest"
}
},
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
}
}
10 changes: 10 additions & 0 deletions .prettierrc
@@ -0,0 +1,10 @@
{
"semi": false,
"singleQuote": true,
"vetur.format.defaultFormatterOptions": {
"prettier": {
"singleQuote": true
}
},
"jsxSingleQuote": true
}
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
32 changes: 16 additions & 16 deletions CONTRIBUTING.md
Expand Up @@ -26,8 +26,8 @@ Be sure to scan through the [most popular](https://github.com/itswadesh/sapper-e

If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment:

* 👍 - upvote
* 👎 - downvote
- 👍 - upvote
- 👎 - downvote

If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below.

Expand All @@ -43,33 +43,33 @@ The built-in tool for reporting an issue, which you can access by using `Report

Please include the following with each issue:

* Version of Litekart
- Version of Litekart

* Your operating system
- Your operating system

* List of extensions that you have installed
- List of extensions that you have installed

* Reproducible steps (1... 2... 3...) that cause the issue
- Reproducible steps (1... 2... 3...) that cause the issue

* What you expected to see, versus what you actually saw
- What you expected to see, versus what you actually saw

* Images, animations, or a link to a video showing the issue occurring
- Images, animations, or a link to a video showing the issue occurring

* A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally
- A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally

* **Note:** Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.
- **Note:** Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

* Errors from the Dev Tools Console (open from the menu: Help > Toggle Developer Tools)
- Errors from the Dev Tools Console (open from the menu: Help > Toggle Developer Tools)

### Final Checklist

Please remember to do the following:

* [ ] Search the issue repository to ensure your report is a new issue
- [ ] Search the issue repository to ensure your report is a new issue

* [ ] Recreate the issue after disabling all extensions
- [ ] Recreate the issue after disabling all extensions

* [ ] Simplify your code around the issue to better isolate the problem
- [ ] Simplify your code around the issue to better isolate the problem

Don't feel bad if the developers can't reproduce the issue right away. They will simply ask for more information!

Expand All @@ -81,8 +81,8 @@ Once submitted, your report will go into the [issue tracking](https://github.com

We use a bot to help us manage issues. This bot currently:

* Automatically closes any issue marked `needs-more-info` if there has been no response in the past 7 days.
* Automatically locks issues 45 days after they are closed.
- Automatically closes any issue marked `needs-more-info` if there has been no response in the past 7 days.
- Automatically locks issues 45 days after they are closed.

If you believe the bot got something wrong, please open a new issue and let us know.

Expand Down
27 changes: 22 additions & 5 deletions README.md
Expand Up @@ -2,6 +2,20 @@
<img src="https://github.com/itswadesh/sapper-ecommerce/blob/master/static/litekart-banner.png?raw=true" alt/>
</a>

On sapper/svelte version bump do the following else it will show error while navigating on home page

`node_modules/svelte/internal/index.mjs`

https://github.com/sveltejs/svelte/issues/2086

```
function detach(node) {
if(node.parentNode){
node.parentNode.removeChild(node);
}
}
```

# Svelte Commerce - Attach Svelte store front to any ecommerce API (e.g. <a href="https://www.litekart.in/"> Litekart</a>, <a href="https://magento.com/">Magento</a>, <a href="https://www.moltin.com/">Moltin</a>, <a href="https://www.shopify.com/">Shopify</a> ...)

![version](https://img.shields.io/badge/node-v12.x-blue.svg)
Expand All @@ -11,18 +25,20 @@

# Built for speed

> Following are the test results when all servers (Elasticsearch, Node, Static Server, Client) give a ping response <100 ms. The demo app hopyshopy.com is hosted at Mumbai (India), If you are testing from another country, the results my vary.
> Following are the test results when all servers (Elasticsearch, Node, Static Server, Client) give a ping response <100 ms. The demo app hopyshopy.com is hosted at Mumbai (India), If you are testing from another country, the results my vary.
> Solution to the above issue is to use a CDN. I am trying to find sponcers to migrate all to a CDN in near future.
## Google Lighthouse/Pagespeed Audit Score (Search Page)
## Google Lighthouse/Pagespeed Audit Score (Search Page)

<img src="https://github.com/itswadesh/sapper-ecommerce/blob/master/static/light-house-search.jpg?raw=true" alt />

## Google Lighthouse/Pagespeed Audit Score (Detail Page)
<img src="https://github.com/itswadesh/sapper-ecommerce/blob/master/static/light-house-detail.jpg?raw=true" alt />

# What is Litekart?
- Litekart is a storefront for your existing eCommerce.

- Litekart is a storefront for your existing eCommerce.
- It is possible to connect with any eCommerce backend
- No need to make a big leap or invest huge amount. Just take this opend source project and attach to existing backend.

Expand All @@ -48,20 +64,22 @@ Open http://localhost:4400 on chrome. Your app should be live
```
const PM2_NAME = 'h'
const REMOTE_DIR = '/var/www/hopyshopy/www'
const REMOTE_HOST = '165.22.222.60'
const REMOTE_host = '165.22.222.60'
const REMOTE_USER = 'root'
```

Rename sample.env to .env and enter your server private key

Next

```
yarn live
```

<img src="https://github.com/itswadesh/sapper-ecommerce/blob/master/static/deployed.jpg?raw=true" alt />

# Configurations

If required change `src/config.js` according to your requirement

# Features
Expand Down Expand Up @@ -94,4 +112,3 @@ If required change `src/config.js` according to your requirement
- Storing tokens into cookie
- Loader on route change with 100ms delay
- Integrated Google Analytics

6 changes: 3 additions & 3 deletions cypress.json
@@ -1,4 +1,4 @@
{
"baseUrl": "http://localhost:3000",
"video": false
}
"baseUrl": "http://localhost:3000",
"video": false
}
64 changes: 37 additions & 27 deletions devops/live.js
@@ -1,45 +1,55 @@
const shell = require('shelljs');
const dotenv = require('dotenv');
dotenv.config({ path: '.env' });
const shell = require('shelljs')
require('dotenv').config()

// Start Config
const PM2_NAME = 'h'
const REMOTE_DIR = '/var/www/hopyshopy/www'
const REMOTE_HOST = '139.59.42.129'
const REMOTE_host = '139.59.42.129'
const REMOTE_USER = 'root'
const PRIVATE_KEY = process.env.LIVE_KEY
const FILE_NAMES = '__sapper__ package.json static'
// End Config

// Zip and send file to remote server
shell.cd('prod').exec('tar czf arialshop.tar.gz ' + FILE_NAMES)
.exec('scp -i ' + PRIVATE_KEY + ' arialshop.tar.gz ' + REMOTE_USER + '@' + REMOTE_HOST + ':' + REMOTE_DIR);
shell
.cd('prod')
.exec('tar czf arialshop.tar.gz ' + FILE_NAMES)
.exec(
'scp -i ' +
PRIVATE_KEY +
' arialshop.tar.gz ' +
REMOTE_USER +
'@' +
REMOTE_host +
':' +
REMOTE_DIR
)
shell.rm('arialshop.tar.gz')

// Extract and reload pm2
var host = {
server: {
host: REMOTE_HOST,
port: 22,
userName: REMOTE_USER,
privateKey: require('fs').readFileSync(PRIVATE_KEY)
},
commands: [
"cd " + REMOTE_DIR,
"sudo tar xf arialshop.tar.gz -C " + REMOTE_DIR,
"sudo rm arialshop.tar.gz",
"sudo npm install --prod",
"sudo pm2 reload " + PM2_NAME
]
};
server: {
host: REMOTE_host,
port: 22,
userName: REMOTE_USER,
privateKey: require('fs').readFileSync(PRIVATE_KEY),
},
commands: [
'cd ' + REMOTE_DIR,
'sudo tar xf arialshop.tar.gz -C ' + REMOTE_DIR,
'sudo rm arialshop.tar.gz',
'sudo npm install --prod',
'sudo pm2 reload ' + PM2_NAME,
],
}

var SSH2Shell = require('ssh2shell'),
//Create a new instance passing in the host object
SSH = new SSH2Shell(host),
//Use a callback function to process the full session text
callback = function (sessionText) {
console.log(sessionText)
}
//Create a new instance passing in the host object
SSH = new SSH2Shell(host),
//Use a callback function to process the full session text
callback = function (sessionText) {
console.log(sessionText)
}

//Start the process
SSH.connect(callback);
SSH.connect(callback)
11 changes: 11 additions & 0 deletions now.json
@@ -0,0 +1,11 @@
{
"version": 2,
"name": "sapper-commerce",
"builds": [
{
"src": "package.json",
"use": "now-sapper"
}
],
"regions": ["bom1"]
}

0 comments on commit bd9129b

Please sign in to comment.