Skip to content

Commit 634f238

Browse files
weaverryanjaviereguiluz
authored andcommitted
[WIP] Upgrading to AssetMapper 6.4
1 parent 5622c89 commit 634f238

File tree

68 files changed

+814
-19189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+814
-19189
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@
55
"ghcr.io/shyim/devcontainers-features/php:0": {
66
"version": "8.1"
77
},
8-
"ghcr.io/devcontainers/features/node:1": {
9-
"version": "lts"
10-
}
118
},
129
"updateContentCommand": {
1310
"composer install": ["composer", "install"],
14-
"yarn": ["yarn"]
11+
"importmap:install": ["symfony", "console", "importmap:install"]
1512
},
1613
"postAttachCommand": {
1714
"server": "symfony server:start",
18-
"yarn": ["yarn", "watch"]
15+
"sass build": ["symfony", "console", "sass:build", "-w"]
1916
}
2017
}

.github/workflows/tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
- name: "Install dependencies"
6262
run: composer install --ansi --no-interaction --no-progress
6363

64+
- name: "Build Sass"
65+
run: php bin/console sass:build
66+
6467
- name: "Install PHPUnit"
6568
run: vendor/bin/simple-phpunit install
6669

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
.phpunit.result.cache
1818
/phpunit.xml
1919
###< symfony/phpunit-bridge ###
20-
###> symfony/webpack-encore-bundle ###
21-
/node_modules/
22-
npm-debug.log
23-
yarn-error.log
24-
###< symfony/webpack-encore-bundle ###
20+
21+
###> symfony/asset-mapper ###
22+
/public/assets/
23+
/assets/vendor
24+
###< symfony/asset-mapper ###

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// exclude files generated by Symfony Flex recipes
1919
->notPath('bin/console')
2020
->notPath('public/index.php')
21+
->notPath('importmap.php')
2122
;
2223

2324
return (new PhpCsFixer\Config())

assets/admin.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
import './styles/admin.scss';
1+
import './styles/admin.css';
22
import 'typeahead.js';
33
import Bloodhound from "bloodhound-js";
4+
import './js/jquery_global.js';
5+
import $ from 'jquery';
46
import 'bootstrap-tagsinput';
7+
import './styles/bootstrap-tagsinput.css';
58

69
$(function() {
710
// Bootstrap-tagsinput initialization

assets/app.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import './styles/app.scss';
2+
import '@fortawesome/fontawesome-free/css/all.css';
3+
import '@fortawesome/fontawesome-free/css/v4-shims.css';
4+
import 'highlight.js/styles/github-dark-dimmed.css';
5+
import 'lato-font/css/lato-font.css';
26

37
// loads the Bootstrap plugins
48
import 'bootstrap/js/dist/alert';
@@ -15,6 +19,6 @@ import './js/highlight.js';
1519
import './js/doclinks.js';
1620

1721
// start the Stimulus application
18-
import './bootstrap';
22+
import './bootstrap.js';
1923

20-
import './js/flatpicker';
24+
import './js/flatpicker.js';

assets/bootstrap.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import { startStimulusApp } from '@symfony/stimulus-bridge';
1+
import { startStimulusApp } from '@symfony/stimulus-bundle';
22

3-
// Registers Stimulus controllers from controllers.json and in the controllers/ directory
4-
export const app = startStimulusApp(require.context(
5-
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
6-
true,
7-
/\.[jt]sx?$/
8-
));
3+
const app = startStimulusApp();
94

105
// register any custom, 3rd party controllers here
116
// app.register('some_controller_name', SomeImportedController);

assets/js/flatpicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'flatpickr';
2-
import 'flatpickr/dist/flatpickr.css';
2+
import 'flatpickr/dist/flatpickr.min.css';
33
import l10n from "flatpickr/dist/l10n";
44

55
flatpickr.defaultConfig.animate = window.navigator.userAgent.indexOf('MSIE') === -1;

assets/js/jquery_global.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// bootstrap-tagsinput is old and requires a global jQuery object
2+
// this is done in a separate file so it will fully run before the rest
3+
// of the code (i.e. the code that imports bootstrap-tagsinput)
4+
import $ from 'jquery';
5+
window.jQuery = $;

assets/styles/_variables.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
// see https://github.com/thomaspark/bootswatch/issues/55#issuecomment-298093182
44
$web-font-path: 'data:text/css;base64,';
55

6-
// Make sure the bootstrap-sass and lato fonts are resolved correctly
7-
//$icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
8-
$lato-font-path: '~lato-font/fonts';
9-
106
$font-default: 19px;
117

128
$font-heading: 2.5rem;
@@ -27,4 +23,4 @@ $btn-padding-x: 10px;
2723
$btn-padding-y-sm: 9px;
2824
$btn-padding-x-sm: 6px;
2925

30-
@import "~bootswatch/dist/flatly/variables";
26+
@import "./bootswatch/variables";

0 commit comments

Comments
 (0)