Skip to content

Commit

Permalink
readme files
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-segning committed Dec 17, 2024
1 parent a89dc7e commit c117ebe
Show file tree
Hide file tree
Showing 14 changed files with 224 additions and 32 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ jobs:
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: npm publish --access public

- run: yarn install --immutable
name: Install dependencies

- run: npm run build -ws
name: Build packages

- run: npm publish --access public -ws
name: Publish packages
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

6 changes: 4 additions & 2 deletions packages/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
**/dist
dist

tsconfig.tsbuildinfo
**/tsconfig.tsbuildinfo

generated
generated

.yarn
Binary file removed packages/.yarn/install-state.gz
Binary file not shown.
46 changes: 46 additions & 0 deletions packages/vymalo-keycloak/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# MedusaJS Keycloak

Login your medusa clients with Keycloak

## Installation

```bash
npm install @vymalo/medusa-keycloak
```

or if using yarn

```bash
yarn add @vymalo/medusa-keycloak
```

## Usage
To use this plugin, you should add it into the `modules` section of your MedusaJS configuration.

```typescript
modules: [
...
{
resolve: '@medusajs/medusa/auth',
options: {
providers: [
{
resolve: `@vymalo/medusa-keycloak`,
id: 'ssegning',
options: {
url: process.env.KEYCLOAK_URL,
realm: process.env.KEYCLOAK_REALM,
clientId: process.env.KEYCLOAK_CLIENT_SECRET,
clientSecret: process.env.KEYCLOAK_CLIENT_SECRET,
},
},
{
resolve: '@medusajs/medusa/auth-emailpass',
id: 'emailpass',
options: {},
},
],
},
},
...
```
2 changes: 1 addition & 1 deletion packages/vymalo-keycloak/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"main": "dist/index.js",
"scripts": {
"build": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && tsc --build"
"build": "rm -rf {dist,tsconfig.tsbuildinfo} && tsc --build"
},
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/vymalo-mail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"main": "dist/index.js",
"scripts": {
"build": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && tsc --build"
"build": "rm -rf {dist,tsconfig.tsbuildinfo} && tsc --build"
},
"keywords": [],
"author": "",
Expand Down
58 changes: 36 additions & 22 deletions packages/vymalo-meilisearch/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# MedusaJS Mail templates
# MedusaJS meilisearch

This package provides a set of mail templates for MedusaJS.
It is based on
- email-templates
- preview-email
Index your MedusaJS data in Meilisearch

## Installation

```bash
npm install @vymalo/medusa-mail
npm install @vymalo/medusa-meilisearch
```

or if using yarn

```bash
yarn add @vymalo/medusa-mail
yarn add @vymalo/medusa-meilisearch
```

