1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

fix compile assets in production

This commit is contained in:
Sylvain 2022-03-14 17:00:49 +01:00
parent ac0dacbc88
commit 9385c83b6d
5 changed files with 32 additions and 52 deletions

View File

@ -7,7 +7,7 @@
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
Rails.application.config.content_security_policy do |policy| # # If you are using webpack-dev-server then specify webpack-dev-server host
policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
policy.connect_src :self, :https, 'http://localhost:3035', 'ws://localhost:3035' if Rails.env.development?
# policy.default_src :self, :https
# policy.font_src :self, :https, :data

View File

@ -18,11 +18,11 @@ development:
smtp_port: <%= ENV["SMTP_PORT"] %>
time_zone: <%= ENV["TIME_ZONE"] %>
week_starting_day: <%= ENV["WEEK_STARTING_DAY"] %>
d3_date_format: <%= ENV["D3_DATE_FORMAT"].dump %> # .dump is needed as the value may start by a '%', see https://github.com/tenderlove/psych/issues/75
d3_date_format: <%= ENV.fetch("D3_DATE_FORMAT", '%y-%m-%d').dump %> # .dump is needed as the value may start by a '%', see https://github.com/tenderlove/psych/issues/75
uib_date_format: <%= ENV["UIB_DATE_FORMAT"] %>
excel_date_format: <%= ENV["EXCEL_DATE_FORMAT"]%>
rails_locale: <%= ENV["RAILS_LOCALE"].dump %>
app_locale: <%= ENV["APP_LOCALE"].dump %>
rails_locale: <%= ENV.fetch("RAILS_LOCALE", 'en').dump %>
app_locale: <%= ENV.fetch("APP_LOCALE", 'en').dump %>
moment_locale: <%= ENV["MOMENT_LOCALE"] %>
summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %>
angular_locale: <%= ENV["ANGULAR_LOCALE"] %>
@ -80,7 +80,7 @@ staging:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
default_host: <%= ENV["DEFAULT_HOST"] %>
default_protocol: <%= ENV["DEFAULT_PROTOCOL"] %>
delivery_method: <%= ENV['DELIVERY_METHOD'] %>
delivery_method: <%= ENV.fetch('DELIVERY_METHOD', 'smtp') %>
smtp_address: <%= ENV["SMTP_ADDRESS"] %>
smtp_port: <%= ENV["SMTP_PORT"] %>
smtp_user_name: <%= ENV["SMTP_USER_NAME"] %>
@ -90,11 +90,11 @@ staging:
smtp_openssl_verify_mode: <%= ENV["SMTP_OPENSSL_VERIFY_MODE"] %>
time_zone: <%= ENV["TIME_ZONE"] %>
week_starting_day: <%= ENV["WEEK_STARTING_DAY"] %>
d3_date_format: <%= ENV["D3_DATE_FORMAT"].dump %>
d3_date_format: <%= ENV.fetch("D3_DATE_FORMAT", '%y-%m-%d').dump %>
uib_date_format: <%= ENV["UIB_DATE_FORMAT"] %>
excel_date_format: <%= ENV["EXCEL_DATE_FORMAT"]%>
rails_locale: <%= ENV["RAILS_LOCALE"].dump %>
app_locale: <%= ENV["APP_LOCALE"].dump %>
rails_locale: <%= ENV.fetch("RAILS_LOCALE", 'en').dump %>
app_locale: <%= ENV.fetch("APP_LOCALE", 'en').dump %>
moment_locale: <%= ENV["MOMENT_LOCALE"] %>
summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %>
angular_locale: <%= ENV["ANGULAR_LOCALE"] %>
@ -123,7 +123,7 @@ production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
default_host: <%= ENV["DEFAULT_HOST"] %>
default_protocol: <%= ENV["DEFAULT_PROTOCOL"] %>
delivery_method: <%= ENV['DELIVERY_METHOD'] %>
delivery_method: <%= ENV.fetch('DELIVERY_METHOD', 'smtp') %>
smtp_address: <%= ENV["SMTP_ADDRESS"] %>
smtp_port: <%= ENV["SMTP_PORT"] %>
smtp_user_name: <%= ENV["SMTP_USER_NAME"] %>
@ -133,11 +133,11 @@ production:
smtp_enable_starttls_auto: <%= ENV["SMTP_ENABLE_STARTTLS_AUTO"] %>
smtp_openssl_verify_mode: <%= ENV["SMTP_OPENSSL_VERIFY_MODE"] %>
week_starting_day: <%= ENV["WEEK_STARTING_DAY"] %>
d3_date_format: <%= ENV["D3_DATE_FORMAT"].dump %>
d3_date_format: <%= ENV.fetch("D3_DATE_FORMAT", '%y-%m-%d').dump %>
uib_date_format: <%= ENV["UIB_DATE_FORMAT"] %>
excel_date_format: <%= ENV["EXCEL_DATE_FORMAT"]%>
rails_locale: <%= ENV["RAILS_LOCALE"].dump %>
app_locale: <%= ENV["APP_LOCALE"].dump %>
rails_locale: <%= ENV.fetch("RAILS_LOCALE", 'en').dump %>
app_locale: <%= ENV.fetch("APP_LOCALE", 'en').dump %>
moment_locale: <%= ENV["MOMENT_LOCALE"] %>
summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %>
angular_locale: <%= ENV["ANGULAR_LOCALE"] %>

