socketstream/socketstream — pull request #402 by RomanMinkin (2013-10-08 21:26:37+00:00)
Title: Feature: Disable client modularization for paths

Hi guys,

Based on https://github.com/socketstream/socketstream/pull/368 (an option to disable modularization of client side code) I came up with this solution. because it's really headache to have deal with client ```require``` when you have deal with frameqork as Angualr.js, especially with **2e2** test.

So i reviews @dzz0615 https://github.com/socketstream/socketstream/pull/368 code and re-made it in more flexible way with options for certain paths definition.

Suppose we have next app structure:
```
client
\--code
\--app
\--controllers
*.js
\--directives
*.js
app.js
entry.js

```

So if we need to un-modularize only two paths ```client/code/app/controllers/**/*.js``` and ```client/code/app/directives/**/*.js``` now we can use next:

```JavaScript
ss.client.set({ brosefyExcludePaths: ['app/controllers', 'app/directives'] });
```

You can use also use full file path if you need so like:
```JavaScript
ss.client.set({ brosefyExcludePaths: ['app/app.js'] });
```

File ```app/entry.js``` could not be exclude in any cases.

To avoid complicity i use very simple path strings comparison approach:
```JavaScript
"app/controllers/localStorageController.js".split('app/controllers')[0] === ""
"app/controllers/".split('app/controllers')[0] === ""
"app/controllers/".split('controllers')[0] === "app/"
```

So if the first element of an array after string splitting by certain path should be empty string.

If it does make any cense and has a chance to me merged I would live to add this into docs.