From 6ca6d5410277200fca4c0ed98aa5c493dfe7ec35 Mon Sep 17 00:00:00 2001 From: Michael Stramel Date: Tue, 27 Jul 2021 07:45:58 -0500 Subject: [PATCH] Update default `tailwindConfig` property (#866) * Update tailwindConfig property to default to local tailwind.config.js file * update example * Create two-days-cry.md --- .changeset/two-days-cry.md | 22 +++++++++++++++++++ .../reference/configuration-reference.md | 2 +- .../blog-multiple-authors/astro.config.mjs | 2 +- examples/blog/astro.config.mjs | 2 +- examples/docs/astro.config.mjs | 2 +- examples/framework-lit/astro.config.mjs | 2 +- examples/framework-multiple/astro.config.mjs | 2 +- examples/framework-preact/astro.config.mjs | 2 +- examples/framework-react/astro.config.mjs | 2 +- examples/framework-solid/astro.config.mjs | 2 +- examples/framework-svelte/astro.config.mjs | 2 +- examples/framework-vue/astro.config.mjs | 2 +- examples/portfolio/astro.config.mjs | 2 +- examples/starter/astro.config.mjs | 2 +- .../with-markdown-plugins/astro.config.mjs | 2 +- examples/with-tailwindcss/astro.config.mjs | 2 +- .../fixtures/lit-element/astro.config.mjs | 4 ++-- packages/create-astro/src/config.ts | 2 +- 18 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 .changeset/two-days-cry.md diff --git a/.changeset/two-days-cry.md b/.changeset/two-days-cry.md new file mode 100644 index 0000000000000..4e5dc39d20377 --- /dev/null +++ b/.changeset/two-days-cry.md @@ -0,0 +1,22 @@ +--- +"astro": patch +"create-astro": patch +"@example/blog-multiple-authors": patch +"@example/blog": patch +"@example/docs": patch +"@example/framework-lit": patch +"@example/framework-multiple": patch +"@example/framework-preact": patch +"@example/framework-react": patch +"@example/framework-solid": patch +"@example/framework-svelte": patch +"@example/framework-vue": patch +"@example/portfolio": patch +"@example/starter": patch +"@example/with-markdown-plugins": patch +"@example/with-markdown": patch +"@example/with-tailwindcss": patch +"docs": patch +--- + +Update default `tailwindConfig` property to use the common value diff --git a/docs/src/pages/reference/configuration-reference.md b/docs/src/pages/reference/configuration-reference.md index e5a0cc6ee2b6d..73fe68f2bd595 100644 --- a/docs/src/pages/reference/configuration-reference.md +++ b/docs/src/pages/reference/configuration-reference.md @@ -18,7 +18,7 @@ export default { }, 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 }, // component renderers which are enabled by default renderers: [ diff --git a/examples/blog-multiple-authors/astro.config.mjs b/examples/blog-multiple-authors/astro.config.mjs index 2c8e9130e5f05..b445e1e7be0e3 100644 --- a/examples/blog-multiple-authors/astro.config.mjs +++ b/examples/blog-multiple-authors/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-preact'], }; diff --git a/examples/blog/astro.config.mjs b/examples/blog/astro.config.mjs index 2c8e9130e5f05..b445e1e7be0e3 100644 --- a/examples/blog/astro.config.mjs +++ b/examples/blog/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-preact'], }; diff --git a/examples/docs/astro.config.mjs b/examples/docs/astro.config.mjs index 7af3aef7f1c64..b71081e018a14 100644 --- a/examples/docs/astro.config.mjs +++ b/examples/docs/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-preact'], }; diff --git a/examples/framework-lit/astro.config.mjs b/examples/framework-lit/astro.config.mjs index e4cabec8f800b..b7ea6535e407e 100644 --- a/examples/framework-lit/astro.config.mjs +++ b/examples/framework-lit/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-lit'], }; diff --git a/examples/framework-multiple/astro.config.mjs b/examples/framework-multiple/astro.config.mjs index ee1983a24bdfe..8beae3667c93f 100644 --- a/examples/framework-multiple/astro.config.mjs +++ b/examples/framework-multiple/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-preact', '@astrojs/renderer-react', '@astrojs/renderer-svelte', '@astrojs/renderer-vue', '@astrojs/renderer-solid'], }; diff --git a/examples/framework-preact/astro.config.mjs b/examples/framework-preact/astro.config.mjs index 350d6c7de3336..c9cb56a129305 100644 --- a/examples/framework-preact/astro.config.mjs +++ b/examples/framework-preact/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-preact'], }; diff --git a/examples/framework-react/astro.config.mjs b/examples/framework-react/astro.config.mjs index da818c2be56e2..1c5d95cb06fb0 100644 --- a/examples/framework-react/astro.config.mjs +++ b/examples/framework-react/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-react'], }; diff --git a/examples/framework-solid/astro.config.mjs b/examples/framework-solid/astro.config.mjs index 59dd75f5601fe..7d571849f5bc5 100644 --- a/examples/framework-solid/astro.config.mjs +++ b/examples/framework-solid/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-solid'], }; diff --git a/examples/framework-svelte/astro.config.mjs b/examples/framework-svelte/astro.config.mjs index 40dbab1ad0c19..b99cf4c9cbd84 100644 --- a/examples/framework-svelte/astro.config.mjs +++ b/examples/framework-svelte/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-svelte'], }; diff --git a/examples/framework-vue/astro.config.mjs b/examples/framework-vue/astro.config.mjs index 964aa2145d951..8bfde8ec3b90e 100644 --- a/examples/framework-vue/astro.config.mjs +++ b/examples/framework-vue/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-vue'], }; diff --git a/examples/portfolio/astro.config.mjs b/examples/portfolio/astro.config.mjs index 350d6c7de3336..c9cb56a129305 100644 --- a/examples/portfolio/astro.config.mjs +++ b/examples/portfolio/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, 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 }, renderers: ['@astrojs/renderer-preact'], }; diff --git a/examples/starter/astro.config.mjs b/examples/starter/astro.config.mjs index 706dce85ba999..b54f48b4eefee 100644 --- a/examples/starter/astro.config.mjs +++ b/examples/starter/astro.config.mjs @@ -9,6 +9,6 @@ export default { }, 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 }, }; diff --git a/examples/with-markdown-plugins/astro.config.mjs b/examples/with-markdown-plugins/astro.config.mjs index e02cde8210b24..455418e7ccc8a 100644 --- a/examples/with-markdown-plugins/astro.config.mjs +++ b/examples/with-markdown-plugins/astro.config.mjs @@ -16,6 +16,6 @@ export default { }, 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 }, }; diff --git a/examples/with-tailwindcss/astro.config.mjs b/examples/with-tailwindcss/astro.config.mjs index f93e801ceec00..6dfc5024ab4a5 100644 --- a/examples/with-tailwindcss/astro.config.mjs +++ b/examples/with-tailwindcss/astro.config.mjs @@ -9,7 +9,7 @@ export default { }, devOptions: { // 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' + tailwindConfig: './tailwind.config.js', // Path to tailwind.config.js }, renderers: ['@astrojs/renderer-preact'], }; diff --git a/packages/astro/test/fixtures/lit-element/astro.config.mjs b/packages/astro/test/fixtures/lit-element/astro.config.mjs index 20f741ec69800..a959fed7859b1 100644 --- a/packages/astro/test/fixtures/lit-element/astro.config.mjs +++ b/packages/astro/test/fixtures/lit-element/astro.config.mjs @@ -9,9 +9,9 @@ export default { }, 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 }, renderers: [ '@astrojs/renderer-lit' ] -}; \ No newline at end of file +}; diff --git a/packages/create-astro/src/config.ts b/packages/create-astro/src/config.ts index 31b7acc20448e..00d97ba1cdd72 100644 --- a/packages/create-astro/src/config.ts +++ b/packages/create-astro/src/config.ts @@ -12,7 +12,7 @@ export const createConfig = ({ renderers }: { renderers: string[] }) => { devOptions: { // hostname: 'localhost', // The hostname to run the dev server on. // 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 },`, ` renderers: ${JSON.stringify(renderers, undefined, 2) .split('\n')