AddCmd adds a minify function to the mimetype => function map (unsafe for concurrent use) that executes a command to process the minification. It allows the use of external tools like ClosureCompiler, UglifyCSS, etc. for a specific mimetype.
(mimetype string, cmd *exec.Cmd)
| 167 | // AddCmd adds a minify function to the mimetype => function map (unsafe for concurrent use) that executes a command to process the minification. |
| 168 | // It allows the use of external tools like ClosureCompiler, UglifyCSS, etc. for a specific mimetype. |
| 169 | func (m *M) AddCmd(mimetype string, cmd *exec.Cmd) { |
| 170 | m.mutex.Lock() |
| 171 | m.literal[mimetype] = &cmdMinifier{cmd} |
| 172 | m.mutex.Unlock() |
| 173 | } |
| 174 | |
| 175 | // AddCmdRegexp adds a minify function to the mimetype => function map (unsafe for concurrent use) that executes a command to process the minification. |
| 176 | // It allows the use of external tools like ClosureCompiler, UglifyCSS, etc. for a specific mimetype regular expression. |