diff options
author | 2021-07-07 14:52:44 -0500 | |
---|---|---|
committer | 2021-07-07 14:52:44 -0500 | |
commit | 5d5d67c8f9b4df57d6be977d64d988e1850ee226 (patch) | |
tree | 6743ca41089324c2afb3bb1c3a04a954220e165c /examples | |
parent | 42a1fd7c167257f78435ad6b2b4611f689a84544 (diff) | |
download | astro-5d5d67c8f9b4df57d6be977d64d988e1850ee226.tar.gz astro-5d5d67c8f9b4df57d6be977d64d988e1850ee226.tar.zst astro-5d5d67c8f9b4df57d6be977d64d988e1850ee226.zip |
Add framework-specific prompt and setup to `create-astro` (#620)
* feat(create-astro): add framework-specific prompt and setup
* chore: normalize example `astro.config.mjs` files
Diffstat (limited to 'examples')
-rw-r--r-- | examples/blog-multiple-authors/astro.config.mjs | 9 | ||||
-rw-r--r-- | examples/blog/astro.config.mjs | 16 | ||||
-rw-r--r-- | examples/docs/astro.config.mjs | 12 | ||||
-rw-r--r-- | examples/framework-multiple/astro.config.mjs | 20 | ||||
-rw-r--r-- | examples/framework-preact/astro.config.mjs | 17 | ||||
-rw-r--r-- | examples/framework-react/astro.config.mjs | 17 | ||||
-rw-r--r-- | examples/framework-svelte/astro.config.mjs | 17 | ||||
-rw-r--r-- | examples/framework-vue/astro.config.mjs | 17 | ||||
-rw-r--r-- | examples/portfolio/astro.config.mjs | 12 | ||||
-rw-r--r-- | examples/starter/astro.config.mjs | 4 | ||||
-rw-r--r-- | examples/starter/public/style/home.css | 14 | ||||
-rw-r--r-- | examples/with-nanostores/astro.config.mjs | 12 | ||||
-rw-r--r-- | examples/with-tailwindcss/astro.config.mjs | 14 |
13 files changed, 170 insertions, 11 deletions
diff --git a/examples/blog-multiple-authors/astro.config.mjs b/examples/blog-multiple-authors/astro.config.mjs index d72db6491..e6e926d7b 100644 --- a/examples/blog-multiple-authors/astro.config.mjs +++ b/examples/blog-multiple-authors/astro.config.mjs @@ -1,14 +1,17 @@ export default { // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. - // pages: './src/pages', // Path to Astro components, pages, and data + // pages: './src/pages', // Path to Astro components, pages, and data // dist: './dist', // When running `astro build`, path to final static output // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. buildOptions: { - site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. - // sitemap: true, // Generate sitemap (set to "false" to disable) + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + sitemap: true, // Generate sitemap (set to "false" to disable) }, devOptions: { // port: 3000, // The port to run the dev server on. // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' }, + renderers: [ + '@astrojs/renderer-preact' + ] }; diff --git a/examples/blog/astro.config.mjs b/examples/blog/astro.config.mjs index ef2cd38aa..e6e926d7b 100644 --- a/examples/blog/astro.config.mjs +++ b/examples/blog/astro.config.mjs @@ -1,5 +1,17 @@ export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. buildOptions: { - sitemap: true, + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + sitemap: true, // Generate sitemap (set to "false" to disable) }, -} + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, + renderers: [ + '@astrojs/renderer-preact' + ] +}; diff --git a/examples/docs/astro.config.mjs b/examples/docs/astro.config.mjs index d97e2804d..6fd6bb47e 100644 --- a/examples/docs/astro.config.mjs +++ b/examples/docs/astro.config.mjs @@ -1,4 +1,16 @@ export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, renderers: [ '@astrojs/renderer-preact' ] diff --git a/examples/framework-multiple/astro.config.mjs b/examples/framework-multiple/astro.config.mjs new file mode 100644 index 000000000..89abd7323 --- /dev/null +++ b/examples/framework-multiple/astro.config.mjs @@ -0,0 +1,20 @@ +export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, + renderers: [ + '@astrojs/renderer-preact', + '@astrojs/renderer-react', + '@astrojs/renderer-svelte', + '@astrojs/renderer-vue', + ] +}; diff --git a/examples/framework-preact/astro.config.mjs b/examples/framework-preact/astro.config.mjs new file mode 100644 index 000000000..2d1454d51 --- /dev/null +++ b/examples/framework-preact/astro.config.mjs @@ -0,0 +1,17 @@ +export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, + renderers: [ + '@astrojs/renderer-preact' + ] +}; diff --git a/examples/framework-react/astro.config.mjs b/examples/framework-react/astro.config.mjs new file mode 100644 index 000000000..f0e022923 --- /dev/null +++ b/examples/framework-react/astro.config.mjs @@ -0,0 +1,17 @@ +export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, + renderers: [ + '@astrojs/renderer-react' + ] +}; diff --git a/examples/framework-svelte/astro.config.mjs b/examples/framework-svelte/astro.config.mjs new file mode 100644 index 000000000..59ddc78f0 --- /dev/null +++ b/examples/framework-svelte/astro.config.mjs @@ -0,0 +1,17 @@ +export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, + renderers: [ + '@astrojs/renderer-svelte' + ] +}; diff --git a/examples/framework-vue/astro.config.mjs b/examples/framework-vue/astro.config.mjs new file mode 100644 index 000000000..1fec0a4dd --- /dev/null +++ b/examples/framework-vue/astro.config.mjs @@ -0,0 +1,17 @@ +export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, + renderers: [ + '@astrojs/renderer-vue' + ] +}; diff --git a/examples/portfolio/astro.config.mjs b/examples/portfolio/astro.config.mjs index d97e2804d..2d1454d51 100644 --- a/examples/portfolio/astro.config.mjs +++ b/examples/portfolio/astro.config.mjs @@ -1,4 +1,16 @@ export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // sitemap: true, // Generate sitemap (set to "false" to disable) + }, + devOptions: { + // port: 3000, // The port to run the dev server on. + // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + }, renderers: [ '@astrojs/renderer-preact' ] diff --git a/examples/starter/astro.config.mjs b/examples/starter/astro.config.mjs index e16ed1327..706dce85b 100644 --- a/examples/starter/astro.config.mjs +++ b/examples/starter/astro.config.mjs @@ -1,10 +1,10 @@ export default { // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. - // pages: './src/pages', // Path to Astro components, pages, and data + // pages: './src/pages', // Path to Astro components, pages, and data // dist: './dist', // When running `astro build`, path to final static output // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. buildOptions: { - // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. // sitemap: true, // Generate sitemap (set to "false" to disable) }, devOptions: { diff --git a/examples/starter/public/style/home.css b/examples/starter/public/style/home.css index c4271a845..70741a8da 100644 --- a/examples/starter/public/style/home.css +++ b/examples/starter/public/style/home.css @@ -36,3 +36,17 @@ h2 { font-weight: 500; font-size: clamp(1.5rem, 1rem + 1.25vw, 2rem); } + +.counter { + display: grid; + grid-auto-flow: column; + gap: 1em; + font-size: 2rem; + justify-content: center; + padding: 2rem 1rem; +} + +.counter > pre { + text-align: center; + min-width: 3ch; +} diff --git a/examples/with-nanostores/astro.config.mjs b/examples/with-nanostores/astro.config.mjs index e16ed1327..ce0e15031 100644 --- a/examples/with-nanostores/astro.config.mjs +++ b/examples/with-nanostores/astro.config.mjs @@ -1,14 +1,20 @@ export default { // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. - // pages: './src/pages', // Path to Astro components, pages, and data + // pages: './src/pages', // Path to Astro components, pages, and data // dist: './dist', // When running `astro build`, path to final static output // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. buildOptions: { - // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. // sitemap: true, // Generate sitemap (set to "false" to disable) }, devOptions: { // port: 3000, // The port to run the dev server on. - // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' + tailwindConfig: './tailwind.config.js', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' }, + renderers: [ + '@astrojs/renderer-preact', + '@astrojs/renderer-react', + '@astrojs/renderer-svelte', + '@astrojs/renderer-vue', + ] }; diff --git a/examples/with-tailwindcss/astro.config.mjs b/examples/with-tailwindcss/astro.config.mjs index 7e6aaa3fd..b69c40cd4 100644 --- a/examples/with-tailwindcss/astro.config.mjs +++ b/examples/with-tailwindcss/astro.config.mjs @@ -1,5 +1,17 @@ export default { + // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. + // pages: './src/pages', // Path to Astro components, pages, and data + // dist: './dist', // When running `astro build`, path to final static output + // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. + buildOptions: { + // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + sitemap: true, // Generate sitemap (set to "false" to disable) + }, devOptions: { - tailwindConfig: './tailwind.config.js', + // port: 3000, // The port to run the dev server on. + tailwindConfig: './tailwind.config.js', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' }, + renderers: [ + '@astrojs/renderer-preact' + ] }; |