## Usage
Expand All @@ -24,26 +21,43 @@ To use this plugin, you should add it into the `modules` section of your MedusaJ
modules: [
...
{
resolve: "@medusajs/medusa/notification",
resolve: '@vymalo/medusa-meilisearch',
options: {
providers: [
{
resolve: `@vymalo/medusa-mail`,
id: "ssegning",
options: {
channels: ["email"],
message: {
from: "[email protected]",
},
send: process.env.NODE === "production",
preview: false,
transport: "smtp://localhost:1025",
config: {
host: process.env.MEILISEARCH_HOST,
apiKey: process.env.MEILISEARCH_API_KEY,
},
settings: {
[SearchUtils.indexTypes.PRODUCTS]: {
indexSettings: {
searchableAttributes: ['title', 'description', 'variant_sku'],
displayedAttributes: ['title', 'description', 'variant_sku', 'thumbnail', 'handle'],
},
primaryKey: 'id',
},
],
},
},
},
...
```
The options are from the nodemailer package, so you can use any of the options from there.
## Hack
Because it's not yet clear how to handle plugins in MedusaJS, we have to hack a bit to get this working.
First:
```bash
mkdir -p plugins/printful-hack
ln -s node_modules/@vymalo/medusa-meilisearch/dist plugins/printful-hack/src
# Write a fake package.json file in the plugins/printful-hack directory
echo "{\"name\":\"meilisearch-hack\",\"version\":\"1.0.0\"}" > plugins/printful-hack/package.json
```
In your `medusa-config.js` file, add the following code:
```typescript
plugins: [
...
{
resolve: `./plugins/meilisearch-hack`, // TODO: Change this to the correct path
options: {},
},
```
2 changes: 1 addition & 1 deletion packages/vymalo-meilisearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"./jobs/*": "./dist/jobs/*.js"
},
"scripts": {
"build": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && tsc --build"
"build": "rm -rf {dist,tsconfig.tsbuildinfo} && tsc --build"
},
"keywords": [],
"author": "",
Expand Down
45 changes: 45 additions & 0 deletions packages/vymalo-minio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# MedusaJS Minio

Upload medusajs files to Minio

## Installation

```bash
npm install @vymalo/medusa-minio
```

or if using yarn

```bash
yarn add @vymalo/medusa-minio
```

## Usage
To use this plugin, you should add it into the `modules` section of your MedusaJS configuration.

```typescript
modules: [
...
{
resolve: '@medusajs/medusa/file',
options: {
providers: [
{
resolve: '@vymalo/medusa-minio',
id: 'minio',
options: {
endpoint: process.env.MINIO_ENDPOINT,
cdn_url: process.env.MINIO_CDN_URL,
bucket: process.env.MINIO_BUCKET,
private_bucket: process.env.MINIO_PRIVATE_BUCKET?.length
? process.env.MINIO_PRIVATE_BUCKET
: process.env.MINIO_BUCKET,
access_key_id: process.env.MINIO_ACCESS_KEY,
secret_access_key: process.env.MINIO_SECRET_KEY,
},
},
],
},
},
...
```
2 changes: 1 addition & 1 deletion packages/vymalo-minio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"main": "dist/index.js",
"scripts": {
"build": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && tsc --build"
"build": "rm -rf {dist,tsconfig.tsbuildinfo} && tsc --build"
},
"keywords": [],
"author": "",
Expand Down
75 changes: 75 additions & 0 deletions packages/vymalo-printful/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# MedusaJS Printful

Connect your MedusaJS store to Printful

## Installation

```bash
npm install @vymalo/medusa-printful
```

or if using yarn

```bash
yarn add @vymalo/medusa-printful
```

## Usage
To use this plugin, you should add it into the `modules` section of your MedusaJS configuration.

```typescript
modules: [
...
{
resolve: '@medusajs/medusa/fulfillment',
options: {
providers: [
...
{
resolve: '@vymalo/medusa-printful/printful-fulfillment',
id: 'printful',
options: {},
},
],
},
dependencies: [PrintfulModules.printful],
},
{
resolve: '@vymalo/medusa-printful/printful',
options: {
enableWebhooks: true,
printfulAccessToken: process.env.PRINTFUL_ACCESS_TOKEN,
storeId: process.env.PRINTFUL_STORE_ID,
logo_url: process.env.PRINTFUL_LOGO_URL,
backendUrl: process.env.PRINTFUL_BACKEND_URL,
confirmOrder: false,
},
dependencies: [
Modules.PRODUCT,
Modules.FULFILLMENT,
Modules.PRICING,
],
},
...
```
## Hack
Because it's not yet clear how to handle plugins in MedusaJS, we have to hack a bit to get this working.
First:
```bash
mkdir -p plugins/printful-hack
ln -s node_modules/@vymalo/medusa-meilisearch/dist plugins/printful-hack/src
# Write a fake package.json file in the plugins/printful-hack directory
echo "{\"name\":\"printful-hack\",\"version\":\"1.0.0\"}" > plugins/printful-hack/package.json
```
In your `medusa-config.js` file, add the following code:
```typescript
plugins: [
...
{
resolve: `./plugins/printful-hack`, // TODO: Change this to the correct path
options: {},
},
```
2 changes: 1 addition & 1 deletion packages/vymalo-printful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"./*": "./dist/modules/*/index.js"
},
"scripts": {
"prod:build": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && tsc --build",
"prod:build": "rm -rf {dist,tsconfig.tsbuildinfo} && tsc --build",
"gen:printful": "cross-env rimraf src/core/generated/printful && openapi-ts",
"build": "yarn gen:printful && yarn prod:build"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/vymalo-ui-preset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Vymalo UI Preset

Tailwind CSS preset for Vymalo projects.
2 changes: 1 addition & 1 deletion packages/vymalo-ui-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"main": "dist/index.js",
"scripts": {
"build": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && tsc --build"
"build": "rm -rf {dist,tsconfig.tsbuildinfo} && tsc --build"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit c117ebe

Please sign in to comment.