Skip to content

Commit

Permalink
fix(): build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Yousuf Jawwad committed Feb 25, 2024
1 parent 85e4df7 commit 5788243
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ icons/**
index.*
client.*
.svelte-kit
package
icons/
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"exports": {
".": {
"types": "./index.d.ts",
"svelte": "./index.js",
"import": "./index.js"
},
"./package.json": "./package.json"
Expand All @@ -38,7 +39,7 @@
],
"scripts": {
"clean": "rm -rf index.* package",
"build": "pnpm clean && pnpm check && svelte-package && node ./scripts/clean_package.js && rm -rf package",
"build": "pnpm clean && pnpm check && svelte-package && node ./scripts/clean_package.js",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"clean:icons": "rm -rf ./src/lib/icons/**",
Expand All @@ -53,6 +54,7 @@
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.5.0",
"@sveltejs/package": "^2.2.5",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"signale": "^1.4.0",
"simple-icons": "11.5.0",
"svelte": "^4.2.0",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion scripts/clean_package.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (__dirname.match(/^\/\w:\//)) {
}

const root = path.join(__dirname, "..");
const pkgDir = path.join(root, "package");
const pkgDir = path.join(root, ".svelte-kit/__package__");

await fs.cp(pkgDir, root, {
recursive: true,
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rootDir = path.join(__dirname, "..");
const dir = path.join(rootDir, "src/lib/");
const outputComponent = "src/lib/icons";

const pathIndexExport = path.join(rootDir, "src/lib", "index.js");
const pathIndexExport = path.join(rootDir, "src/lib", "index.ts");

const ICONS = Object.keys(SimpleIcons);

Expand Down
2 changes: 1 addition & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from "@sveltejs/adapter-auto";
import { vitePreprocess } from "@sveltejs/kit/vite";
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand Down

0 comments on commit 5788243

Please sign in to comment.