{"id":23496048,"url":"https://github.com/hkdigital/hkdigital--lib-sveltekit","last_synced_at":"2025-04-15T13:41:42.757Z","repository":{"id":262239320,"uuid":"882207210","full_name":"HKdigital/hkdigital--lib-sveltekit","owner":"HKdigital","description":"Base library that we use to power up our Sveltekit projects","archived":false,"fork":false,"pushed_at":"2025-04-14T13:30:01.000Z","size":5851,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-14T14:28:38.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HKdigital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-02T07:04:05.000Z","updated_at":"2025-04-14T13:30:05.000Z","dependencies_parsed_at":"2024-11-11T11:35:01.927Z","dependency_job_id":"25beeef4-d924-4ec0-a578-f66dd0e8d458","html_url":"https://github.com/HKdigital/hkdigital--lib-sveltekit","commit_stats":null,"previous_names":["hkdigital/hkdigital--lib-sveltekit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKdigital%2Fhkdigital--lib-sveltekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKdigital%2Fhkdigital--lib-sveltekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKdigital%2Fhkdigital--lib-sveltekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKdigital%2Fhkdigital--lib-sveltekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HKdigital","download_url":"https://codeload.github.com/HKdigital/hkdigital--lib-sveltekit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249081639,"owners_count":21209731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T04:10:05.003Z","updated_at":"2025-04-15T13:41:42.744Z","avatar_url":"https://github.com/HKdigital.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HKdigital's lib Sveltekit\n\nBase library that we use to power up our Sveltekit projects\n\nThis is a library for [SvelteKit](https://svelte.dev/) projects.\nIt contains common code and components that we use to create our projects.\n\n## Status\n\n**EARLY DEVELOPMENT RELEASE**\nThis package is incomplete and not fully tested.\nDo not use in production environments yet.\n\n### TODO\n\nAdd information about Skeleton, theming and imagetools\n\n## A note about tailwindcss\n\nComponents in this package use [tailwindcss](https://tailwindcss.com/).\n\nTo compile tailwind classes inside this package, you must add the package location to your tailwindcss plugin configuration (instructions below).\n\n## Using the library\n\n### Install\n\nThe library can be installed as a normal NPM library.\n\n```bash\npnpm add @hkdigital/lib-sveltekit\n```\n\n### Update\n\nWe use a global installion of the `ncu` package to upgrade our `package.json`. Install `ncu` first if you don't have it yet\n\n```bash\nnpm install -g npm-check-updates\n```\n\nUpgrading works as follows:\n\n```bash\nncu \"@hkdigital/*\" -u \u0026\u0026 pnpm install\n```\n\nWe use a wildcard to upgrade all installed `node_modules` in the scope `@hkdigital`.\n\nYou can also add this command to your project. To do so, add the lines to the bottom of the `scripts` section of your `package.json`.\n\n```bash\n\"upgrade:hk\": \"ncu --dep dev,optional,peer,prod '@hkdigital/*' -u \u0026\u0026 pnpm install\",\n\"upgrade:all\": \"ncu -u \u0026\u0026 pnpm install\"\n```\n\n### Import JS \u0026 Svelte\n\nAll exports are in subfolders.\n\nFor example to import a constant from `constants/regexp/index.js`\n\n```svelte\nimport { CHAR } from '@hkdigital/lib-sveltekit/constants/regexp';\n```\n\n### Import CSS\n\nVite should include postcss-import, but the only solution to get it working for now is to use a relative path to the node_modules folder.\n\nFor example:\n\n```css\n/* src/app.css */\n@import '../node_modules/@hkdigital/lib-sveltekit/dist/css/utilities.css';\n```\n\n### Enable tailwind processing\n\nAllow the tailwind CSS processor to work on the library inside node_modules\n\n```js\n// tailwind.config.js\nexport default {\n  content: [\n    './node_modules/@hkdigital/**/*.{html,js,svelte,ts}',\n    './src/**/*.{html,js,svelte,ts}',\n```\n\n## Building the library\n\nTo build your library:\n\n```bash\nnpm run package\n```\n\n## Building the showcase app\n\nTo create a production version of your showcase app:\n\n```bash\nnpm run build\n```\n\nYou can preview the production build with `npm run preview`.\n\n\u003e To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.\n\n## Developing\n\nTo develop this library, clone the repository and install the dependencies, then start the development server of the test runners. Checkout the [package.json](./package.json) file for more details.\n\nEverything inside `src/lib` is part of the library, everything inside `src/routes` is the showcase app of this library.\n\n## Publishing\n\nThe name of this library is `@hkdigital/lib-sveltekit` and it is published on [NPM](https://npmjs.com). You need NPM credentials to publish in the scope `@hkdigital`.\n\n```bash\n# Manually\nnpm login\nnpm version patch\nnpm publish --access public\n```\n\n```bash\n# Run `npm version patch \u0026\u0026 npm publish --access public \u0026\u0026 git push`\n# as specified in package.json\npnpm run publish:npm\n```\n\n## Contribute\n\nIf your wish to contribute to this library, please contact us [HKdigital](https://hkdigital.nl/contact). Alternatively, the license permits you to fork the library and publish under an alternative name. Change the package name in [package.json](./package.json) to do so.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkdigital%2Fhkdigital--lib-sveltekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhkdigital%2Fhkdigital--lib-sveltekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkdigital%2Fhkdigital--lib-sveltekit/lists"}