Skip to content

Commit

Permalink
feat: extract core modules to sdk-core
Browse files Browse the repository at this point in the history
  • Loading branch information
fpdrozd committed Nov 25, 2022
1 parent 90f26d9 commit b78fe6c
Show file tree
Hide file tree
Showing 115 changed files with 3,824 additions and 300 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ yarn-error.log
/docs
/packages/sdk-core/dist
/packages/sdk-core/types
/packages/sdk-storefront/dist
/packages/sdk-storefront/types
/packages/sdk-platform/dist
/packages/sdk-platform/types
/packages/sdk-fetcher-axios/dist
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.test-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM alpine

WORKDIR /sdk

COPY --from=0 /sdk/packages/sdk-core/spree-storefront-api-v2-sdk-*.tgz /sdk/storefront-api-v2-sdk.tgz
COPY --from=0 /sdk/packages/sdk-storefront/spree-storefront-api-v2-sdk-*.tgz /sdk/storefront-api-v2-sdk.tgz
COPY --from=0 /sdk/packages/sdk-fetcher-axios/spree-storefront-api-v2-sdk-axios-*.tgz /sdk/storefront-api-v2-sdk-axios.tgz
COPY --from=0 /sdk/packages/sdk-fetcher-node-fetch/spree-storefront-api-v2-sdk-node-fetch-*.tgz /sdk/storefront-api-v2-sdk-node-fetch.tgz

Expand Down
127 changes: 114 additions & 13 deletions package-lock.json

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

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"private": true,
"description": "Node module to easily integrate your JavaScript or TypeScript application with Spree API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on",
"scripts": {
"build:sdk": "npm run build --workspace=@spree/storefront-api-v2-sdk",
"build:sdk-core": "npm run build --workspace=@spree/core-api-v2-sdk",
"build:sdk-storefront": "npm run build --workspace=@spree/storefront-api-v2-sdk",
"build:sdk-platform": "npm run build --workspace=@spree/platform-api-v2-sdk",
"build:sdk-fetcher-axios": "npm run build --workspace=@spree/storefront-api-v2-sdk-axios",
"build:sdk-fetcher-fetch": "npm run build --workspace=@spree/storefront-api-v2-sdk-node-fetch",
"build": "npm run build:sdk && npm run build:sdk-fetcher-axios && npm run build:sdk-fetcher-fetch",
"pack:sdk": "npm pack --workspace=@spree/storefront-api-v2-sdk --pack-destination=packages/sdk-core",
"build": "npm run build:sdk-core && npm run build:sdk-storefront && npm run build:sdk-platform && npm run build:sdk-fetcher-axios && npm run build:sdk-fetcher-fetch",
"pack:sdk-storefront": "npm pack --workspace=@spree/storefront-api-v2-sdk --pack-destination=packages/sdk-storefront",
"pack:sdk-platform": "npm pack --workspace=@spree/platform-api-v2-sdk --pack-destination=packages/sdk-platform",
"pack:sdk-fetcher-axios": "npm pack --workspace=@spree/storefront-api-v2-sdk-axios --pack-destination=packages/sdk-fetcher-axios",
"pack:sdk-fetcher-fetch": "npm pack --workspace=@spree/storefront-api-v2-sdk-node-fetch --pack-destination=packages/sdk-fetcher-node-fetch",
"pack": "npm run pack:sdk && npm run pack:sdk-fetcher-axios && npm run pack:sdk-fetcher-fetch",
"pack": "npm run pack:sdk-storefront && npm run pack:sdk-platform && npm run pack:sdk-fetcher-axios && npm run pack:sdk-fetcher-fetch",
"lint": "eslint --ext .ts .",
"test": "./test.sh",
"docs": "typedoc"
Expand All @@ -30,7 +31,7 @@
"sideEffects": false,
"workspaces": [
"packages/sdk-core",
"packages/sdk-platform",
"packages/sdk-storefront",
"packages/sdk-fetcher-axios",
"packages/sdk-fetcher-node-fetch"
],
Expand Down
34 changes: 5 additions & 29 deletions packages/sdk-core/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
{
"name": "@spree/storefront-api-v2-sdk",
"name": "@spree/core-api-v2-sdk",
"version": "5.1.8",
"description": "Node module to easily integrate your JavaScript or TypeScript application with Spree API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on",
"description": "",
"engines": {
"node": ">=14.17.0"
},
"main": "dist/server/index.js",
"main": "dist/index.js",
"types": "types/index.d.ts",
"scripts": {
"prepare": "npm run build",
"build": "webpack",
"build:server": "webpack --config-name server",
"build:client": "webpack --config-name client",
"watch": "webpack --watch",
"watch:server": "webpack --watch --config-name server",
"watch:client": "webpack --watch --config-name client",
"lint": "eslint --ext .ts .",
"lint:fix": "eslint src/**/*.ts --fix",
"test": "./test.sh"
"lint:fix": "eslint src/**/*.ts --fix"
},
"repository": {
"type": "git",
Expand All @@ -33,36 +27,18 @@
"@types/node": "^14.17.11",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"axios": "^0.25.0",
"del": "^6.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.1",
"node-fetch": "^2.6.7",
"prettier": "^2.3.2",
"progress-bar-webpack-plugin": "^2.1.0",
"source-map-loader": "^2.0.2",
"ts-loader": "^8.3.0",
"typescript": "^4.5.2",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-merge": "^5.8.0",
"webpack-node-externals": "^3.0.0"
},
"sideEffects": false,
"peerDependencies": {
"axios": "^0.25.0",
"node-fetch": "^2.6.6"
},
"peerDependenciesMeta": {
"node-fetch": {
"optional": true
},
"axios": {
"optional": true
}
},
"typedoc": {
"entryPoint": "./src/endpoints/index.ts"
}
"sideEffects": false
}
Loading

0 comments on commit b78fe6c

Please sign in to comment.