-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add dynamic type support & configuration file
- Loading branch information
Showing
7 changed files
with
56 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import fs from 'fs' | ||
import path from 'path' | ||
|
||
const projectDir = process.env.INIT_CWD; | ||
process.chdir(projectDir); | ||
const configFile = `${projectDir}/../../theme-manager.config`; | ||
|
||
const content = ` | ||
import config from ${JSON.stringify(configFile)}; | ||
export default config; | ||
`; | ||
|
||
const packageDir = process.cwd(); | ||
const filePath = path.join(packageDir, 'dist', 'theme-config.ts'); | ||
|
||
fs.mkdirSync(path.join(packageDir, 'dist'), { recursive: true }); | ||
fs.writeFileSync(filePath, content); | ||
|
||
console.log(`Created ${filePath}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters