-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add local config files #180
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
53f492d
Extract api and use different entry points
unDemian e4e5bbc
Add api file and new entry point for dist target
unDemian ff1d9ff
Remove dist files from repo
unDemian 6e25b05
Rename dist to browser
unDemian 1e163e5
Add npm commands for dev and fix hotrealoading
unDemian 3a3986c
Use local css and configs for development
unDemian 845bcd9
Address feedback
unDemian fbfc9cf
Update webpack.dist.config.js
unDemian e9934e2
Update package-lock to match master
unDemian e3a1930
Remove lodash-webpack-plugin
unDemian f0b492c
Address feedback
unDemian 036a38b
Initial jsdocs for eventAPI
oandregal a8d1967
Fix merge conflicts
unDemian 3a74514
Fix merge conflicts
unDemian 237ec14
Fix merge conflicts
unDemian 0c1a3bc
Remove dists
unDemian b6bb6d8
Fix merge conflicts
unDemian a45139b
Fix commands
unDemian 2790e04
Fix targets npm command
unDemian 595906e
Fix merge conflicts
unDemian e177c5f
Fix merge conflicts
unDemian ffeddf6
Update standalone
unDemian c4bf870
Fix merge conflicts
unDemian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Config files | ||
|
||
Based on the value of `process.env.NODE_ENV` either `development.json` or `production.json` will be | ||
loaded. | ||
|
||
If you need to use override some configuration fields while developing you can create a `development.local.json` | ||
file in this folder, which will be ignored by git and will get precedence over the values in `development.json` | ||
|
||
If there is a `development.local.json` file it will get merged with the JSON object from `development.json` | ||
overriding the values for the fields they share. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Happychat Embedded</title> | ||
<style> | ||
body { | ||
margin-left: 12%; | ||
margin-right: 12%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="support"></div> | ||
<script type="text/javascript" src="./happychat.js" charset="utf-8"></script> | ||
<script type="text/javascript"> | ||
Happychat.open( { | ||
accessToken: window.HappychatAccessTokenPromise, | ||
nodeId: 'support', | ||
groups: ['woo'], | ||
entryOptions: { | ||
primaryOptions: [ | ||
{ 'value': 'before-buy', 'label': 'Before you buy', }, | ||
{ 'value': 'account', 'label': 'Help with my account', }, | ||
{ 'value': 'broken', 'label': 'Something is broken', canChat: false }, | ||
], | ||
secondaryOptions: [ | ||
{ 'value': 'config', 'label': 'Help configuring', canChat: false, primary: [ 'account' ], }, | ||
{ 'value': 'order', 'label': 'Help with an order', primary: [ 'account' ], }, | ||
{ 'value': 'themes', 'label': 'Themes', canChat: false, primary: [ 'before-buy', 'broken' ], }, | ||
{ 'value': 'plugins', 'label': 'Plugins', primary: [ 'before-buy', 'broken' ], }, | ||
], | ||
itemList: [ | ||
{ value: '2010', label: '2010 theme', primary: [ 'before-buy' ], secondary: [ 'themes' ] }, | ||
{ value: '2011', label: '2011 theme', primary: [ 'before-buy' ], secondary: [ 'themes' ] }, | ||
{ value: 'jp', label: 'Jetpack', secondary: [ 'plugins' ] }, | ||
{ value: 'wc', label: 'WooCommerce', secondary: [ 'plugins' ] }, | ||
], | ||
fallbackTicket: { | ||
headers: { | ||
'X-Test-Header': 'test header', | ||
'X-Test-Header-2': 'test 2' | ||
}, | ||
pathToCreate: '/create-ticket', | ||
pathToShow: '/show-ticket/<ticket-id>', | ||
} | ||
} | ||
} ); | ||
|
||
// test events API | ||
var reportChatStatus= function(chatStatus){ | ||
console.log('chatStatus is ', chatStatus); | ||
} | ||
Happychat.on('chatStatus', reportChatStatus); | ||
var reportAvailability = function(availability){ | ||
console.log('availibility is ', availability); | ||
} | ||
Happychat.on('availability', reportAvailability); | ||
window.unload = function() { | ||
console.log('unload'); | ||
Happychat.of('availability', reportAvailability); | ||
Happychat.of('chatStatus', reportChatStatus); | ||
} | ||
</script> | ||
</body> | ||
</html> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️