Skip to content

Commit fdea414

Browse files
committed
Merge branch 'review' of https://github.com/betagouv/monstagedeseconde into review
2 parents 72e83dd + 827dd85 commit fdea414

File tree

6 files changed

+70
-378
lines changed

6 files changed

+70
-378
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ gem 'rake'
1515

1616
# pg extension for geo queries
1717
# wait for : https://github.com/rgeo/activerecord-postgis-adapter/tree/ar61 to be merge into master
18-
gem 'activerecord-postgis-adapter'
19-
'>= 8.0.1'
18+
gem 'activerecord-postgis-adapter', '>= 8.0.1'
2019

2120
# don't bump until fixed, https://github.com/Casecommons/pg_search/issues/446
2221
gem 'pg_search', '2.3.2' # pg search for autocomplete
@@ -31,6 +30,7 @@ gem 'inline_svg'
3130
gem 'react_on_rails'
3231
gem 'slim-rails'
3332
gem 'split', require: 'split/dashboard'
33+
gem 'turbo-rails'
3434
gem 'uglifier'
3535
gem 'view_component'
3636
gem 'webpacker'

Gemfile.lock

+2-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ DEPENDENCIES
573573
aasm
574574
actionpack (>= 6.1.3.2)
575575
activerecord-explain-analyze
576-
activerecord-postgis-adapter
576+
activerecord-postgis-adapter (>= 8.0.1)
577577
aws-sdk-s3
578578
bitly
579579
bootsnap
@@ -632,6 +632,7 @@ DEPENDENCIES
632632
slim-rails
633633
split
634634
spring (= 3.0.0)
635+
turbo-rails
635636
tzinfo-data
636637
uglifier
637638
validates_zipcode

config/webpack/environment.js

+36-13
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,33 @@ environment.plugins.append('Provide', new webpack.ProvidePlugin({
88
jQuery: 'jquery'
99
}));
1010

11-
// Loader pour les fichiers CSS et SCSS
12-
environment.loaders.append('styles', {
13-
test: /\.(css|scss|sass)$/,
11+
// Configuration du loader PostCSS
12+
const postcssLoader = environment.loaders.get('css').use.find(el => el.loader === 'postcss-loader');
13+
14+
if (postcssLoader) {
15+
postcssLoader.options = {
16+
postcssOptions: {
17+
plugins: [
18+
require('autoprefixer'),
19+
]
20+
}
21+
};
22+
}
23+
24+
// Configuration du loader SASS
25+
const sassLoader = environment.loaders.get('sass').use.find(el => el.loader === 'sass-loader');
26+
27+
if (sassLoader) {
28+
sassLoader.options = {
29+
sourceMap: true // Activer la génération de source map si nécessaire
30+
};
31+
}
32+
33+
// Loader pour les fichiers SCSS
34+
environment.loaders.append('scss', {
35+
test: /\.scss$/,
1436
use: [
15-
MiniCssExtractPlugin.loader, // Utilisation correcte du loader
37+
MiniCssExtractPlugin.loader, // Utilisation du loader MiniCssExtractPlugin
1638
'css-loader',
1739
{
1840
loader: 'postcss-loader',
@@ -40,6 +62,16 @@ environment.loaders.append('images', {
4062
]
4163
});
4264

65+
// Loader pour les fichiers CSS et SCSS
66+
environment.loaders.append('styles', {
67+
test: /\.(css|scss|sass)$/,
68+
use: [
69+
MiniCssExtractPlugin.loader, // Utilisation correcte du loader
70+
'css-loader',
71+
'sass-loader'
72+
]
73+
});
74+
4375
// Loader pour Babel
4476
environment.loaders.append('babel', {
4577
test: /\.(js|jsx|mjs)$/,
@@ -61,13 +93,4 @@ environment.plugins.append(
6193
})
6294
);
6395

64-
// Ajouter la configuration node pour éviter les erreurs de compatibilité
65-
environment.config.merge({
66-
node: {
67-
global: true, // Inclut la variable globale
68-
__dirname: false, // Désactive la gestion de __dirname
69-
__filename: false // Désactive la gestion de __filename
70-
}
71-
});
72-
7396
module.exports = environment;

db/structure.sql

+4-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
2020
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
2121
--
2222

23-
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
23+
-- COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
2424

2525

2626
--
@@ -34,7 +34,7 @@ CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
3434
-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: -
3535
--
3636

37-
COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
37+
-- COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
3838

3939

4040
--
@@ -48,7 +48,7 @@ CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;
4848
-- Name: EXTENSION unaccent; Type: COMMENT; Schema: -; Owner: -
4949
--
5050

51-
COMMENT ON EXTENSION unaccent IS 'text search dictionary that removes accents';
51+
-- COMMENT ON EXTENSION unaccent IS 'text search dictionary that removes accents';
5252

5353

5454
--
@@ -4236,5 +4236,4 @@ INSERT INTO "schema_migrations" (version) VALUES
42364236
('20190215085241'),
42374237
('20190215085127'),
42384238
('20190212163331'),
4239-
('20190207111844');
4240-
4239+
('20190207111844');

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"jquery-ui": "1.12.1",
3232
"leaflet": "^1.8.0",
3333
"lodash.debounce": "^4.0.8",
34-
"mini-css-extract-plugin": "^2.0.0",
34+
"mini-css-extract-plugin": "^2.9.1",
3535
"npm": "^8.11.0",
3636
"popper.js": "^1.15.0",
3737
"postcss": "^8.0.0",
@@ -56,8 +56,8 @@
5656
"trix": "^1.3.2",
5757
"url-search-params-polyfill": "^8.0.0",
5858
"use-debounce": "5",
59-
"webpack": "^5",
60-
"webpack-cli": "^4",
59+
"webpack": "^4.46.0",
60+
"webpack-cli": "^3.3.12",
6161
"whatwg-fetch": "^3.2.0"
6262
},
6363
"devDependencies": {

0 commit comments

Comments
 (0)