{"_id":"@dympydev/nx-sveltekit","_rev":"9-cf2446c3d6dba627ba3bbc28af766856","name":"@dympydev/nx-sveltekit","dist-tags":{"latest":"1.1.1","alpha":"1.1.0-alpha.2"},"versions":{"1.0.0-alpha.1":{"name":"@dympydev/nx-sveltekit","version":"1.0.0-alpha.1","type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{"@nrwl/devkit":"16.2.2","@nx/devkit":"16.2.2"},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"008adcf3f87fca8bcf97ac2b2272fd6b2be3b56b","description":"Using these generators/executors you can easily add a Svelte-kit application to your NX monorepo. Based on the create-svelte package, you can choose between a number of different templates, as well als adapters.","_id":"@dympydev/nx-sveltekit@1.0.0-alpha.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-C6zUeGb2omGdYcZKIWHmXfhu2AavqJxm/CUSgzCL4TzQulUIwZq8BwC88EM0ApNIi9oM5Q7iTJvGAy1QKYZn8w==","shasum":"03e0ba110547e0e799f7029c4711cbedfa67ad60","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.0.0-alpha.1.tgz","fileCount":127,"unpackedSize":876638,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBmJYD3LvuvI35uSSOiAo1t0/8CHbpCHXI4i94c0L763AiBI4pAnJdmNYGl1Q1Xv2Kd8qPskOdT192xwbdWpjooDwQ=="}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.0.0-alpha.1_1685998235918_0.6554761093983519"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"@dympydev/nx-sveltekit","version":"1.0.0-alpha.2","type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{"@nrwl/devkit":"16.2.2","@nx/devkit":"16.2.2","@nx/js":"16.2.2"},"main":"./src/index.js","types":"./src/index.d.ts","readme":"# @dympydev/nx-sveltekit\n\nUsing these generators/executors you can easily add a Svelte-kit application to your NX monorepo.\nBased on the create-svelte package, you can choose between a number of different templates, as well als adapters.\n\n## Generators:\n\n### application\n\nThe application-generator allows you to add SvelteKit application, based on the provided tempalte, to your NX-monorepo. During the setup you can also pick which adapter it should use (though the default options are somehwat limited).\n\n| Property | Default  | Description                                                                                    |\n| -------- | -------- | ---------------------------------------------------------------------------------------------- |\n| name     |          | The name for this new NX application.                                                          |\n| template | skeleton | The template to use (adopted from the create-svelte package), options are \"skeleton\" or \"demo\" |\n| adapter  | auto     | The adapter to use, options are \"auto\", \"node\" and \"static\"                                    |\n\n### route\n\nThe route-generator allows you to add a route to your application using a `+page.svelte` file, along with any data-loading code if required. When adding a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                             |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------- |\n| route      |         | The route you want to add, when including argument (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the route to. Generator fails if there is no `svelte.config.js`-file present. |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+page.ts`-file)                                  |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+page.server.ts`-file)               |\n\n### layout\n\nThe layout-generator adds a `+layout.svelte` file with a default slot at the path you've provided, along with any data-loading code if required. When adding a layout to a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                                                    |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| route      |         | The route where you want to add the layout, when route includes arguments (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the layout to. Generator fails if there is no `svelte.config.js`-file present.                       |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+layout.ts`-file)                                                       |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+layout.server.ts`-file)                                    |\n\n## Executors:\n\n### build\n\nThe build-executor uses the \"nx:run-commands\"-executor to run the `vite build`-command to build the application. After a build, it copies over the output to the provided \"distPath\"-option (which, when using the application-generator, defaults to the dist folder in the root of the monorepo).\n\n| Option                | Required | Description                                                                                                  |\n| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |\n| distPath              | Yes      | The distPath where all generated output should be copied to.                                                 |\n| envFile               | No       | Location of an optional env-file that should be used while building.                                         |\n| copyPackageJson       | No       | Whether or not the root-package.json should be copied over the distPath.                                     |\n| packageJsonExclusions | No       | A list of (dev) dependency packages you don't need or want in your SvelteKit-package.json (such as \"@nx/\\*\") |\n\n### serve\n\nThe serve-executor uses the \"nx:run-commands\"-executor to run the `vite dev`-command to serve the application.\n\n| Option  | Required | Description                                                          |\n| ------- | -------- | -------------------------------------------------------------------- |\n| envFile | No       | Location of an optional env-file that should be used while building. |\n\n### preview\n\nThe preview-executor uses the \"nx:run-commands\"-executor to run the `vite preview`-command to preview the previously build application. This executor depends on the build target, something that is configured automatically when using the application-generator.\n\nThis executor does not have any options (yet).\n\n### test\n\nThe test-executor uses the \"nx:run-commands\"-executor to run the `vitest`-command to run the unit-tests for the application. By default it will just run the tests once and then finish, but there is an option to run it in watch-mode.\n\n| Option | Required | Description                          |\n| ------ | -------- | ------------------------------------ |\n| watch  | No       | Starts the unit-tests in watch mode. |\n\n### e2e\n\nThe e2e-executor uses the \"nx:run-commands\"-executor to run the `playwright test`-command to run the E2E tests. Before running the tests it will always execute a `npx playwright install`-command, just to make sure everything is in place for the playwright tests.\n\nThis executor does not have any options (yet).\n\n### check\n\nThe check-executor uses the \"nx:run-commands\"-executor to run the `svelte-check`-command, as well as the `svelte-kit sync`-command. The sync command will update the generated files (such as the types and whatnot) and the check command will provide different diagnostics for your svelte app (not a replacement for the linter!). By default it will just run these commands once and then finish, but there is an option to run the check-command in watch-mode.\n\n| Option | Required | Description                                      |\n| ------ | -------- | ------------------------------------------------ |\n| watch  | No       | Starts the `svelte-check`-command in watch mode. |\n\n## A little bit of black magic:\n\nWhile most of the generated application is straight out off the `create-svelte`-package, I did add a little bit of black magic to make things work nicely with NX. It mainly comes down to:\n\n- Allowing imports from the root of the monorepo, so we can access shared libraries and such.\n- Generating SvelteKit aliases based on the tsconfig.base.json from the root of the monorepo.\n\nThe first part is rather easy, when generating the application, I take the project-path we're generating (relative to the root of the monorepo) and convert that to a \"projectDepth\" constant. This constant basically consists of the number of `../` we have to do to reach the root of the monorepo from the application-folder. Then, while generating the vite.config.ts, we add this \"projectDepth\" to the `server.fs.allow`-property, so the vite dev server is allowed to load files from the complete monorepo and not just the application itself.\n\nThe second piece of black magic, is a little more magical than the first. Because SvelteKit uses Vite under the hood, we have access to aliases. SvelteKit uses this out-of-the-box for stuff like `$lib`, but we can extend this to add the `compilerOptions.paths` from our tsconfig.base.json from the root of the monorepo. This way, you can simply import from `@your-repo-scope/your-library` in your .ts/.js/.svelte files (in case of the .svelte files there's a known limitation regarding the dependency-graph, see below). We achieve this by requiring the tsconfig file, grabbing the `compilerOptions.paths` and converting them to aliases with a little help from `Object.entries` and `Array.reduce`.\n\n## Known limitations:\n\nSadly, there are a few things that are not quite going the way I would like them to go. I will document these limitations here, but also as issues on the GitHub-issues tab so we have a place to track progress!\n\nThe current known limitations are:\n\n- **No library generator:** Right now we only support applications, routes and layouts, but the create-svelte package also has a preset for libraries. I want to add this as well, along with options to distinguish between workspace and publishable libraries.\n- **`.svelte`-files in the dep-graph:** When you import a workspace-library in a ts or js file inside the SvelteKit application source, it correctly shows up in the dependency-graph. However, when importing one of these libraries in a \".svelte\"-file, it is missing. The great folks over at Nrwl have [documented how to extend the dependency-graph](https://nx.dev/plugins/recipes/project-graph-plugins), but I haven't had the time to add it as of now.\n- **A nice NX-starting page as application template option:** Both React and Angular get this nice NX getting-started page when you generate a new application. I want to recreate that for the SvelteKit applications, just because it's fun!\n","readmeFilename":"README.md","gitHead":"008adcf3f87fca8bcf97ac2b2272fd6b2be3b56b","description":"Using these generators/executors you can easily add a Svelte-kit application to your NX monorepo. Based on the create-svelte package, you can choose between a number of different templates, as well als adapters.","_id":"@dympydev/nx-sveltekit@1.0.0-alpha.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-CbwXAeV35fMMyKBGurF7AcaVHDBplOElKHg/COKMMJN+NX1eNDyUtyRXUD99e7L2AjuLs8V3h7waGQ6Bh2zehw==","shasum":"c357503658a1345623e7679c6973073a2a374d6a","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.0.0-alpha.2.tgz","fileCount":127,"unpackedSize":877324,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7PuGy9ifZLj3xamNyomCpj7P75oFcugDYmBBb+XvBeAIhAIPBU/NxD1PWqKcdJTeNBjt9F3tGqqBLFVEQzk6bSbMl"}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.0.0-alpha.2_1686034454398_0.23196655333648297"},"_hasShrinkwrap":false},"1.0.0-alpha.3":{"name":"@dympydev/nx-sveltekit","description":"A set of NX generators and executors for SvelteKit apps","version":"1.0.0-alpha.3","homepage":"https://github.com/dympydev/nx-plugins/libs/nx-sveltekit#readme","repository":{"type":"git","url":"git+https://github.com/dympydev/nx-plugins.git"},"type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{"@nrwl/devkit":"16.2.2","@nx/devkit":"16.2.2"},"main":"./src/index.js","types":"./src/index.d.ts","readme":"# @dympydev/nx-sveltekit\n\nUsing these generators/executors you can easily add a Svelte-kit application to your NX monorepo.\nBased on the create-svelte package, you can choose between a number of different templates, as well als adapters.\n\n## Generators:\n\n### application\n\nThe application-generator allows you to add SvelteKit application, based on the provided tempalte, to your NX-monorepo. During the setup you can also pick which adapter it should use (though the default options are somehwat limited).\n\n| Property | Default  | Description                                                                                    |\n| -------- | -------- | ---------------------------------------------------------------------------------------------- |\n| name     |          | The name for this new NX application.                                                          |\n| template | skeleton | The template to use (adopted from the create-svelte package), options are \"skeleton\" or \"demo\" |\n| adapter  | auto     | The adapter to use, options are \"auto\", \"node\" and \"static\"                                    |\n\n### route\n\nThe route-generator allows you to add a route to your application using a `+page.svelte` file, along with any data-loading code if required. When adding a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                             |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------- |\n| route      |         | The route you want to add, when including argument (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the route to. Generator fails if there is no `svelte.config.js`-file present. |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+page.ts`-file)                                  |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+page.server.ts`-file)               |\n\n### layout\n\nThe layout-generator adds a `+layout.svelte` file with a default slot at the path you've provided, along with any data-loading code if required. When adding a layout to a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                                                    |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| route      |         | The route where you want to add the layout, when route includes arguments (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the layout to. Generator fails if there is no `svelte.config.js`-file present.                       |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+layout.ts`-file)                                                       |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+layout.server.ts`-file)                                    |\n\n## Executors:\n\n### build\n\nThe build-executor uses the \"nx:run-commands\"-executor to run the `vite build`-command to build the application. After a build, it copies over the output to the provided \"distPath\"-option (which, when using the application-generator, defaults to the dist folder in the root of the monorepo).\n\n| Option                | Required | Description                                                                                                  |\n| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |\n| distPath              | Yes      | The distPath where all generated output should be copied to.                                                 |\n| envFile               | No       | Location of an optional env-file that should be used while building.                                         |\n| copyPackageJson       | No       | Whether or not the root-package.json should be copied over the distPath.                                     |\n| packageJsonExclusions | No       | A list of (dev) dependency packages you don't need or want in your SvelteKit-package.json (such as \"@nx/\\*\") |\n\n### serve\n\nThe serve-executor uses the \"nx:run-commands\"-executor to run the `vite dev`-command to serve the application.\n\n| Option  | Required | Description                                                          |\n| ------- | -------- | -------------------------------------------------------------------- |\n| envFile | No       | Location of an optional env-file that should be used while building. |\n\n### preview\n\nThe preview-executor uses the \"nx:run-commands\"-executor to run the `vite preview`-command to preview the previously build application. This executor depends on the build target, something that is configured automatically when using the application-generator.\n\nThis executor does not have any options (yet).\n\n### test\n\nThe test-executor uses the \"nx:run-commands\"-executor to run the `vitest`-command to run the unit-tests for the application. By default it will just run the tests once and then finish, but there is an option to run it in watch-mode.\n\n| Option | Required | Description                          |\n| ------ | -------- | ------------------------------------ |\n| watch  | No       | Starts the unit-tests in watch mode. |\n\n### e2e\n\nThe e2e-executor uses the \"nx:run-commands\"-executor to run the `playwright test`-command to run the E2E tests. Before running the tests it will always execute a `npx playwright install`-command, just to make sure everything is in place for the playwright tests.\n\nThis executor does not have any options (yet).\n\n### check\n\nThe check-executor uses the \"nx:run-commands\"-executor to run the `svelte-check`-command, as well as the `svelte-kit sync`-command. The sync command will update the generated files (such as the types and whatnot) and the check command will provide different diagnostics for your svelte app (not a replacement for the linter!). By default it will just run these commands once and then finish, but there is an option to run the check-command in watch-mode.\n\n| Option | Required | Description                                      |\n| ------ | -------- | ------------------------------------------------ |\n| watch  | No       | Starts the `svelte-check`-command in watch mode. |\n\n## A little bit of black magic:\n\nWhile most of the generated application is straight out off the `create-svelte`-package, I did add a little bit of black magic to make things work nicely with NX. It mainly comes down to:\n\n- Allowing imports from the root of the monorepo, so we can access shared libraries and such.\n- Generating SvelteKit aliases based on the tsconfig.base.json from the root of the monorepo.\n\nThe first part is rather easy, when generating the application, I take the project-path we're generating (relative to the root of the monorepo) and convert that to a \"projectDepth\" constant. This constant basically consists of the number of `../` we have to do to reach the root of the monorepo from the application-folder. Then, while generating the vite.config.ts, we add this \"projectDepth\" to the `server.fs.allow`-property, so the vite dev server is allowed to load files from the complete monorepo and not just the application itself.\n\nThe second piece of black magic, is a little more magical than the first. Because SvelteKit uses Vite under the hood, we have access to aliases. SvelteKit uses this out-of-the-box for stuff like `$lib`, but we can extend this to add the `compilerOptions.paths` from our tsconfig.base.json from the root of the monorepo. This way, you can simply import from `@your-repo-scope/your-library` in your .ts/.js/.svelte files (in case of the .svelte files there's a known limitation regarding the dependency-graph, see below). We achieve this by requiring the tsconfig file, grabbing the `compilerOptions.paths` and converting them to aliases with a little help from `Object.entries` and `Array.reduce`.\n\n## Known limitations:\n\nSadly, there are a few things that are not quite going the way I would like them to go. I will document these limitations here, but also as issues on the GitHub-issues tab so we have a place to track progress!\n\nThe current known limitations are:\n\n- **No library generator:** Right now we only support applications, routes and layouts, but the create-svelte package also has a preset for libraries. I want to add this as well, along with options to distinguish between workspace and publishable libraries.\n- **`.svelte`-files in the dep-graph:** When you import a workspace-library in a ts or js file inside the SvelteKit application source, it correctly shows up in the dependency-graph. However, when importing one of these libraries in a \".svelte\"-file, it is missing. The great folks over at Nrwl have [documented how to extend the dependency-graph](https://nx.dev/plugins/recipes/project-graph-plugins), but I haven't had the time to add it as of now.\n- **A nice NX-starting page as application template option:** Both React and Angular get this nice NX getting-started page when you generate a new application. I want to recreate that for the SvelteKit applications, just because it's fun!\n","readmeFilename":"README.md","gitHead":"008adcf3f87fca8bcf97ac2b2272fd6b2be3b56b","bugs":{"url":"https://github.com/dympydev/nx-plugins/issues"},"_id":"@dympydev/nx-sveltekit@1.0.0-alpha.3","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-jAqzY0QFfKaZBYotI1bx/Uqn3D+zH8dRgXTMvHeHl1kLFxXr5MmfvuFllWkFjni/jpd6Xm4+FOprbX33ABxKKA==","shasum":"ee9f821b9047b670d0ea929d27450bbd75a6bd28","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.0.0-alpha.3.tgz","fileCount":127,"unpackedSize":877801,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTdbIL2E6PUiKs8wFmFp2B/eBZQN135Zn2Zw4te+BVTAIgZdttAKpObbqRd6hg/nuXU1I2Bqv8wg7bjQ5Cz97gFh4="}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.0.0-alpha.3_1686036744344_0.8262306426690482"},"_hasShrinkwrap":false},"1.0.0-alpha.4":{"name":"@dympydev/nx-sveltekit","description":"A set of NX generators and executors for SvelteKit apps","version":"1.0.0-alpha.4","homepage":"https://github.com/dympydev/nx-plugins/libs/nx-sveltekit#readme","repository":{"type":"git","url":"git+https://github.com/dympydev/nx-plugins.git"},"type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{"@nrwl/devkit":"16.2.2","@nx/devkit":"16.2.2"},"main":"./src/index.js","types":"./src/index.d.ts","readme":"# @dympydev/nx-sveltekit\n\nUsing these generators/executors you can easily add a Svelte-kit application to your NX monorepo.\nBased on the create-svelte package, you can choose between a number of different templates, as well als adapters.\n\n## Generators:\n\n### application\n\nThe application-generator allows you to add SvelteKit application, based on the provided tempalte, to your NX-monorepo. During the setup you can also pick which adapter it should use (though the default options are somehwat limited).\n\n| Property | Default  | Description                                                                                    |\n| -------- | -------- | ---------------------------------------------------------------------------------------------- |\n| name     |          | The name for this new NX application.                                                          |\n| template | skeleton | The template to use (adopted from the create-svelte package), options are \"skeleton\" or \"demo\" |\n| adapter  | auto     | The adapter to use, options are \"auto\", \"node\" and \"static\"                                    |\n\n### route\n\nThe route-generator allows you to add a route to your application using a `+page.svelte` file, along with any data-loading code if required. When adding a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                             |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------- |\n| route      |         | The route you want to add, when including argument (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the route to. Generator fails if there is no `svelte.config.js`-file present. |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+page.ts`-file)                                  |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+page.server.ts`-file)               |\n\n### layout\n\nThe layout-generator adds a `+layout.svelte` file with a default slot at the path you've provided, along with any data-loading code if required. When adding a layout to a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                                                    |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| route      |         | The route where you want to add the layout, when route includes arguments (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the layout to. Generator fails if there is no `svelte.config.js`-file present.                       |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+layout.ts`-file)                                                       |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+layout.server.ts`-file)                                    |\n\n## Executors:\n\n### build\n\nThe build-executor uses the \"nx:run-commands\"-executor to run the `vite build`-command to build the application. After a build, it copies over the output to the provided \"distPath\"-option (which, when using the application-generator, defaults to the dist folder in the root of the monorepo).\n\n| Option                | Required | Description                                                                                                  |\n| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |\n| distPath              | Yes      | The distPath where all generated output should be copied to.                                                 |\n| envFile               | No       | Location of an optional env-file that should be used while building.                                         |\n| copyPackageJson       | No       | Whether or not the root-package.json should be copied over the distPath.                                     |\n| packageJsonExclusions | No       | A list of (dev) dependency packages you don't need or want in your SvelteKit-package.json (such as \"@nx/\\*\") |\n\n### serve\n\nThe serve-executor uses the \"nx:run-commands\"-executor to run the `vite dev`-command to serve the application.\n\n| Option  | Required | Description                                                          |\n| ------- | -------- | -------------------------------------------------------------------- |\n| envFile | No       | Location of an optional env-file that should be used while building. |\n\n### preview\n\nThe preview-executor uses the \"nx:run-commands\"-executor to run the `vite preview`-command to preview the previously build application. This executor depends on the build target, something that is configured automatically when using the application-generator.\n\nThis executor does not have any options (yet).\n\n### test\n\nThe test-executor uses the \"nx:run-commands\"-executor to run the `vitest`-command to run the unit-tests for the application. By default it will just run the tests once and then finish, but there is an option to run it in watch-mode.\n\n| Option | Required | Description                          |\n| ------ | -------- | ------------------------------------ |\n| watch  | No       | Starts the unit-tests in watch mode. |\n\n### e2e\n\nThe e2e-executor uses the \"nx:run-commands\"-executor to run the `playwright test`-command to run the E2E tests. Before running the tests it will always execute a `npx playwright install`-command, just to make sure everything is in place for the playwright tests.\n\nThis executor does not have any options (yet).\n\n### check\n\nThe check-executor uses the \"nx:run-commands\"-executor to run the `svelte-check`-command, as well as the `svelte-kit sync`-command. The sync command will update the generated files (such as the types and whatnot) and the check command will provide different diagnostics for your svelte app (not a replacement for the linter!). By default it will just run these commands once and then finish, but there is an option to run the check-command in watch-mode.\n\n| Option | Required | Description                                      |\n| ------ | -------- | ------------------------------------------------ |\n| watch  | No       | Starts the `svelte-check`-command in watch mode. |\n\n## A little bit of black magic:\n\nWhile most of the generated application is straight out off the `create-svelte`-package, I did add a little bit of black magic to make things work nicely with NX. It mainly comes down to:\n\n- Allowing imports from the root of the monorepo, so we can access shared libraries and such.\n- Generating SvelteKit aliases based on the tsconfig.base.json from the root of the monorepo.\n\nThe first part is rather easy, when generating the application, I take the project-path we're generating (relative to the root of the monorepo) and convert that to a \"projectDepth\" constant. This constant basically consists of the number of `../` we have to do to reach the root of the monorepo from the application-folder. Then, while generating the vite.config.ts, we add this \"projectDepth\" to the `server.fs.allow`-property, so the vite dev server is allowed to load files from the complete monorepo and not just the application itself.\n\nThe second piece of black magic, is a little more magical than the first. Because SvelteKit uses Vite under the hood, we have access to aliases. SvelteKit uses this out-of-the-box for stuff like `$lib`, but we can extend this to add the `compilerOptions.paths` from our tsconfig.base.json from the root of the monorepo. This way, you can simply import from `@your-repo-scope/your-library` in your .ts/.js/.svelte files (in case of the .svelte files there's a known limitation regarding the dependency-graph, see below). We achieve this by requiring the tsconfig file, grabbing the `compilerOptions.paths` and converting them to aliases with a little help from `Object.entries` and `Array.reduce`.\n\n## Known limitations:\n\nSadly, there are a few things that are not quite going the way I would like them to go. I will document these limitations here, but also as issues on the GitHub-issues tab so we have a place to track progress!\n\nThe current known limitations are:\n\n- **No library generator:** Right now we only support applications, routes and layouts, but the create-svelte package also has a preset for libraries. I want to add this as well, along with options to distinguish between workspace and publishable libraries.\n- **`.svelte`-files in the dep-graph:** When you import a workspace-library in a ts or js file inside the SvelteKit application source, it correctly shows up in the dependency-graph. However, when importing one of these libraries in a \".svelte\"-file, it is missing. The great folks over at Nrwl have [documented how to extend the dependency-graph](https://nx.dev/plugins/recipes/project-graph-plugins), but I haven't had the time to add it as of now.\n- **A nice NX-starting page as application template option:** Both React and Angular get this nice NX getting-started page when you generate a new application. I want to recreate that for the SvelteKit applications, just because it's fun!\n","readmeFilename":"README.md","gitHead":"008adcf3f87fca8bcf97ac2b2272fd6b2be3b56b","bugs":{"url":"https://github.com/dympydev/nx-plugins/issues"},"_id":"@dympydev/nx-sveltekit@1.0.0-alpha.4","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-cjzndSJgPZ8ju5bj/zq3kLy7VP5SuYCtkCzH3X8AzPcwc04wAOG+zUY5Q3ezMvR/zQvmfFlwham6lZQHk9w9yA==","shasum":"141cfe8307bf64e19b963eafff18500893668460","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.0.0-alpha.4.tgz","fileCount":127,"unpackedSize":877963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHB5t0W8FTZYgJEuHDiXLoN5r0R1V3WA182pMoVOOcHtAiEA58rSeUN8yjMZH02uraV2z5WxsDiW0yKqlJzzFT94O04="}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.0.0-alpha.4_1686037309973_0.12560251111047305"},"_hasShrinkwrap":false},"1.0.0":{"name":"@dympydev/nx-sveltekit","description":"A set of NX generators and executors for SvelteKit apps","version":"1.0.0","homepage":"https://github.com/dympydev/nx-plugins/libs/nx-sveltekit#readme","repository":{"type":"git","url":"git+https://github.com/dympydev/nx-plugins.git"},"type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{"@nrwl/devkit":"16.2.2","@nx/devkit":"16.2.2"},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"008adcf3f87fca8bcf97ac2b2272fd6b2be3b56b","bugs":{"url":"https://github.com/dympydev/nx-plugins/issues"},"_id":"@dympydev/nx-sveltekit@1.0.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-QKKQ1fgzUnJ6Wh5XiAYm3f73jyMV175NSoh8PP4UB8sfmnJS+vBzyvwPHTHlTC28rT5azhlxAqoNevGt/hwOTA==","shasum":"602201659e21730198946a7249aa528f71595b5b","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.0.0.tgz","fileCount":127,"unpackedSize":877955,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+kG7uGBIUIw/mMIkUgxmRgmtxoTTCZS9KDoZGJmNEFAiALypjE5MAW9SvNUacajyasZGYpZtxQ2LtkrNFfCUfr2w=="}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.0.0_1686037738310_0.7023346091308607"},"_hasShrinkwrap":false},"1.0.1":{"name":"@dympydev/nx-sveltekit","description":"A set of NX generators and executors for SvelteKit apps","version":"1.0.1","homepage":"https://github.com/dympydev/nx-plugins/tree/main/libs/nx-sveltekit#readme","repository":{"type":"git","url":"git+https://github.com/dympydev/nx-plugins.git"},"type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{"@nx/devkit":"16.2.2"},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"efceb78fa290a356e5e5614e02d3ccc70550b5e5","bugs":{"url":"https://github.com/dympydev/nx-plugins/issues"},"_id":"@dympydev/nx-sveltekit@1.0.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-FLX3N0iK3M407mvDdpi2G8E0OMP5z4oF+GUGeRjnfY3llNcST21kumOBpKBwl0CHWgYQvcu7OF3DcWairggALA==","shasum":"54dca12b94c87047136f6e7f1e785c8fb088fe3f","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.0.1.tgz","fileCount":127,"unpackedSize":877935,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEy9D6Aeq2/txQzWjdwPPAJxmNozYP4nrDCG3/Y3mrWDAiEAlTC6d0EpdH67AJNFH8gL7JDrXKoM4iCFJ6sjqX4C8Kk="}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.0.1_1686038617579_0.32995737993478746"},"_hasShrinkwrap":false},"1.1.0-alpha.2":{"name":"@dympydev/nx-sveltekit","description":"A set of NX generators and executors for SvelteKit apps","version":"1.1.0-alpha.2","license":"MIT","homepage":"https://github.com/dympydev/nx-plugins/tree/main/libs/nx-sveltekit#readme","repository":{"type":"git","url":"git+https://github.com/dympydev/nx-plugins.git"},"type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{},"main":"./src/index.js","types":"./src/index.d.ts","readme":"# @dympydev/nx-sveltekit\n\nUsing these generators/executors you can easily add a Svelte-kit application to your NX monorepo.\nBased on the create-svelte package, you can choose between a number of different templates, as well als adapters.\n\n## Generators:\n\n### application\n\nThe application-generator allows you to add SvelteKit application, based on the provided tempalte, to your NX-monorepo. During the setup you can also pick which adapter it should use (though the default options are somehwat limited).\n\n| Property | Default  | Description                                                                                    |\n| -------- | -------- | ---------------------------------------------------------------------------------------------- |\n| name     |          | The name for this new NX application.                                                          |\n| template | skeleton | The template to use (adopted from the create-svelte package), options are \"skeleton\" or \"demo\" |\n| adapter  | auto     | The adapter to use, options are \"auto\", \"node\" and \"static\"                                    |\n\n### route\n\nThe route-generator allows you to add a route to your application using a `+page.svelte` file, along with any data-loading code if required. When adding a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                             |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------- |\n| route      |         | The route you want to add, when including argument (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the route to. Generator fails if there is no `svelte.config.js`-file present. |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+page.ts`-file)                                  |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+page.server.ts`-file)               |\n\n### layout\n\nThe layout-generator adds a `+layout.svelte` file with a default slot at the path you've provided, along with any data-loading code if required. When adding a layout to a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                                                    |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| route      |         | The route where you want to add the layout, when route includes arguments (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the layout to. Generator fails if there is no `svelte.config.js`-file present.                       |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+layout.ts`-file)                                                       |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+layout.server.ts`-file)                                    |\n\n## Executors:\n\n### build\n\nThe build-executor uses the \"nx:run-commands\"-executor to run the `vite build`-command to build the application. After a build, it copies over the output to the provided \"distPath\"-option (which, when using the application-generator, defaults to the dist folder in the root of the monorepo).\n\n| Option                | Required | Description                                                                                                  |\n| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |\n| distPath              | Yes      | The distPath where all generated output should be copied to.                                                 |\n| envFile               | No       | Location of an optional env-file that should be used while building.                                         |\n| copyPackageJson       | No       | Whether or not the root-package.json should be copied over the distPath.                                     |\n| packageJsonExclusions | No       | A list of (dev) dependency packages you don't need or want in your SvelteKit-package.json (such as \"@nx/\\*\") |\n\n### serve\n\nThe serve-executor uses the \"nx:run-commands\"-executor to run the `vite dev`-command to serve the application.\n\n| Option  | Required | Description                                                          |\n| ------- | -------- | -------------------------------------------------------------------- |\n| envFile | No       | Location of an optional env-file that should be used while building. |\n\n### preview\n\nThe preview-executor uses the \"nx:run-commands\"-executor to run the `vite preview`-command to preview the previously build application. This executor depends on the build target, something that is configured automatically when using the application-generator.\n\nThis executor does not have any options (yet).\n\n### test\n\nThe test-executor uses the \"nx:run-commands\"-executor to run the `vitest`-command to run the unit-tests for the application. By default it will just run the tests once and then finish, but there is an option to run it in watch-mode.\n\n| Option | Required | Description                          |\n| ------ | -------- | ------------------------------------ |\n| watch  | No       | Starts the unit-tests in watch mode. |\n\n### e2e\n\nThe e2e-executor uses the \"nx:run-commands\"-executor to run the `playwright test`-command to run the E2E tests. Before running the tests it will always execute a `npx playwright install`-command, just to make sure everything is in place for the playwright tests.\n\nThis executor does not have any options (yet).\n\n### check\n\nThe check-executor uses the \"nx:run-commands\"-executor to run the `svelte-check`-command, as well as the `svelte-kit sync`-command. The sync command will update the generated files (such as the types and whatnot) and the check command will provide different diagnostics for your svelte app (not a replacement for the linter!). By default it will just run these commands once and then finish, but there is an option to run the check-command in watch-mode.\n\n| Option | Required | Description                                      |\n| ------ | -------- | ------------------------------------------------ |\n| watch  | No       | Starts the `svelte-check`-command in watch mode. |\n\n## A little bit of black magic:\n\nWhile most of the generated application is straight out off the `create-svelte`-package, I did add a little bit of black magic to make things work nicely with NX. It mainly comes down to:\n\n- Allowing imports from the root of the monorepo, so we can access shared libraries and such.\n- Generating SvelteKit aliases based on the tsconfig.base.json from the root of the monorepo.\n\nThe first part is rather easy, when generating the application, I take the project-path we're generating (relative to the root of the monorepo) and convert that to a \"projectDepth\" constant. This constant basically consists of the number of `../` we have to do to reach the root of the monorepo from the application-folder. Then, while generating the vite.config.ts, we add this \"projectDepth\" to the `server.fs.allow`-property, so the vite dev server is allowed to load files from the complete monorepo and not just the application itself.\n\nThe second piece of black magic, is a little more magical than the first. Because SvelteKit uses Vite under the hood, we have access to aliases. SvelteKit uses this out-of-the-box for stuff like `$lib`, but we can extend this to add the `compilerOptions.paths` from our tsconfig.base.json from the root of the monorepo. This way, you can simply import from `@your-repo-scope/your-library` in your .ts/.js/.svelte files (in case of the .svelte files there's a known limitation regarding the dependency-graph, see below). We achieve this by requiring the tsconfig file, grabbing the `compilerOptions.paths` and converting them to aliases with a little help from `Object.entries` and `Array.reduce`.\n\n## Known limitations:\n\nSadly, there are a few things that are not quite going the way I would like them to go. I will document these limitations here, but also as issues on the GitHub-issues tab so we have a place to track progress!\n\nThe current known limitations are:\n\n- **No library generator:** Right now we only support applications, routes and layouts, but the create-svelte package also has a preset for libraries. I want to add this as well, along with options to distinguish between workspace and publishable libraries.\n- **`.svelte`-files in the dep-graph:** When you import a workspace-library in a ts or js file inside the SvelteKit application source, it correctly shows up in the dependency-graph. However, when importing one of these libraries in a \".svelte\"-file, it is missing. The great folks over at Nrwl have [documented how to extend the dependency-graph](https://nx.dev/plugins/recipes/project-graph-plugins), but I haven't had the time to add it as of now.\n- **A nice NX-starting page as application template option:** Both React and Angular get this nice NX getting-started page when you generate a new application. I want to recreate that for the SvelteKit applications, just because it's fun!\n","readmeFilename":"README.md","gitHead":"f3f5488ceee991489d70d5c13a9a99270ad55d08","bugs":{"url":"https://github.com/dympydev/nx-plugins/issues"},"_id":"@dympydev/nx-sveltekit@1.1.0-alpha.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-EmWtXMW2qBTW9D125VbKuZqv/jk7vQsW7Y26FZQBZBoG2BZRU96826yMBoLUnmiAn2TNJdTLAdQnVWhCRmI6fQ==","shasum":"4bc19773ea0219c015e1730222736063943df9cb","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.1.0-alpha.2.tgz","fileCount":138,"unpackedSize":884460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0+9qMP9UvyRbcFF7dMabFlRRLFyIOgYNgMmjAP81VSwIgZDxwCOidC/d63e6qBXSj6rZ9/NuhOrToV3WxS8hKO+M="}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.1.0-alpha.2_1687517450656_0.7924379314552585"},"_hasShrinkwrap":false},"1.1.1":{"name":"@dympydev/nx-sveltekit","description":"A set of NX generators and executors for SvelteKit apps","version":"1.1.1","license":"MIT","homepage":"https://github.com/dympydev/nx-plugins/tree/main/libs/nx-sveltekit#readme","repository":{"type":"git","url":"git+https://github.com/dympydev/nx-plugins.git"},"type":"commonjs","executors":"./executors.json","generators":"./generators.json","dependencies":{},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"362b778868fb7702ecda390816e713591b77dd58","bugs":{"url":"https://github.com/dympydev/nx-plugins/issues"},"_id":"@dympydev/nx-sveltekit@1.1.1","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ouQr/fG/Wq0ZP9zSkBaWoA6J7ehZX/FagvrYYNvE5N9OLsNnQ5rNwubA41WpT8Huv4IioMsEPj5CzZg3nz27Gg==","shasum":"6e076c7efb8f2af2aa863cbaa2becc33c222aa3c","tarball":"https://registry.npmjs.org/@dympydev/nx-sveltekit/-/nx-sveltekit-1.1.1.tgz","fileCount":138,"unpackedSize":884452,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEW1lkluykgCOrd+E41C5vNDtnEvSekRS7YU79JHJvKFAiEA1wzI2mOO/43i2CJXZijq+RD5APkPIdz2V2EHN8zMfV8="}]},"_npmUser":{"name":"dympydev","email":"dympydev@gmail.com"},"directories":{},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nx-sveltekit_1.1.1_1688106736996_0.6449387202646792"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-05T20:50:35.843Z","1.0.0-alpha.1":"2023-06-05T20:50:36.192Z","modified":"2023-06-30T06:32:17.524Z","1.0.0-alpha.2":"2023-06-06T06:54:14.676Z","1.0.0-alpha.3":"2023-06-06T07:32:24.615Z","1.0.0-alpha.4":"2023-06-06T07:41:50.233Z","1.0.0":"2023-06-06T07:48:58.560Z","1.0.1":"2023-06-06T08:03:37.779Z","1.1.0":"2023-06-20T14:18:09.363Z","1.1.0-alpha.2":"2023-06-23T10:50:50.955Z","1.1.1":"2023-06-30T06:32:17.361Z"},"maintainers":[{"name":"dympydev","email":"dympydev@gmail.com"}],"description":"A set of NX generators and executors for SvelteKit apps","readme":"# @dympydev/nx-sveltekit\n\nUsing these generators/executors you can easily add a Svelte-kit application to your NX monorepo.\nBased on the create-svelte package, you can choose between a number of different templates, as well als adapters.\n\n## Generators:\n\n### application\n\nThe application-generator allows you to add SvelteKit application, based on the provided tempalte, to your NX-monorepo. During the setup you can also pick which adapter it should use (though the default options are somehwat limited).\n\n| Property | Default  | Description                                                                                    |\n| -------- | -------- | ---------------------------------------------------------------------------------------------- |\n| name     |          | The name for this new NX application.                                                          |\n| template | skeleton | The template to use (adopted from the create-svelte package), options are \"skeleton\" or \"demo\" |\n| adapter  | auto     | The adapter to use, options are \"auto\", \"node\" and \"static\"                                    |\n\n### route\n\nThe route-generator allows you to add a route to your application using a `+page.svelte` file, along with any data-loading code if required. When adding a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                             |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------- |\n| route      |         | The route you want to add, when including argument (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the route to. Generator fails if there is no `svelte.config.js`-file present. |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+page.ts`-file)                                  |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+page.server.ts`-file)               |\n\n### layout\n\nThe layout-generator adds a `+layout.svelte` file with a default slot at the path you've provided, along with any data-loading code if required. When adding a layout to a route with arguments, please wrap the route in double-quotes as the brackets aren't understood by the NX-cli.\n\n| Property   | Default | Description                                                                                                                    |\n| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| route      |         | The route where you want to add the layout, when route includes arguments (like `[slug]`) it should be surrounded with quotes. |\n| project    |         | The project we should add the layout to. Generator fails if there is no `svelte.config.js`-file present.                       |\n| loadData   | false   | Whether or not data-loading should occur (generates a `+layout.ts`-file)                                                       |\n| serverSide | false   | Whether or not data-loading should occur server-side (generates a `+layout.server.ts`-file)                                    |\n\n## Executors:\n\n### build\n\nThe build-executor uses the \"nx:run-commands\"-executor to run the `vite build`-command to build the application. After a build, it copies over the output to the provided \"distPath\"-option (which, when using the application-generator, defaults to the dist folder in the root of the monorepo).\n\n| Option                | Required | Description                                                                                                  |\n| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |\n| distPath              | Yes      | The distPath where all generated output should be copied to.                                                 |\n| envFile               | No       | Location of an optional env-file that should be used while building.                                         |\n| copyPackageJson       | No       | Whether or not the root-package.json should be copied over the distPath.                                     |\n| packageJsonExclusions | No       | A list of (dev) dependency packages you don't need or want in your SvelteKit-package.json (such as \"@nx/\\*\") |\n\n### serve\n\nThe serve-executor uses the \"nx:run-commands\"-executor to run the `vite dev`-command to serve the application.\n\n| Option  | Required | Description                                                          |\n| ------- | -------- | -------------------------------------------------------------------- |\n| envFile | No       | Location of an optional env-file that should be used while building. |\n\n### preview\n\nThe preview-executor uses the \"nx:run-commands\"-executor to run the `vite preview`-command to preview the previously build application. This executor depends on the build target, something that is configured automatically when using the application-generator.\n\nThis executor does not have any options (yet).\n\n### test\n\nThe test-executor uses the \"nx:run-commands\"-executor to run the `vitest`-command to run the unit-tests for the application. By default it will just run the tests once and then finish, but there is an option to run it in watch-mode.\n\n| Option | Required | Description                          |\n| ------ | -------- | ------------------------------------ |\n| watch  | No       | Starts the unit-tests in watch mode. |\n\n### e2e\n\nThe e2e-executor uses the \"nx:run-commands\"-executor to run the `playwright test`-command to run the E2E tests. Before running the tests it will always execute a `npx playwright install`-command, just to make sure everything is in place for the playwright tests.\n\nThis executor does not have any options (yet).\n\n### check\n\nThe check-executor uses the \"nx:run-commands\"-executor to run the `svelte-check`-command, as well as the `svelte-kit sync`-command. The sync command will update the generated files (such as the types and whatnot) and the check command will provide different diagnostics for your svelte app (not a replacement for the linter!). By default it will just run these commands once and then finish, but there is an option to run the check-command in watch-mode.\n\n| Option | Required | Description                                      |\n| ------ | -------- | ------------------------------------------------ |\n| watch  | No       | Starts the `svelte-check`-command in watch mode. |\n\n## A little bit of black magic:\n\nWhile most of the generated application is straight out off the `create-svelte`-package, I did add a little bit of black magic to make things work nicely with NX. It mainly comes down to:\n\n- Allowing imports from the root of the monorepo, so we can access shared libraries and such.\n- Generating SvelteKit aliases based on the tsconfig.base.json from the root of the monorepo.\n\nThe first part is rather easy, when generating the application, I take the project-path we're generating (relative to the root of the monorepo) and convert that to a \"projectDepth\" constant. This constant basically consists of the number of `../` we have to do to reach the root of the monorepo from the application-folder. Then, while generating the vite.config.ts, we add this \"projectDepth\" to the `server.fs.allow`-property, so the vite dev server is allowed to load files from the complete monorepo and not just the application itself.\n\nThe second piece of black magic, is a little more magical than the first. Because SvelteKit uses Vite under the hood, we have access to aliases. SvelteKit uses this out-of-the-box for stuff like `$lib`, but we can extend this to add the `compilerOptions.paths` from our tsconfig.base.json from the root of the monorepo. This way, you can simply import from `@your-repo-scope/your-library` in your .ts/.js/.svelte files (in case of the .svelte files there's a known limitation regarding the dependency-graph, see below). We achieve this by requiring the tsconfig file, grabbing the `compilerOptions.paths` and converting them to aliases with a little help from `Object.entries` and `Array.reduce`.\n\n## Known limitations:\n\nSadly, there are a few things that are not quite going the way I would like them to go. I will document these limitations here, but also as issues on the GitHub-issues tab so we have a place to track progress!\n\nThe current known limitations are:\n\n- **No library generator:** Right now we only support applications, routes and layouts, but the create-svelte package also has a preset for libraries. I want to add this as well, along with options to distinguish between workspace and publishable libraries.\n- **`.svelte`-files in the dep-graph:** When you import a workspace-library in a ts or js file inside the SvelteKit application source, it correctly shows up in the dependency-graph. However, when importing one of these libraries in a \".svelte\"-file, it is missing. The great folks over at Nrwl have [documented how to extend the dependency-graph](https://nx.dev/plugins/recipes/project-graph-plugins), but I haven't had the time to add it as of now.\n- **A nice NX-starting page as application template option:** Both React and Angular get this nice NX getting-started page when you generate a new application. I want to recreate that for the SvelteKit applications, just because it's fun!\n","readmeFilename":"README.md","homepage":"https://github.com/dympydev/nx-plugins/tree/main/libs/nx-sveltekit#readme","repository":{"type":"git","url":"git+https://github.com/dympydev/nx-plugins.git"},"bugs":{"url":"https://github.com/dympydev/nx-plugins/issues"},"license":"MIT"}