Skip to content

Commit

Permalink
pwa-studio 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Cody Nguyen committed Sep 13, 2021
1 parent e5c92ea commit 213f270
Show file tree
Hide file tree
Showing 19 changed files with 14,798 additions and 223 deletions.
32 changes: 31 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Uncomment and modify variable declarations in this file and they will take
# effect throughout the Buildpack tool chain.
#
# Generated by @magento/pwa-buildpack v8.0.1 on 2021-03-13T09:42:44.759Z.
# Generated by @magento/pwa-buildpack v10.0.0 on 2021-09-13T05:09:37.506Z.
#
################################################################################

Expand Down Expand Up @@ -55,6 +55,15 @@ IMAGE_OPTIMIZING_ORIGIN=auto
#
################################################################################

#### Default Country ###########################################################
#
# Specify the default country to be selected in forms containing country
# field such as address books and shipping information forms.
# - Default when not set: US
DEFAULT_COUNTRY_CODE=US
#
################################################################################

#### Custom local origin #######################################################
#
# Get or create a secure, unique hostname/port combination and a trusted SSL
Expand Down Expand Up @@ -174,3 +183,24 @@ CHECKOUT_BRAINTREE_TOKEN=sandbox_8yrzsvtm_s2bg8fs563crhqzk
BUILDBUS_DEPS_ADDITIONAL=
#
################################################################################

#### Custom HTTPS certificates #################################################
#
# Absolute path to the custom HTTPS certificate key file.
# - Default when not set:
CUSTOM_HTTPS_KEY=
#
# Absolute path to the custom HTTPS certificate cert file.
# - Default when not set:
CUSTOM_HTTPS_CERT=
#
################################################################################

