Skip to content

Commit 87ac0e1

Browse files
authored
improve project scaffolding language (#2895)
* improve project scaffolding language * casing * lint
1 parent e30d6b8 commit 87ac0e1

File tree

2 files changed

+18
-34
lines changed

2 files changed

+18
-34
lines changed

Diff for: .changeset/stale-glasses-brake.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'create-svelte': patch
3+
---
4+
5+
Improve project scaffolding language

Diff for: packages/create-svelte/bin.js

+13-34
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ${bold(cyan('Welcome to SvelteKit!'))}
1212
1313
${bold(red('This is beta software; expect bugs and missing features.'))}
1414
15-
If you encounter a problem, open an issue on ${cyan('https://github.com/sveltejs/kit/issues')} if none exists already.
15+
Problems? Open an issue on ${cyan('https://github.com/sveltejs/kit/issues')} if none exists already.
1616
`;
1717

1818
const { version } = JSON.parse(fs.readFileSync(new URL('package.json', import.meta.url), 'utf-8'));
@@ -88,47 +88,26 @@ async function main() {
8888
write_template_files(options.template, options.typescript, name, cwd);
8989
write_common_files(cwd, options, name);
9090

91-
console.log(bold(green('✔ Copied project files')));
91+
console.log(bold(green('\nYour project is ready!')));
9292

9393
if (options.typescript) {
94-
console.log(
95-
bold(
96-
green(
97-
'✔ Added TypeScript support. ' +
98-
'To use it inside Svelte components, add lang="ts" to the attributes of a script tag.'
99-
)
100-
)
101-
);
94+
console.log(bold('✔ Typescript'));
95+
console.log(' Inside Svelte components, use <script lang="ts">');
10296
}
10397

10498
if (options.eslint) {
105-
console.log(
106-
bold(
107-
green(
108-
'✔ Added ESLint.\n' +
109-
'Readme for ESLint and Svelte: https://github.com/sveltejs/eslint-plugin-svelte3'
110-
)
111-
)
112-
);
99+
console.log(bold('✔ ESLint'));
100+
console.log(cyan(' https://github.com/sveltejs/eslint-plugin-svelte3'));
113101
}
114102

115103
if (options.prettier) {
116-
console.log(
117-
bold(
118-
green(
119-
'✔ Added Prettier.\n' +
120-
'General formatting options: https://prettier.io/docs/en/options.html\n' +
121-
'Svelte-specific formatting options: https://github.com/sveltejs/prettier-plugin-svelte#options'
122-
)
123-
)
124-
);
104+
console.log(bold('✔ Prettier'));
105+
console.log(cyan(' https://prettier.io/docs/en/options.html'));
106+
console.log(cyan(' https://github.com/sveltejs/prettier-plugin-svelte#options'));
125107
}
126108

127-
console.log(
128-
'\nWant to add other parts to your code base? ' +
129-
'Visit https://github.com/svelte-add/svelte-adders, a community project of commands ' +
130-
'to add particular functionality to Svelte projects\n'
131-
);
109+
console.log('\nInstall community-maintained integrations:');
110+
console.log(cyan(' https://github.com/svelte-add/svelte-adders'));
132111

133112
console.log('\nNext steps:');
134113
let i = 1;
@@ -140,11 +119,11 @@ async function main() {
140119

141120
console.log(` ${i++}: ${bold(cyan('npm install'))} (or pnpm install, etc)`);
142121
// prettier-ignore
143-
console.log(` ${i++}: ${bold(cyan('git init && git add -A && git commit -m "Initial commit"'))} (optional step)`);
122+
console.log(` ${i++}: ${bold(cyan('git init && git add -A && git commit -m "Initial commit"'))} (optional)`);
144123
console.log(` ${i++}: ${bold(cyan('npm run dev -- --open'))}`);
145124

146125
console.log(`\nTo close the dev server, hit ${bold(cyan('Ctrl-C'))}`);
147-
console.log('\nStuck? Visit us at https://svelte.dev/chat\n');
126+
console.log(`\nStuck? Visit us at ${cyan('https://svelte.dev/chat')}\n`);
148127
}
149128

150129
/**

0 commit comments

Comments
 (0)