Skip to content

Commit feb9dd1

Browse files
committed
Add events note
1 parent 6be41b7 commit feb9dd1

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,27 @@ You can also write plugins to do your own processing.
5353
- `findItemsToBeProcessed`: Find the items marked as `TO_BE_PROCESSED`. The items will be marked as such before they go processing.
5454
- `findItemsInProcessing`: Find the items being processed.
5555

56+
###Events
57+
58+
The event names are stored in the enum `$fileProcess.EVT`. Access the event name: `$fileProcess.EVT.ABORT_ITEM`.
59+
60+
The internal instance of class `Process` is called `proc`.
61+
62+
ABORT_ITEM : When an item is aborted.
63+
ABORT_ALL : When abortAll() is called.
64+
ERROR_ITEM : When the processor returned error during/after processing.
65+
SUCCESS_ITEM : When the processor returned success after processing.
66+
PROGRESS_ITEM : When the processor is progressing an item.
67+
PROGRESS_ALL : When the proc is updating the over all progress.
68+
COMPLETE_ALL : When the task list is complete.
69+
BEFORE_ADDING_A_FILE : Before adding a file to the list.
70+
AFTER_ADDING_A_FILE : After adding a file to the list.
71+
WHEN_ADDING_A_FILE_FAILED : When adding a file failed, usually caused by failure to passing the filter.
72+
AFTER_ADDING_ALL : After adding all files.
73+
BEFORE_PROCESSING_ITEM : Before processing an item.
74+
BEFORE_PROCESSING_ALL : Before processing all items in the list.
75+
76+
5677
##Using it as a file MD5 generator
5778

5879
var fileHandler = $fileProcess.create({
@@ -88,13 +109,11 @@ Before building the project, please install and configure the following dependen
88109
- [Node.js](http://nodejs.org/): For running Grunt.
89110
- [Grunt](http://gruntjs.com/): The build system. Install the grunt command-line tool globally with:
90111

91-
92-
npm install -g grunt-cli
112+
`npm install -g grunt-cli`
93113

94114
- [Bower](http://bower.io/): Manage client-side packages. Install the bower command-line tool globally with:
95115

96-
97-
npm install -g bower
116+
`npm install -g bower`
98117

99118
##Building angular-file-process
100119

0 commit comments

Comments
 (0)