Merge pull request #895 from eikek/declutter-root

Move webapp related build files into the webapp directory
This commit is contained in:
eikek 2021-06-22 23:58:07 +02:00 committed by GitHub
commit 2e8faca5df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 12 additions and 6 deletions

View File

@ -16,6 +16,8 @@ jobs:
with: with:
elm-version: 0.19.1 elm-version: 0.19.1
- uses: bahmutov/npm-install@v1 - uses: bahmutov/npm-install@v1
with:
working-directory: modules/webapp
- name: Fetch tags - name: Fetch tags
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/* run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
- uses: olafurpg/setup-scala@v12 - uses: olafurpg/setup-scala@v12

View File

@ -21,6 +21,8 @@ jobs:
with: with:
elm-version: 0.19.1 elm-version: 0.19.1
- uses: bahmutov/npm-install@v1 - uses: bahmutov/npm-install@v1
with:
working-directory: modules/webapp
- name: Coursier cache - name: Coursier cache
uses: coursier/cache-action@v6 uses: coursier/cache-action@v6
- name: Set current version - name: Set current version

View File

@ -21,6 +21,8 @@ jobs:
with: with:
elm-version: 0.19.1 elm-version: 0.19.1
- uses: bahmutov/npm-install@v1 - uses: bahmutov/npm-install@v1
with:
working-directory: modules/webapp
- name: Coursier cache - name: Coursier cache
uses: coursier/cache-action@v6 uses: coursier/cache-action@v6
- name: Set current version - name: Set current version

View File

@ -1,8 +1,8 @@
{ {
"type": "application", "type": "application",
"source-directories": [ "source-directories": [
"modules/webapp/src/main/elm", "src/main/elm",
"modules/webapp/target/elm-src" "target/elm-src"
], ],
"elm-version": "0.19.1", "elm-version": "0.19.1",
"dependencies": { "dependencies": {

View File

@ -15,9 +15,9 @@ const prodPlugins =
require("autoprefixer"), require("autoprefixer"),
require("@fullhuman/postcss-purgecss")({ require("@fullhuman/postcss-purgecss")({
content: [ content: [
"./modules/webapp/src/main/elm/**/*.elm", "./src/main/elm/**/*.elm",
"./modules/webapp/src/main/styles/keep.txt", "./src/main/styles/keep.txt",
"./modules/restserver/src/main/templates/*.html" "../restserver/src/main/templates/*.html"
], ],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/\.]+/g) || [] defaultExtractor: content => content.match(/[A-Za-z0-9-_:/\.]+/g) || []
}), }),

View File

@ -50,7 +50,7 @@ object StylesPlugin extends AutoPlugin {
val npm = stylesNpmCommand.value val npm = stylesNpmCommand.value
val inDir = stylesDirectory.value val inDir = stylesDirectory.value
val outDir = stylesOutputDir.value val outDir = stylesOutputDir.value
val wd = (LocalRootProject / baseDirectory).value val wd = (Compile / baseDirectory).value
val mode = stylesMode.value val mode = stylesMode.value
npmInstall(npm, wd, logger) npmInstall(npm, wd, logger)
val files = postCss(npx, inDir, outDir, wd, mode, logger) ++ val files = postCss(npx, inDir, outDir, wd, mode, logger) ++