|
|
|
@ -11,7 +11,7 @@ import { getValidLanguage } from '@remix-project/remix-solidity' |
|
|
|
|
import { CopyToClipboard } from '@remix-ui/clipboard' |
|
|
|
|
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
|
|
|
|
|
import * as json_config from '../../../../../apps/remix-ide/contracts/solidity_compiler_config.json' |
|
|
|
|
import { readFileSync } from 'fs' |
|
|
|
|
import { configFileContent } from './compilerConfiguration' |
|
|
|
|
|
|
|
|
|
import './css/style.css' |
|
|
|
|
|
|
|
|
@ -188,18 +188,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const createNewConfigFile = async () => { |
|
|
|
|
if (json_config.default) json_config.default = null |
|
|
|
|
const configFileContent = JSON.stringify(json_config, null, '\t') |
|
|
|
|
console.log("file content as string -> ", json_config) |
|
|
|
|
console.log("file content as json -> ", configFileContent) |
|
|
|
|
try { |
|
|
|
|
const contentContent: string = readFileSync('../../../../../apps/remix-ide/contracts/solidity_compiler_config.json', 'utf8') |
|
|
|
|
console.log("content is ", contentContent) |
|
|
|
|
|
|
|
|
|
} catch (err) { |
|
|
|
|
console.log(err); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const configFileJSON = JSON.stringify(configFileContent, null, '\t') |
|
|
|
|
console.log("file content as string -> ", configFileContent) |
|
|
|
|
console.log("file content as json -> ", configFileJSON) |
|
|
|
|
|
|
|
|
|
const filePath = configFilePathInput.current && configFilePathInput.current.value !== '' ? configFilePathInput.current.value : state.configFilePath |
|
|
|
|
await api.writeFile(filePath, configFileContent) |
|
|
|
|