Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Current features:
- `#deployFiles` : Deploy all the methods of the FileLibrary into files except the ones in the `#accessing` protocol. Each file will be in a folder corresponding to his protocol. Thus you can categorize the files in protocols as 'css', 'javascript', 'sass'...
- `#importFiles` : Reimport all the files.
- `#openImportButton` : When you need to import multiple times, for example when you use the watch command of SASS, it is easier to just clic on a button into Pharo. This method is here for you!
- `#filesDirectory` : Override this class method if you use a shared directory (like a git repo) between images.

## Future Ideas

Expand Down
12 changes: 11 additions & 1 deletion src/FileLibraryHelper/WAFileLibrary.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,21 @@ WAFileLibrary class >> export: methods inFolder: subFolder [
every: 200
]

{ #category : #'*FileLibraryHelper' }
WAFileLibrary class >> filesDirectory [
^ FileSystem workingDirectory
]

{ #category : #'*FileLibraryHelper' }
WAFileLibrary class >> importFiles [
<script>
self importFilesFrom: self filesDirectory
]

{ #category : #'*FileLibraryHelper' }
WAFileLibrary class >> importFilesFrom: aDirectory [
EpMonitor
disableDuring: [ ((FileSystem workingDirectory / self resourcesFolderName) directories reject: [ :each | each basename beginsWith: '.' ])
disableDuring: [ ((aDirectory / self resourcesFolderName) directories reject: [ :each | each basename beginsWith: '.' ])
do: [ :directory |
directory files
do: [ :file |
Expand Down