-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d0441e
commit a88d264
Showing
1 changed file
with
19 additions
and
122 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,134 +1,31 @@ | ||
# Welcome to StackEdit! | ||
# Rudder JS-SDK | ||
|
||
Hi! I'm your first Markdown file in **StackEdit**. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the **file explorer** on the left corner of the navigation bar. | ||
This repo contains **builds** and **source-code** to integrate with your web-app and node applications. Use this to send analytics data from your applications to ever evolving destinations such as (HubSpot, Google Analytics and many more...) | ||
|
||
# Files | ||
# How to get started | ||
|
||
StackEdit stores your files in your browser, which means all your files are automatically saved locally and are accessible **offline!** | ||
Under the **analytics** folder, navigate to **dist** where you can find the minified and unminified versions of the sdk. There are two builds for working with browser based applications and node applications, mainly **browser.js** and **node.js**. | ||
|
||
## Create files and folders | ||
Few sample usage of the sdk can be found under **tests** directory for vanilla html, Angular, and node integrations. | ||
|
||
The file explorer is accessible using the button in left corner of the navigation bar. You can create a new file by clicking the **New file** button in the file explorer. You can also create folders by clicking the **New folder** button. | ||
## Code Structure | ||
|
||
## Switch to another file | ||
- The whole code development is under the **analytics** folder. | ||
- **analytics.js** handles the core functionality for tapping your **identify**, **page** and **track** calls. | ||
- **integrations** contains the native loading and invocation of different destinations. | ||
- **HubSpot** and **Google Analytics** integrations have been in development recently. | ||
|
||
All your files and folders are presented as a tree in the file explorer. You can switch from one to another by clicking a file in the tree. | ||
**\*We try to support both browser and node versions of these integrations. It may so happen that integrations doesn't have a node sdk, in that case routing data through our **data-plane\*_ is one of the options to send data to these destinations_ | ||
|
||
## Rename a file | ||
- The **dist** folder contains the minified and unminified versions of the sdk. | ||
- **tests** contains various flavours for how to use the sdk in applications | ||
- We use _rollup_ and _babel_ for transpiling and generating the specific builds. | ||
|
||
You can rename the current file by clicking the file name in the navigation bar or by clicking the **Rename** button in the file explorer. | ||
## Contribute | ||
|
||
## Delete a file | ||
One can start adding integrations like _Mixpanel_, _Facebook ads_ and others for sending data through their _js_ and _node_ sdks. | ||
|
||
You can delete the current file by clicking the **Remove** button in the file explorer. The file will be moved into the **Trash** folder and automatically deleted after 7 days of inactivity. | ||
For building the sdk, | ||
|
||
## Export a file | ||
|
||
You can export the current file by clicking **Export to disk** in the menu. You can choose to export the file as plain Markdown, as HTML using a Handlebars template or as a PDF. | ||
|
||
# Synchronization | ||
|
||
Synchronization is one of the biggest features of StackEdit. It enables you to synchronize any file in your workspace with other files stored in your **Google Drive**, your **Dropbox** and your **GitHub** accounts. This allows you to keep writing on other devices, collaborate with people you share the file with, integrate easily into your workflow... The synchronization mechanism takes place every minute in the background, downloading, merging, and uploading file modifications. | ||
|
||
There are two types of synchronization and they can complement each other: | ||
|
||
- The workspace synchronization will sync all your files, folders and settings automatically. This will allow you to fetch your workspace on any other device. > To start syncing your workspace, just sign in with Google in the menu. | ||
|
||
- The file synchronization will keep one file of the workspace synced with one or multiple files in **Google Drive**, **Dropbox** or **GitHub**. > Before starting to sync files, you must link an account in the **Synchronize** sub-menu. | ||
|
||
## Open a file | ||
|
||
You can open a file from **Google Drive**, **Dropbox** or **GitHub** by opening the **Synchronize** sub-menu and clicking **Open from**. Once opened in the workspace, any modification in the file will be automatically synced. | ||
|
||
## Save a file | ||
|
||
You can save any file of the workspace to **Google Drive**, **Dropbox** or **GitHub** by opening the **Synchronize** sub-menu and clicking **Save on**. Even if a file in the workspace is already synced, you can save it to another location. StackEdit can sync one file with multiple locations and accounts. | ||
|
||
## Synchronize a file | ||
|
||
Once your file is linked to a synchronized location, StackEdit will periodically synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be resolved. | ||
|
||
If you just have modified your file and you want to force syncing, click the **Synchronize now** button in the navigation bar. | ||
|
||
> **Note:** The **Synchronize now** button is disabled if you have no file to synchronize. | ||
## Manage file synchronization | ||
|
||
Since one file can be synced with multiple locations, you can list and manage synchronized locations by clicking **File synchronization** in the **Synchronize** sub-menu. This allows you to list and remove synchronized locations that are linked to your file. | ||
|
||
# Publication | ||
|
||
Publishing in StackEdit makes it simple for you to publish online your files. Once you're happy with a file, you can publish it to different hosting platforms like **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **WordPress** and **Zendesk**. With [Handlebars templates](http://handlebarsjs.com/), you have full control over what you export. | ||
|
||
> Before starting to publish, you must link an account in the **Publish** sub-menu. | ||
## Publish a File | ||
|
||
You can publish your file by opening the **Publish** sub-menu and by clicking **Publish to**. For some locations, you can choose between the following formats: | ||
|
||
- Markdown: publish the Markdown text on a website that can interpret it (**GitHub** for instance), | ||
- HTML: publish the file converted to HTML via a Handlebars template (on a blog for example). | ||
|
||
## Update a publication | ||
|
||
After publishing, StackEdit keeps your file linked to that publication which makes it easy for you to re-publish it. Once you have modified your file and you want to update your publication, click on the **Publish now** button in the navigation bar. | ||
|
||
> **Note:** The **Publish now** button is disabled if your file has not been published yet. | ||
## Manage file publication | ||
|
||
Since one file can be published to multiple locations, you can list and manage publish locations by clicking **File publication** in the **Publish** sub-menu. This allows you to list and remove publication locations that are linked to your file. | ||
|
||
# Markdown extensions | ||
|
||
StackEdit extends the standard Markdown syntax by adding extra **Markdown extensions**, providing you with some nice features. | ||
|
||
> **ProTip:** You can disable any **Markdown extension** in the **File properties** dialog. | ||
## SmartyPants | ||
|
||
SmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example: | ||
|
||
| | ASCII | HTML | | ||
| ---------------- | ------------------------------- | ----------------------------- | | ||
| Single backticks | `'Isn't this fun?'` | 'Isn't this fun?' | | ||
| Quotes | `"Isn't this fun?"` | "Isn't this fun?" | | ||
| Dashes | `-- is en-dash, --- is em-dash` | -- is en-dash, --- is em-dash | | ||
|
||
## KaTeX | ||
|
||
You can render LaTeX mathematical expressions using [KaTeX](https://khan.github.io/KaTeX/): | ||
|
||
The _Gamma function_ satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via the Euler integral | ||
|
||
$$ | ||
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. | ||
$$ | ||
|
||
> You can find more information about **LaTeX** mathematical expressions [here](http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference). | ||
## UML diagrams | ||
|
||
You can render UML diagrams using [Mermaid](https://mermaidjs.github.io/). For example, this will produce a sequence diagram: | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Alice ->> Bob: Hello Bob, how are you? | ||
Bob-->>John: How about you John? | ||
Bob--x Alice: I am good thanks! | ||
Bob-x John: I am good thanks! | ||
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row. | ||
Bob-->Alice: Checking with John... | ||
Alice->John: Yes... John, how are you? | ||
``` | ||
|
||
And this will produce a flow chart: | ||
|
||
```mermaid | ||
graph LR | ||
A[Square Rect] -- Link text --> B((Circle)) | ||
A --> C(Round Rect) | ||
B --> D{Rhombus} | ||
C --> D | ||
``` | ||
- Look for run scripts in the _package.json_ file for getting browser and node specific builds. | ||
- For adding or removing integrations, modify the _imports_ in _index.js_ under **integrations** folder. |