https://github.com/ryuheechul/create-svelte-with-config
invoke create-svelte with a "config" file
https://github.com/ryuheechul/create-svelte-with-config
Last synced: 2 months ago
JSON representation
invoke create-svelte with a "config" file
- Host: GitHub
- URL: https://github.com/ryuheechul/create-svelte-with-config
- Owner: ryuheechul
- Created: 2023-02-03T22:35:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-03T23:18:09.000Z (over 3 years ago)
- Last Synced: 2025-09-04T03:50:30.133Z (10 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# create-svelte-with-config
This is a thin wrapper of [create-svelte](https://www.npmjs.com/package/create-svelte).
## Why
[create-svelte](https://github.com/sveltejs/kit/tree/master/packages/create-svelte#api) currently doesn't accept a config file nor command flags.
That leaves you with either enter things interactively or setup a project like this very one to tap into `create-svelte` programmatically which is not ideal.
So until that feature is added to upstream, this project should be useful to create svelte project quickly without having to interactively providing parameters.
## Examples
### Example With a Config With Hard-Coded Project Name
```javascript
// let's say this is your-config-file.mjs in your current working directory
// based on https://github.com/sveltejs/kit/tree/master/packages/create-svelte#api
export default { // always export this as default
name: 'my-new-app-via-config',
template: 'skeleton', // or 'default' or 'skeletonlib'
types: 'typescript', // or 'checkjs' or null;
vitest: true,
eslint: true,
prettier: true,
playwright: false,
};
```
Then now you can run this
```bash
npm create svelte-with-config your-config-file.mjs
```
### Example With Overriding Name
```javascript
// let's say this is another-config-file.mjs
export default {
name: 'still-hard-coded-name-in-config',
template: 'skeleton', // or 'default' or 'skeletonlib'
types: 'typescript', // or 'checkjs' or null;
vitest: false,
eslint: false,
prettier: false,
playwright: false,
};
```
Then now you can run this to override the name
```bash
npm create svelte-with-config another-config-file.mjs my-another-new-app
```