View File

@ -2,16 +2,6 @@ module.exports = {
test: /\.(scss|sass)$/i,
exclude: /node_modules/,
use: [
{
loader: require('mini-css-extract-plugin').loader
},
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2
}
},
{
loader: 'resolve-url-loader',
options: {

View File

@ -2,16 +2,6 @@ module.exports = {
test: /\.(scss|sass)\.erb$/,
exclude: /node_modules/,
use: [
{
loader: require('mini-css-extract-plugin').loader
},
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2
}
},
{
loader: 'resolve-url-loader',
options: {

View File

@ -21,21 +21,9 @@
},
"license": "AGPL-3.0-only",
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-object-rest-spread": "^7.15.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-destructuring": "^7.14.7",
"@babel/plugin-transform-runtime": "7",
"@babel/preset-env": "7",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.4",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"auto-ngtemplate-loader": "^3.1.0",
"babel-loader": "8",
"babel-plugin-macros": "^3.1.0",
"core-js": "^3.21.1",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"eslint": "~6.8.0",
"eslint-config-standard": "~14.1.1",
"eslint-plugin-import": "~2.20.1",
@ -44,19 +32,17 @@
"eslint-plugin-promise": "~4.2.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-standard": "~4.0.1",
"html-loader": "^1.3.0",
"mini-css-extract-plugin": "^2.6.0",
"ngtemplate-loader": "^2.1.0",
"rails-erb-loader": "^5.5.2",
"react-refresh": "^0.11.0",
"resolve-url-loader": "^4.0.0",
"sass": "^1.49.9",
"sass-loader": "^12.6.0",
"style-loader": "^3.3.1",
"webpack-dev-server": "^4.7.4"
},
"dependencies": {
"@babel/core": "7",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-object-rest-spread": "^7.15.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-destructuring": "^7.14.7",
"@babel/plugin-transform-runtime": "7",
"@babel/preset-env": "7",
"@babel/preset-react": "^7.12.1",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime": "7",
@ -99,16 +85,23 @@
"angular-ui-tour": "https://github.com/sleede/angular-ui-tour.git#master",
"angular-unsavedchanges": "0.2",
"angular-xeditable": "0.10",
"auto-ngtemplate-loader": "^3.1.0",
"axios": "^0.21.2",
"babel-loader": "8",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"bootstrap-sass": "3.4.1",
"checklist-model": "0.2",
"codemirror": "^5.58.2",
"compression-webpack-plugin": "9",
"core-js": "^3.21.1",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"d3": "3.5",
"elasticsearch-browser": "3.1",
"fullcalendar": "3.10.2",
"holderjs": "2.6",
"html-loader": "^1.3.0",
"i18next": "^21.6.13",
"i18next-http-backend": "^1.3.2",
"i18next-icu": "^2.0.3",
@ -118,13 +111,16 @@
"jquery": ">=3.5.0",
"jquery-ujs": "^1.2.2",
"medium-editor": "^5.23.3",
"mini-css-extract-plugin": "^2.6.0",
"moment": "2.22",
"moment-timezone": "0.5",
"ng-caps-lock": "https://github.com/FabioMR/ng-caps-lock.git#1.0.3",
"ng-fittext": "https://github.com/patrickmarabeas/ng-FitText.js.git#4.1.1",
"ngUpload": "0.5",
"ngtemplate-loader": "^2.1.0",
"nvd3": "1.8",
"prop-types": "^15.7.2",
"rails-erb-loader": "^5.5.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-i18next": "^11.15.6",
@ -132,7 +128,11 @@
"react-select": "^4.3.1",
"react-switch": "^6.0.0",
"react2angular": "^4.0.6",
"resolve-url-loader": "^4.0.0",
"sass": "^1.49.9",
"sass-loader": "^12.6.0",
"shakapacker": "6.1.1",
"style-loader": "^3.3.1",
"summernote": "0.8.18",
"terser-webpack-plugin": "5",
"twitter-fetcher": "^18.0.2",