diff --git a/index.html b/index.html index 1260179..2fec84f 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ }, "title": "Welcome!", "subtitle": "Here is your brand new app", - "abstract": "Enjoy development with @fiad/carpentry", + "abstract": "Enjoy development with Carpentry", "button": { "link": true, "label": "Documentation", diff --git a/vite.config.js b/vite.config.js index c23a799..97f624d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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' + } + } })) \ No newline at end of file diff --git a/vs.code-workspace b/vs.code-workspace new file mode 100644 index 0000000..6e9abe0 --- /dev/null +++ b/vs.code-workspace @@ -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" + } + } +} \ No newline at end of file