Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 4d236da

Browse files
authored
Merge pull request #1 from coveo/support-custom-modifier
Add support for CustomModifiers
2 parents 55c8ff2 + 8d0278d commit 4d236da

25 files changed

+2328
-275
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
2-
dist/
2+
dist/
3+
tests/samples-ouput/index\.js

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ Since Visualforce pages can have multiple references to your Salesforce organiza
2929
```javascript
3030
var config = {
3131
SalesforceContext: {
32+
CustomModifiers: {
33+
'<MyNameSpace:MyComponent.*?></MyNameSpace:MyComponent>':
34+
`<script src="myscripts/mystuff.js"></script>
35+
<link rel="stylesheet" href="mycss/mystuff.css"/>`
36+
},
3237
Resources: {
3338
jquery: "jquery/dist/"
3439
},
@@ -43,3 +48,5 @@ var config = {
4348
```
4449

4550
This configuration will resolve `$Resource.jquery` and `{!foo}` in your pages allowing you to use the same `<apex:stylesheet>` and `<apex:includeScript>` imports you would in Salesforce.
51+
52+
The CustomModifiers option allow to specify a regex to match a resource in your Visualforce page, and the content with which to replace it.

0 commit comments

Comments
 (0)