Skip to content

Commit

Permalink
Install esbuild (and get rid of webpack)
Browse files Browse the repository at this point in the history
  • Loading branch information
cluster authored and samuelmanzanera committed Oct 27, 2022
1 parent 92ec5d0 commit 4cdc8c3
Show file tree
Hide file tree
Showing 18 changed files with 1,127 additions and 5,240 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
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
1 change: 0 additions & 1 deletion 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 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 4cdc8c3

Please sign in to comment.