Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tailwindlabs/prettier-plugin-tailwindcss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: tailwindlabs/prettier-plugin-tailwindcss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bundle-astro
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Aug 9, 2022

  1. Bundle astro plugin

    thecrypticace committed Aug 9, 2022
    Copy the full SHA
    589300a View commit details
Showing with 10 additions and 6 deletions.
  1. +1 −1 build.js
  2. +8 −1 src/index.js
  3. +1 −4 tests/test.js
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ esbuild.build({
bundle: true,
platform: 'node',
target: 'node12.13.0',
external: ['prettier', 'svelte'],
external: ['prettier', 'svelte', '@astro/compiler', 'sass-formatter', 'synckit'],
minify: process.argv.includes('--minify'),
watch: process.argv.includes('--watch'),
plugins: [
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -387,6 +387,7 @@ function transformCss(ast, { env }) {
}

export const options = {
...astro.options,
...svelte.options,
tailwindConfig: {
type: 'string',
@@ -395,8 +396,14 @@ export const options = {
},
}

export const languages = svelte.languages
export const languages = [
...astro.languages,
...svelte.languages,
]
export const printers = {
'astro': {
...astro.printers.astro,
},
'svelte-ast': {
...svelte.printers['svelte-ast'],
print: (path, options, print) => {
5 changes: 1 addition & 4 deletions tests/test.js
Original file line number Diff line number Diff line change
@@ -6,10 +6,7 @@ function format(str, options = {}) {
return prettier
.format(str, {
pluginSearchDirs: [__dirname], // disable plugin autoload
plugins: [
require.resolve('prettier-plugin-astro'),
path.resolve(__dirname, '..'),
],
plugins: [path.resolve(__dirname, '..')],
semi: false,
singleQuote: true,
printWidth: 9999,