Skip to content

Commit

Permalink
Merge pull request #1483 from alphagov/vite-build-improvements
Browse files Browse the repository at this point in the history
Make tweaks to frontend build
  • Loading branch information
DavidBiddle authored Oct 7, 2024
2 parents 88afc17 + a888d7c commit f18114f
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 27 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
# Add or replace test runners here
- name: Run Ruby tests
run: bundle exec rspec
- name: Run JS tests & JS/CSS linting
- name: Run JS tests
run: npm test
# Add or replace any other lints here
- name: Security audit dependencies
Expand All @@ -66,3 +66,5 @@ jobs:
run: bundle exec brakeman -q -w2
- name: Lint Ruby files
run: bundle exec rubocop --parallel
- name: Lint JS and CSS files
run: npm run lint
10 changes: 5 additions & 5 deletions app/components/markdown_editor_component/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@
margin: 0;

&--h2 {
background-image: url("../../assets/icons/markdown-editor-h2.svg");
background-image: url("~/icons/markdown-editor-h2.svg");
}

&--h3 {
background-image: url("../../assets/icons/markdown-editor-h3.svg");
background-image: url("~/icons/markdown-editor-h3.svg");
}

&--bullet-list {
background-image: url("../../assets/icons/markdown-editor-bullet-list.svg");
background-image: url("~/icons/markdown-editor-bullet-list.svg");
}

&--numbered-list {
background-image: url("../../assets/icons/markdown-editor-numbered-list.svg");
background-image: url("~/icons/markdown-editor-numbered-list.svg");
}

&--link {
background-image: url("../../assets/icons/markdown-editor-link.svg");
background-image: url("~/icons/markdown-editor-link.svg");
}
}

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
18 changes: 0 additions & 18 deletions app/frontend/plugins/vite/vite-plugin-lint.js

This file was deleted.

3 changes: 2 additions & 1 deletion config/vite.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"autoBuild": false
},
"development": {
"port": 3036
"port": 3036,
"autoBuild": true
},
"test": {
"port": 3037,
Expand Down
3 changes: 1 addition & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import { defineConfig } from 'vite'
import RubyPlugin from 'vite-plugin-ruby'
import * as path from 'node:path'
import lintPlugin from './app/frontend/plugins/vite/vite-plugin-lint'

export default defineConfig({
plugins: [RubyPlugin(), { ...lintPlugin(), apply: 'serve' }],
plugins: [RubyPlugin()],
build: { emptyOutDir: true },
css: {
preprocessorOptions: {
Expand Down

0 comments on commit f18114f

Please sign in to comment.