diff --git a/.changeset/shiny-papayas-hide.md b/.changeset/shiny-papayas-hide.md new file mode 100644 index 000000000..b8e0bfc7a --- /dev/null +++ b/.changeset/shiny-papayas-hide.md @@ -0,0 +1,5 @@ +--- +"create-eth": patch +--- + +Allow solidity versions and networks + tailwind extend theme diff --git a/templates/base/packages/nextjs/tailwind.config.js.template.mjs b/templates/base/packages/nextjs/tailwind.config.js.template.mjs index 411fbeb62..ee85fd42f 100644 --- a/templates/base/packages/nextjs/tailwind.config.js.template.mjs +++ b/templates/base/packages/nextjs/tailwind.config.js.template.mjs @@ -1,6 +1,6 @@ import { withDefaults } from "../../../utils.js"; -const contents = ({ lightTheme, darkTheme }) => `/** @type {import('tailwindcss').Config} */ +const contents = ({ lightTheme, darkTheme, extendTheme }) => `/** @type {import('tailwindcss').Config} */ module.exports = { content: ["./app/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}", "./utils/**/*.{js,ts,jsx,tsx}"], plugins: [require("daisyui")], @@ -19,6 +19,7 @@ module.exports = { }, theme: { extend: { + ${extendTheme[0] && `${extendTheme[0]},`} boxShadow: { center: "0 0 12px -2px rgb(0 0 0 / 0.05)", }, @@ -91,4 +92,5 @@ export default withDefaults(contents, { opacity: "80%", }, }`, + extendTheme: "", }); diff --git a/templates/solidity-frameworks/hardhat/packages/hardhat/hardhat.config.ts.template.mjs b/templates/solidity-frameworks/hardhat/packages/hardhat/hardhat.config.ts.template.mjs index 06b120391..0aea05d11 100644 --- a/templates/solidity-frameworks/hardhat/packages/hardhat/hardhat.config.ts.template.mjs +++ b/templates/solidity-frameworks/hardhat/packages/hardhat/hardhat.config.ts.template.mjs @@ -1,6 +1,6 @@ import { withDefaults } from "../../../../utils.js"; -const contents = ({ imports }) => `import * as dotenv from "dotenv"; +const contents = ({ imports, solidityVersion, networks }) => `import * as dotenv from "dotenv"; dotenv.config(); import { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-ethers"; @@ -24,7 +24,7 @@ const etherscanApiKey = process.env.ETHERSCAN_API_KEY || "DNXJA8RX2Q3VZ4URQIWP7Z const config: HardhatUserConfig = { solidity: { - version: "0.8.17", + version: "${solidityVersion[0]}", settings: { optimizer: { enabled: true, @@ -41,6 +41,7 @@ const config: HardhatUserConfig = { }, }, networks: { + ${networks[0] && `${networks[0]},`} // View the networks that are pre-configured. // If the network you are looking for is not here you can add new network settings hardhat: { @@ -141,4 +142,6 @@ export default config;`; export default withDefaults(contents, { imports: "", + solidityVersion: "0.8.17", + networks: "", });