Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template support for solidityVersion, networks and tailwind extend #109

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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")],
Expand All @@ -19,6 +19,7 @@ module.exports = {
},
theme: {
extend: {
${extendTheme},
technophile-04 marked this conversation as resolved.
Show resolved Hide resolved
boxShadow: {
center: "0 0 12px -2px rgb(0 0 0 / 0.05)",
},
Expand Down Expand Up @@ -91,4 +92,5 @@ export default withDefaults(contents, {
opacity: "80%",
},
}`,
extendTheme: "",
});
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -24,7 +24,7 @@ const etherscanApiKey = process.env.ETHERSCAN_API_KEY || "DNXJA8RX2Q3VZ4URQIWP7Z

const config: HardhatUserConfig = {
solidity: {
version: "0.8.17",
version: "${solidityVersion}",
technophile-04 marked this conversation as resolved.
Show resolved Hide resolved
settings: {
optimizer: {
enabled: true,
Expand All @@ -41,6 +41,7 @@ const config: HardhatUserConfig = {
},
},
networks: {
${networks},
technophile-04 marked this conversation as resolved.
Show resolved Hide resolved
// View the networks that are pre-configured.
// If the network you are looking for is not here you can add new network settings
hardhat: {
Expand Down Expand Up @@ -141,4 +142,6 @@ export default config;`;

export default withDefaults(contents, {
imports: "",
solidityVersion: "0.8.17",
networks: "",
});
Loading