Skip to content

Commit

Permalink
refactor: manage into src
Browse files Browse the repository at this point in the history
  • Loading branch information
usharerose committed Jul 20, 2024
1 parent 2a33c47 commit 3885864
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<body>
<div id="root"></div>
<script type="module" src="index.tsx"></script>
<script type="module" src="./src/index.tsx"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config: Config.InitialOptions = {
setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'\\.(jpg|jpeg|png|gif|svg)$': '<rootDir>/file-transform.js'
'\\.(jpg|jpeg|png|gif|svg)$': '<rootDir>/src/__mocks__/file-transform.js'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion App.tsx → src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';

import './App.css';
import { GeetestCaptchaObj, GeetestError, InitGeetestCallback } from './App.type';
import GithubIcon from './github-mark.svg';
import GithubIcon from './assets/github-mark.svg';

export default function App() {
const [inputGtValue, setInputGtValue] = useState('');
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion file-transform.js → src/__mocks__/file-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ module.exports = {
};
},
getCacheKey() {
return 'file-transformer';
return 'file-transform';
}
};
File renamed without changes
File renamed without changes.
1 change: 1 addition & 0 deletions index.tsx → src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom/client';

import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root')!);
Expand Down

0 comments on commit 3885864

Please sign in to comment.