Skip to content

Commit

Permalink
[#2] Add prettier config and prettier JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfenton committed May 16, 2024
1 parent 46a741b commit fab79a5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 28 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/**
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
semi: false,
singleQuote: true,
plugins: [
"prettier-plugin-tailwindcss"
]
}
7 changes: 3 additions & 4 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
export default {
content: [
'./templates/**/*.twig',
'./src/**/*.{js,jsx,ts,tsx,svg}',
'./src/**/*.{js,jsx,ts,tsx,svg}'
],
theme: {
extend: {},
extend: {}
},
plugins: [],
plugins: []
}

48 changes: 24 additions & 24 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import {defineConfig, loadEnv } from 'vite'
import { defineConfig, loadEnv } from 'vite'

// Match ports in .ddev/config.yaml -> web_extra_exposed_ports
const HTTP_PORT = 3000;
const HTTPS_PORT = 3001;
const HTTP_PORT = 3000
const HTTPS_PORT = 3001

export default defineConfig(({command, mode}) => {
const env = loadEnv(mode, process.cwd(), '');
const originPort = env.PRIMARY_SITE_URL.startsWith('https') ? HTTPS_PORT : HTTP_PORT;
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const originPort = env.PRIMARY_SITE_URL.startsWith('https') ? HTTPS_PORT : HTTP_PORT

return {
base: command === 'serve' ? '' : '/dist/',
build: {
manifest: true,
outDir: './web/dist/',
rollupOptions: {
input: {
app: 'src/js/app.js',
}
},
},
server: {
host: '0.0.0.0',
strictPort: true,
port: HTTP_PORT,
origin: env.PRIMARY_SITE_URL + ':' + originPort,
return {
base: command === 'serve' ? '' : '/dist/',
build: {
manifest: true,
outDir: './web/dist/',
rollupOptions: {
input: {
app: 'src/js/app.js'
}
};
});
}
},
server: {
host: '0.0.0.0',
strictPort: true,
port: HTTP_PORT,
origin: env.PRIMARY_SITE_URL + ':' + originPort
}
}
})

0 comments on commit fab79a5

Please sign in to comment.