Skip to content

Commit

Permalink
Update dependencies (#658)
Browse files Browse the repository at this point in the history
* Upgrade phoenix to 1.6

* Replace .html.eex/.html.leex by .html.heex and ~L by ~H

* Update other dependencies

* Install esbuild (and get rid of webpack)

* Update dependencies

* Update cors_plug

* Set deps versions to MAJOR.MINOR and check for deps updates

* Fix alpine error by upgrading esbuild target version
  • Loading branch information
cluster committed Oct 28, 2022
1 parent 73d4258 commit 42de9d9
Show file tree
Hide file tree
Showing 59 changed files with 1,700 additions and 5,814 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ erl_crash.dump
# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/*
# /priv/static/*

/assets/node_modules

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
- name: Install dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: mix deps.get
- name: Check dependency updates
run: mix hex.outdated --within-requirements 1>/dev/null || echo 'Updates available!'
- name: Set Formatting
run: mix format --check-formatted
- name: Restore build cache
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ erl_crash.dump
# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/*
/priv/static/css
/priv/static/js
!/priv/static/docs/**/*.md

# Self signed cert are used for local and dev purposes
Expand Down
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,25 @@ COPY config ./config
RUN mix do deps.get, deps.compile

# build assets
COPY priv ./priv
COPY assets ./assets
RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error \
&& npm --prefix ./assets run deploy
RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error

COPY . .

RUN git config user.name aebot \
&& git config user.email aebot@archethic.net \
&& git remote add origin https://github.com/archethic-foundation/archethic-node

# Install Dart Sass
RUN npm install -g sass

# build Sass -> CSS
RUN cd assets && \
sass --no-source-map --style=compressed css/app.scss ../priv/static/css/app.css && cd -

# build release
RUN mix do phx.digest, distillery.release
RUN mix do assets.deploy, distillery.release

# gen PLT
RUN if [ $with_tests -eq 1 ]; then mix git_hooks.run pre_push ;fi
Expand Down
2 changes: 1 addition & 1 deletion assets/css/app.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@charset "utf-8";

@import "variables";
@import "~bulma/bulma";
@import "../node_modules/bulma/bulma";

@import "explorer";

Expand Down
3 changes: 1 addition & 2 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// We need to import the CSS so that webpack will load it.
// The MiniCssExtractPlugin is used to separate it out into
// its own CSS file.
import {} from "../css/app.scss";
import {} from "./ui";
import {
initializeNbTransactionGraph,
Expand All @@ -15,7 +14,7 @@ import { createWorldmap, updateWorldmap } from "./worldmap";
// entry points. Those entry points can be configured

import { Socket } from "phoenix";
import LiveSocket from "phoenix_live_view";
import { LiveSocket } from "phoenix_live_view";
import { html } from "diff2html";
import hljs from "highlight.js";

Expand Down
2 changes: 1 addition & 1 deletion assets/js/worldmap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as echarts from 'echarts'
import worldmapJSON from '../static/worldmap.json'
import worldmapJSON from './worldmap.json'

let map
let minNbOfAuthorizedNodes
Expand Down
File renamed without changes.
Loading

0 comments on commit 42de9d9

Please sign in to comment.