Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "jsrepojs/example-marketplace" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/flat-carpets-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'example-marketplace': patch
---

initial release
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
pull_request:
branches: [main]

jobs:
CI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint

- name: Check
run: pnpm check

- name: Build Registry
run: pnpm build:registry
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Build & Publish Release
if: github.repository == 'ieedan/shadcn-svelte-extras'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Kit Sync
run: pnpm sync

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
commit: 'chore(release): version package'
title: 'chore(release): version package'
publish: pnpm ci:release
env:
JSREPO_TOKEN: ${{ secrets.JSREPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_ENV: production
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
# example-marketplace
An example of how to monetize your components on the jsrepo.com marketplace.
# @example/marketplace

> Don't purchase this as it is just an example. Unless of course you want to support jsrepo.com ❤️

This is an example of how you might monetize a jsrepo registry on the [jsrepo.com](https://www.jsrepo.com) marketplace.

## Getting Started

1. Create an account on [jsrepo.com](https://www.jsrepo.com/login)

2. Link your account on Stripe Connect by navigating to your [account settings](https://www.jsrepo.com/account/settings) and clicking on `Connect Account`

3. Create an [access token](https://www.jsrepo.com/account/access-tokens) or authenticate to the CLI

```sh
jsrepo auth
```

4. Update your build config with the `access` key set to `marketplace`

```json
{
"access": "marketplace"
}
```

5. Publish to jsrepo.com

```sh
jsrepo publish
```

5. Setup pricing for your registry under the `pricing` tab.

6. List your registry on the marketplace by switching `List on Marketplace` on in the settings for your registry.
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://next.shadcn-svelte.com/schema.json",
"tailwind": {
"css": "src/app.css",
"baseColor": "zinc"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils/utils",
"ui": "$lib/components/ui",
"hooks": "$lib/hooks",
"lib": "$lib"
},
"typescript": true,
"registry": "https://next.shadcn-svelte.com/registry"
}
36 changes: 36 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser, ...globals.node }
},
rules: { 'no-undef': 'off' }
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
// projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
18 changes: 18 additions & 0 deletions jsrepo-build-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://unpkg.com/[email protected]/schemas/registry-config.json",
"name": "@example/marketplace",
"version": "package",
"access": "marketplace",
"readme": "README.md",
"dirs": ["./src/lib", "./src/lib/components"],
"doNotListBlocks": [],
"doNotListCategories": ["ui", "hooks", "utils"],
"listBlocks": [],
"listCategories": [],
"excludeDeps": ["svelte", "@sveltejs/kit"],
"includeBlocks": [],
"includeCategories": ["utils", "icons", "blocks", "ui", "hooks"],
"excludeBlocks": [],
"excludeCategories": [],
"preview": false
}
15 changes: 15 additions & 0 deletions jsrepo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/[email protected]/schemas/project-config.json",
"repos": ["@ieedan/shadcn-svelte-extras"],
"includeTests": false,
"watermark": true,
"formatter": "prettier",
"configFiles": {},
"paths": {
"*": "./src/lib/blocks",
"ui": "$lib/components/ui",
"actions": "$lib/actions",
"hooks": "$lib/hooks",
"utils": "$lib/utils"
}
}
64 changes: 64 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "example-marketplace",
"private": true,
"version": "0.0.2",
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"release:registry": "jsrepo publish",
"build:registry": "jsrepo build"
},
"devDependencies": {
"@eslint/compat": "^1.2.9",
"@eslint/js": "^9.27.0",
"@fontsource-variable/geist-mono": "^5.2.6",
"@fontsource-variable/inter": "^5.2.5",
"@lucide/svelte": "^0.511.0",
"@sveltejs/adapter-vercel": "^5.7.2",
"@sveltejs/kit": "^2.21.1",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tailwindcss/vite": "^4.1.7",
"bits-ui": "1.5.2",
"clsx": "^2.1.1",
"eslint": "^9.27.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-svelte": "^3.8.1",
"formsnap": "^2.0.1",
"globals": "^16.1.0",
"mode-watcher": "^1.0.7",
"prettier": "^3.5.3",
"prettier-plugin-svelte": "^3.4.0",
"prettier-plugin-tailwindcss": "^0.6.11",
"svelte": "5.30.2",
"svelte-check": "^4.2.1",
"svelte-sonner": "^1.0.1",
"sveltekit-superforms": "^2.25.0",
"tailwind-merge": "^3.3.0",
"tailwind-variants": "^1.0.0",
"tailwindcss": "^4.1.7",
"tw-animate-css": "^1.3.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.32.1",
"valibot": "^1.1.0",
"vite": "^6.3.5"
},
"dependencies": {
"@changesets/cli": "^2.29.4",
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
"jsrepo": "^2.0.3"
},
"pnpm": {
"onlyBuiltDependencies": [
"@tailwindcss/oxide",
"esbuild"
]
}
}
Loading