-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Change project structure; update README
- Loading branch information
Showing
26 changed files
with
179 additions
and
167 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
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
@@ -1,61 +1,4 @@ | ||
// TODO - Refactor the initial filesystem state to read from a JSON file and then do this conversion. | ||
|
||
// Here we create initial file system structure. Changes are saved to LocalStorage. | ||
// System is reset to this on 'reboot' command. | ||
|
||
import { FileSystem } from './components/fs/FileSystem'; | ||
import { FsDir } from './components/fs/FsDir'; | ||
import { FsFile } from './components/fs/FsFile'; | ||
|
||
export const initialFilesystem = new FileSystem(); | ||
|
||
initialFilesystem | ||
.add(new FsDir('.tmp-dir'), []) | ||
|
||
initialFilesystem | ||
.add(new FsFile('.hidden', 'There is a hidden file.'), []); | ||
|
||
initialFilesystem | ||
.add(new FsDir('docs'), []) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsFile('moretodo.txt', 'A, B, C.')) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsFile('ok.txt', 'I am ok.')) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsFile( | ||
'shoplist.txt', | ||
`-Apples\n-Bananas\n-Cookies` | ||
) | ||
); | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsDir('private')) | ||
|
||
initialFilesystem | ||
.get(['docs', 'private']) | ||
.add(new FsFile('secret.txt', 'PxNmGkl6M+jDP4AYAKZET18SEnWD5qw5LIP9174lONWslF144K9VHFIk1JA=')) | ||
|
||
initialFilesystem | ||
.get(['docs', 'private']) | ||
.add(new FsDir('opt')) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsDir('tmp')) | ||
|
||
initialFilesystem | ||
.add(new FsDir('more'), []) | ||
.add(new FsFile('moretodo.txt', `Don't forget this other stuff.`)) | ||
|
||
initialFilesystem | ||
.add(new FsDir('stuff'), []) | ||
|
||
initialFilesystem | ||
.add(new FsFile('cool.txt', 'There is a hidden command in this terminal called \'secret\'.'), []); | ||
const myFileSystem = { | ||
file1: 'f1', | ||
dir1: 'dir' | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,61 @@ | ||
// TODO - Refactor the initial filesystem state to read from a JSON file and then do this conversion. | ||
|
||
// Here we create initial file system structure. Changes are saved to LocalStorage. | ||
// System is reset to this on 'reboot' command. | ||
|
||
import { FileSystem } from './components/fs/FileSystem'; | ||
import { FsDir } from './components/fs/FsDir'; | ||
import { FsFile } from './components/fs/FsFile'; | ||
|
||
export const initialFilesystem = new FileSystem(); | ||
|
||
initialFilesystem | ||
.add(new FsDir('.tmp-dir'), []) | ||
|
||
initialFilesystem | ||
.add(new FsFile('.hidden', 'There is a hidden file.'), []); | ||
|
||
initialFilesystem | ||
.add(new FsDir('docs'), []) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsFile('moretodo.txt', 'A, B, C.')) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsFile('ok.txt', 'I am ok.')) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsFile( | ||
'shoplist.txt', | ||
`-Apples\n-Bananas\n-Cookies` | ||
) | ||
); | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsDir('private')) | ||
|
||
initialFilesystem | ||
.get(['docs', 'private']) | ||
.add(new FsFile('secret.txt', 'PxNmGkl6M+jDP4AYAKZET18SEnWD5qw5LIP9174lONWslF144K9VHFIk1JA=')) | ||
|
||
initialFilesystem | ||
.get(['docs', 'private']) | ||
.add(new FsDir('opt')) | ||
|
||
initialFilesystem | ||
.get(['docs']) | ||
.add(new FsDir('tmp')) | ||
|
||
initialFilesystem | ||
.add(new FsDir('more'), []) | ||
.add(new FsFile('moretodo.txt', `Don't forget this other stuff.`)) | ||
|
||
initialFilesystem | ||
.add(new FsDir('stuff'), []) | ||
|
||
initialFilesystem | ||
.add(new FsFile('cool.txt', 'There is a hidden command in this terminal called \'secret\'.'), []); |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
entry: './src/js/index.js', | ||
entry: './src/main/index.js', | ||
mode: 'development', | ||
output: { | ||
filename: 'bundle.min.js', | ||
path: path.resolve(__dirname, 'src'), | ||
path: path.resolve(__dirname, 'src/js'), | ||
}, | ||
}; |