Skip to content

Commit

Permalink
feat: vscode workspace settings added
Browse files Browse the repository at this point in the history
  • Loading branch information
fiadone committed Jan 9, 2022
1 parent ab27a97 commit 5bc2c8e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 25 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"title": "Welcome!",
"subtitle": "Here is your brand new app",
"abstract": "Enjoy development with <strong class=\"c-secondary\">@fiad/carpentry</strong>",
"abstract": "Enjoy development with <strong class=\"c-secondary\">Carpentry</strong>",
"button": {
"link": true,
"label": "Documentation",
Expand Down
44 changes: 20 additions & 24 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
import { defineConfig } from 'vite'
import twig from 'vite-plugin-twig'
import purgecss from '@fullhuman/postcss-purgecss'
import twig from 'vite-plugin-twig'

export default defineConfig(({ command }) => ({
resolve: {
extensions: ['.js', '.json', '.css', '.scss'],
alias: {
'~': '/src'
build: {
rollupOptions: {
input: {
index: 'index.html'
}
}
},
css: {
postcss: {
plugins: (command !== 'build') ? [] : [
purgecss({
content: ['./**/*.html', './src/**/*.twig']
})
]
},
preprocessorOptions: {
scss: {
additionalData: '@import "~/theme/core";'
}
},
...(command !== 'build')
? null
: {
postcss: {
plugins: [
purgecss({
content: ['./**/*.html', './src/**/*.twig']
})
]
}
}
},
build: {
rollupOptions: {
input: {
index: 'index.html'
}
}
},
plugins: [
twig()
]
],
resolve: {
extensions: ['.js', '.json', '.css', '.scss'],
alias: {
'~': '/src'
}
}
}))
22 changes: 22 additions & 0 deletions vs.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"emmet.includeLanguages": {
"twig": "html"
},
"eslint.format.enable": true,
"explorer.sortOrder": "type",
"javascript.updateImportsOnFileMove.enabled": "always",
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
}
}
}

0 comments on commit 5bc2c8e

Please sign in to comment.