build(striker-ui): revise Makefile.am to include new pages and src files

main
Tsu-ba-me 2 years ago
parent 97b94eae50
commit 75602010e8
  1. 78
      striker-ui/Makefile.am
  2. 37
      striker-ui/lsxdist

@ -7,60 +7,44 @@ nextbuilddir = .next
# List of paths relative to the build output directory. # List of paths relative to the build output directory.
# #
outpages = \ outpages = \
index.html \ anvil.html \
server.html \ config.html \
file-manager.html file-manager.html \
index.html \
init.html \
prepare-host.html \
server.html
outjsmodulesdir = _next outjsmodulesdir = _next
outimagesdir = pngs outimagesdir = pngs
# The build output directory listed under EXTRA_DIST contains the files to # The build output directory listed under EXTRA_DIST contains the files to
# include in the release/source tarball. # include in the release/source tarball.
# #
# It is recommended to use the following command to regenerate the file list # It is recommended to use the lsxdist script to regenerate the file list
# as files get added/removed: # as files get added/removed.
# #
# find . \ EXTRA_DIST = \
# -mindepth 1 -maxdepth 1 \ $(nextoutdir) \
# -not \( -name node_modules -prune \) \ commitlint.config.js \
# -not \( -name *git* -prune \) \ components \
# -not \( -name *husky* -prune \) \ .env \
# -not \( -name public -prune \) \ .eslintignore \
# -not \( -name *[Mm]ake* -prune \) \ .eslintrc.json \
# | sed -E 's@^./(.+)$@\1 \\@' hooks \
# lib \
# The find command: .lintstagedrc.json \
# * ignores ./node_modules directory, next.config.js \
# * ignores git related files, next-env.d.ts \
# * ignores husky related files package.json \
# * ignores ./public directory package-lock.json \
# * ignores make related files, and pages \
# * removes leading "./" and append "\" .prettierrc.json \
# README.md \
# Note: This only works when we want to include all files within the listed styles \
# subdirectories. It is recommended to run a similar find command on a theme \
# subdirectory to skip undesired files in the subdirectory. tsconfig.json \
# types
EXTRA_DIST = \
$(nextoutdir) \
next.config.js \
next-env.d.ts \
tsconfig.json \
theme \
styles \
.lintstagedrc.json \
README.md \
package.json \
lib \
.prettierrc.json \
types \
components \
pages \
.eslintrc.json \
commitlint.config.js \
.eslintignore \
.env \
package-lock.json
# Blank target; the build output directory should be usable as-is. # Blank target; the build output directory should be usable as-is.
$(nextoutdir): ; $(nextoutdir): ;

@ -0,0 +1,37 @@
#!/bin/bash
#
# This script is for listing the EXTRA_DIST value in Makefile.am
#
# Note: the build output directory (out/ at the time of writing) should be
# replaced by the corresponding variable set in the Makefile (currently
# "nextoutdir").
#
# The find command:
# * ignores node_modules/ directory,
# * ignores git related files,
# * ignores husky related files,
# * ignores public/ directoy,
# * ignores make related files,
# * ignores environment-specific dot env files,
# * ignores this script,
# * ignores auto-generated .next/
# and
# * removes leading "./" and append "\"
found=$(find . \
-mindepth 1 -maxdepth 1 \
-not \( -name node_modules -prune \) \
-not \( -name *git* -prune \) \
-not \( -name *husky* -prune \) \
-not \( -name public -prune \) \
-not \( -name *[Mm]ake* -prune \) \
-not \( -name [.]env[.]* -prune \) \
-not \( -name "*$(basename ${BASH_SOURCE[0]})*" -prune \) \
-not \( -name ".next" -prune \) \
| sed -E 's@^./(.+)$@\1 \\@')
sorted=$(sort <<< "$found")
echo "${sorted::-1}"
echo "lines: $(wc -l <<< "$found")"
Loading…
Cancel
Save