Skip to content

Commit

Permalink
Add explanation on how to modify the generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
Hi-Angel committed Nov 8, 2024
1 parent bee08c7 commit 19b0082
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
19 changes: 9 additions & 10 deletions codegen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ const htmlGenFile = "../src/React/Basic/DOM/Generated.purs";
const htmlSimplifiedGenFile = "../src/React/Basic/DOM/Simplified/Generated.purs";
const svgGenFile = "../src/React/Basic/DOM/SVG.purs";

const htmlHeader = `-- | ----------------------------------------
const warningHeader = `-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------
`;

const htmlHeader = `${warningHeader}
module React.Basic.DOM.Generated where
import Data.Nullable (Nullable)
Expand All @@ -23,10 +28,7 @@ import Web.DOM (Node)
`;

const simplifiedHtmlHeader = `-- | ----------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
const simplifiedHtmlHeader = `${warningHeader}
module React.Basic.DOM.Simplified.Generated where
import Data.Nullable (Nullable)
Expand Down Expand Up @@ -55,10 +57,7 @@ const propType = (e, p) => {
}
}

const svgHeader = `-- | ----------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
const svgHeader = `${warningHeader}
module React.Basic.DOM.SVG where
import Data.Nullable (Nullable)
Expand Down
7 changes: 5 additions & 2 deletions src/React/Basic/DOM/Generated.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- | ----------------------------------------
-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------

module React.Basic.DOM.Generated where

Expand Down
7 changes: 5 additions & 2 deletions src/React/Basic/DOM/SVG.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- | ----------------------------------------
-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------

module React.Basic.DOM.SVG where

Expand Down
7 changes: 5 additions & 2 deletions src/React/Basic/DOM/Simplified/Generated.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- | ----------------------------------------
-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------

module React.Basic.DOM.Simplified.Generated where

Expand Down

0 comments on commit 19b0082

Please sign in to comment.