Merge pull request #1358 from NoRedInk/component-catalog-rebundling

move component-catalog-app back under component-catalog/src
This commit is contained in:
Brian Hicks 2023-04-17 16:22:35 -05:00 committed by GitHub
commit 1e02d8564a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
72 changed files with 9 additions and 13 deletions

3
.gitignore vendored
View File

@ -6,9 +6,6 @@ elm-stuff
# elm-repl generated files
repl-temp-*
### Styleguide App
component-catalog-app/bundle.js
### Emacs ###
# -*- mode: gitignore; -*-
*~

View File

@ -1,4 +1,3 @@
elm-stuff/
src/
component-catalog-app/
tests/

View File

@ -96,7 +96,7 @@ main = do
cmd (WithStdout True) (FileStdout out) "elm-review"
"log/elm-review-component-catalog.txt" %> \out -> do
elmFiles <- getDirectoryFiles "." ["component-catalog/**/*.elm", "component-catalog-app/**/*.elm"]
elmFiles <- getDirectoryFiles "." ["component-catalog/**/*.elm"]
need (["package.json", "component-catalog/elm.json"] ++ elmFiles)
cmd (Cwd "component-catalog") (WithStdout True) (FileStdout out) "elm-review"
@ -110,7 +110,7 @@ main = do
writeFileChanged out "formatting checks passed"
"log/elm-format.txt" %> \out -> do
let placesToLook = ["src", "tests", "component-catalog", "component-catalog-app"]
let placesToLook = ["src", "tests", "component-catalog"]
elmFiles <- getDirectoryFiles "." (map (\place -> place </> "**" </> "*.elm") placesToLook)
need elmFiles
cmd (WithStdout True) (FileStdout out) "elm-format" "--validate" placesToLook
@ -156,9 +156,9 @@ main = do
cmd_ "./node_modules/.bin/browserify" "--entry" "component-catalog/manifest.js" "--outfile" out
"public/elm.js" %> \out -> do
elmSources <- getDirectoryFiles "." ["component-catalog-app/**/*.elm", "src/**/*.elm"]
elmSources <- getDirectoryFiles "." ["component-catalog/src/**/*.elm", "src/**/*.elm"]
need elmSources
cmd_ (Cwd "component-catalog") "elm" "make" "Main.elm" "--output" (".." </> out)
cmd_ (Cwd "component-catalog") "elm" "make" "src/Main.elm" "--output" (".." </> out)
"public/package.json" %> \out -> do
copyFileChanged "elm.json" out

View File

@ -1,8 +1,8 @@
{
"type": "application",
"source-directories": [
"../component-catalog-app",
"../src"
"../src",
"src"
],
"elm-version": "0.19.1",
"dependencies": {

View File

@ -22,7 +22,7 @@ config : List Rule
config =
List.map
(Review.Rule.ignoreErrorsForDirectories [ "../src" ]
>> Review.Rule.ignoreErrorsForFiles [ "../component-catalog-app/App.elm" ]
>> Review.Rule.ignoreErrorsForFiles [ "src/App.elm" ]
)
[ NoUnused.CustomTypeConstructors.rule []

View File

@ -12,7 +12,7 @@ shake --compact "$SHAKE_TARGET"
cat <<EOF
== 👋 Hello! ==================================================================
I'm watching files in component-catalog, component-catalog-app, and src for changes. If you make any
I'm watching files in component-catalog and src for changes. If you make any
changes, I'll try to be smart about what should change (things end up in the
"public" directory if you want to check my work.) If you remove a file and it's
still showing up, delete the "public" directory and restart me.

View File

@ -15,7 +15,7 @@ if test -d public; then rm -rf public; fi
mkdir public
# build the interactive parts
(cd component-catalog && npx elm make Main.elm --output ../public/elm.js)
(cd component-catalog && npx elm make src/Main.elm --output ../public/elm.js)
npx browserify --entry component-catalog/manifest.js --outfile public/bundle.js
# copy static files