#### Express compression settings ##############################################
#
# Specify if express server compression needs to be enabled. Defaults to
# false if not provided.
# - Default when not set: false
ENABLE_EXPRESS_SERVER_COMPRESSION=false
#
################################################################################
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const config = {
parser: 'babel-eslint',
extends: ['@magento'],
rules: {
'no-prototype-builtins': 'off',
'no-undef': 'off',
'no-useless-escape': 'off'
}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dist
.env
build-stats.json
npm-debug.log
lastCachedGraphQLSchema.json
merged-schema*.json
test-report.xml
test-results.json
yarn-error.log
17 changes: 4 additions & 13 deletions .graphqlconfig
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
{
"projects": {
"simi-studio": {
"schemaPath": "lastCachedGraphQLSchema.json",
"schemaPath": "merged-schema.v3.json",
"includes": [
"**/client-schema.graphql"
],
"extensions": {
"endpoints": {
"default": "${env:MAGENTO_BACKEND_URL}/graphql"
},
"validate-magento-pwa-queries": {
"clients": [
"apollo",
"literal"
],
"filesGlob": "../{peregrine,venia-ui,venia-concept}/{lib,src}/**/*.{js,graphql,gql}",
"ignore": [
"../venia-ui/lib/**/giftOptions.js",
"../venia-ui/lib/**/wishlistPage.gql.js",
"../venia-ui/lib/**/wishlistItem.gql.js"
]
}
}
}
Expand Down
15 changes: 0 additions & 15 deletions .npmignore

This file was deleted.

57 changes: 28 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
"name": "simi-studio",
"private": true,
"version": "3.0.0",
"version": "4.0.0",
"description": "A new project based on @magento/venia-concept",
"author": "SimiCart",
"license": "UNLICENSED",
"scripts": {
"buildpack": "buildpack",
"build": "yarn run build:prod",
"build:analyze": "yarn run clean && mkdir dist && webpack -p --profile --no-progress --env.mode production --json > dist/build-stats.json && webpack-bundle-analyzer dist/build-stats.json",
"build:dev": "yarn run clean && yarn run validate-queries && webpack --no-progress --env.mode development",
"build:dev": "yarn run clean && webpack --no-progress --env.mode development",
"build:prod": "yarn run clean && webpack --no-progress --env.mode production",
"build:report": "buildpack generate-build-report",
"clean": "rimraf dist",
"download-schema": "graphql get-schema --project simi-studio --insecure",
"lint": "eslint --ignore-path .gitignore 'src/**/{*.js,package.json}'",
"prettier": "prettier --loglevel warn --ignore-path .gitignore 'src/**/*.@(css|graphql|js)' '*.js'",
"prettier:check": "yarn run -s prettier -- --check",
"prettier:fix": "yarn run -s prettier -- --write",
"start": "buildpack serve .",
"start:debug": "node --inspect-brk ./node_modules/.bin/webpack-dev-server --progress --color --env.mode development",
"validate-queries": "yarn run download-schema && graphql validate-magento-pwa-queries --project simi-studio",
"watch": "webpack-dev-server --progress --color --env.mode development",
"storybook": "start-storybook -p 9001 -c src/.storybook",
"storybook:build": "build-storybook -c src/.storybook -o storybook-dist"
Expand All @@ -29,8 +28,7 @@
"@magento/venia-drivers": "src/drivers"
},
"dependencies": {
"@magento/pwa-buildpack": "~8.0.1",
"sharp": "~0.23.3"
"@magento/pwa-buildpack": "~10.0.0"
},
"devDependencies": {
"@adobe/apollo-link-mutation-queue": "~1.0.2",
Expand All @@ -46,13 +44,13 @@
"@babel/runtime": "~7.4.2",
"@magento/babel-preset-peregrine": "~1.1.0",
"@magento/eslint-config": "~1.5.0",
"@magento/pagebuilder": "~4.0.1",
"@magento/peregrine": "~9.0.0",
"@magento/upward-security-headers": "~1.0.2",
"@magento/venia-adobe-data-layer": "~0.0.1",
"@magento/venia-ui": "~6.0.1",
"@magento/pagebuilder": "~6.0.0",
"@magento/peregrine": "~11.0.0",
"@magento/upward-security-headers": "~1.0.4",
"@magento/venia-ui": "~8.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.4.1",
"@storybook/react": "~5.2.6",
"@storybook/react": "~6.1.14",
"@wojtekmaj/enzyme-adapter-react-17": "~0.4.1",
"apollo-cache-persist": "~0.1.1",
"babel-core": "~7.0.0-bridge.0",
"babel-eslint": "~10.0.1",
Expand All @@ -62,10 +60,10 @@
"babel-plugin-graphql-tag": "~2.0.0",
"babel-plugin-module-resolver": "~3.2.0",
"braintree-web-drop-in": "~1.16.0",
"compression": "~1.7.4",
"css-loader": "~2.1.1",
"dotenv": "~6.2.0",
"enzyme": "~3.9.0",
"enzyme-adapter-react-16": "~1.9.1",
"enzyme": "~3.11.0",
"eslint": "~5.14.1",
"eslint-plugin-babel": "~5.3.0",
"eslint-plugin-graphql": "~3.0.3",
Expand All @@ -77,10 +75,8 @@
"express": "~4.16.4",
"file-loader": "~4.0.0",
"graphql": "~15.3.0",
"graphql-cli": "~3.0.11",
"graphql-cli-validate-magento-pwa-queries": "~1.3.1",
"html-webpack-plugin": "~3.2.0",
"informed": "~2.11.17",
"informed": "~3.27.0",
"jarallax": "~1.11.1",
"load-google-maps-api": "~2.0.1",
"lodash": "~4.17.20",
Expand All @@ -92,37 +88,40 @@
"memory-fs": "~0.4.1",
"prettier": "~1.16.4",
"prop-types": "~15.7.2",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react": "~17.0.1",
"react-dom": "~17.0.1",
"react-intl": "~5.7.0",
"react-redux": "~7.1.1",
"react-refresh": "0.8.3",
"react-router-dom": "~5.1.0",
"react-slick": "~0.25.2",
"react-tabs": "~3.0.0",
"react-test-renderer": "~16.9.0",
"react-test-renderer": "~17.0.1",
"redux": "~4.0.1",
"redux-actions": "~2.6.4",
"redux-thunk": "~2.3.0",
"rimraf": "~2.6.3",
"style-loader": "~0.23.1",
"style-loader": "~2.0.0",
"terser-webpack-plugin": "~1.2.3",
"uuid": "~3.3.2",
"webpack": "~4.38.0",
"webpack": "~4.46.0",
"webpack-bundle-analyzer": "~3.3.2",
"webpack-cli": "~3.2.3",
"webpack-dev-server": "~3.2.1",
"workbox-cacheable-response": "~5.1.3",
"workbox-core": "~5.1.3",
"workbox-expiration": "~5.1.3",
"workbox-precaching": "~5.1.3",
"workbox-routing": "~5.1.3",
"workbox-strategies": "~5.1.3",
"workbox-webpack-plugin": "5.1.3"
"workbox-cacheable-response": "~6.0.2",
"workbox-core": "~6.0.2",
"workbox-expiration": "~6.0.2",
"workbox-precaching": "~6.0.2",
"workbox-routing": "~6.0.2",
"workbox-strategies": "~6.0.2",
"workbox-webpack-plugin": "~6.0.2"
},
"optionalDependencies": {
"sharp": "~0.23.3"
},
"resolutions": {
"workbox-build": "~6.0.2"
},
"engines": {
"node": ">=10.x",
"yarn": ">=1.12.0"
Expand Down
4 changes: 3 additions & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const config = {
singleQuote: true
singleQuote: true,
tabWidth: 4,
trailingComma: 'none'
};

module.exports = config;
14 changes: 4 additions & 10 deletions src/.storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import { configure, addDecorator } from '@storybook/react';
import { Adapter } from '@magento/venia-drivers';
import Adapter from '@magento/venia-ui/lib/components/Adapter';
import store from '../store';
import '@magento/venia-ui/lib/index.css';
import { AppContextProvider } from '@magento/venia-ui/lib/components/App';

const loadStories = () => {
// Load all stories from venia-ui
Expand All @@ -19,16 +18,11 @@ const loadStories = () => {
customContext.keys().forEach(customContext);
};

const backendUrl = process.env.MAGENTO_BACKEND_URL;
const apiBase = new URL('/graphql', backendUrl).toString();
const origin = process.env.MAGENTO_BACKEND_URL;

addDecorator(storyFn => (
<Adapter
apiBase={apiBase}
apollo={{ link: Adapter.apolloLink(apiBase) }}
store={store}
>
<AppContextProvider>{storyFn()}</AppContextProvider>
<Adapter origin={origin} store={store}>
{storyFn()}
</Adapter>
));

Expand Down
Loading

0 comments on commit 213f270

Please sign in to comment.