1.1.2-alpha.0 • Published 6 years ago
@what-src/babel-plugin v1.1.2-alpha.0
@what-src/babel-plugin
what-src babel-plugin.
Check out the packages folder for more information.
Usage
Via .babelrc or babel-loader.
{
"plugins": [["module:@what-src/plugin", options]]
}options
options are defined by the type
type WhatSrcPluginOptions = {
productionMode?: boolean;
enableXkcdMode?: boolean;
useRemote?: boolean;
serverUrl?: string;
dataTag?: string;
globalCacheKey?: string;
stopPropagation?: boolean;
preventDefault?: boolean;
};- productionMode: boolean
- Set 'true' to enable running what-src in production mode (default:
false)
- enableXkcdMode: boolean
- Set
trueto enable the click tracking feature and have your clicks (and everyone else's ifuseRemoteis also used) count towards the total time saved number displayed on the website (default:false)
- useRemote: boolean
- Set 'true' to enable remote mode which creates links to the source code on github (default:
false)Note: This requires your code to be in a valid
.gitdirectory. The generated url will be based on the current branch at the time the code is compiled by babel .
- serverUrl: string
- The full URL of the running @what-src/express server (default:
http://localhost:8018/__what_src)
- dataTag: string
- A valid data attribute for tagging elements (default:
data-what-src)
- globalCacheKey: string
- The global cache key the click callback is keyed to (default:
__what-src-global-callback-key)
- stopPropagation: boolean
- Sets the stopPropagation property of the click event (default:
true)
- preventDefault: boolean
- Sets the preventDefault property of the click event (default:
true)
License
1.1.2-alpha.0
6 years ago
1.1.1-alpha.0
6 years ago
1.1.0-alpha.0
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago