https://github.com/avil13/record-event-chrome-extension
https://github.com/avil13/record-event-chrome-extension
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/avil13/record-event-chrome-extension
- Owner: avil13
- Created: 2019-09-23T15:53:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T13:32:08.000Z (over 2 years ago)
- Last Synced: 2024-10-11T17:18:31.362Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 953 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# record event chrome extension
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
## Installation
$ npm install
## Usage
Run `$ gulp --watch` and load the `dist`-directory into chrome.
## Entryfiles (bundles)
There are two kinds of entryfiles that create bundles.
1. All ts-files in the root of the `./app/scripts` directory
2. All css-,scss- and less-files in the root of the `./app/styles` directory## Tasks
### Build
$ gulp
| Option | Description |
|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--watch` | Starts a livereload server and watches all assets.
To reload the extension on change include `livereload.js` in your bundle. |
| `--production` | Minifies all assets |
| `--verbose` | Log additional data to the console. |
| `--vendor` | Compile the extension for different vendors (chrome, firefox, opera, edge) Default: chrome |
| `--sourcemaps` | Force the creation of sourcemaps. Default: !production |### pack
Zips your `dist` directory and saves it in the `packages` directory.
$ gulp pack --vendor=firefox
### Version
Increments version number of `manifest.json` and `package.json`,
commits the change to git and adds a git tag.$ gulp patch // => 0.0.X
or
$ gulp feature // => 0.X.0
or
$ gulp release // => X.0.0
## Globals
The build tool also defines a variable named `process.env.NODE_ENV` in your scripts. It will be set to `development` unless you use the `--production` option.
**Example:** `./app/background.ts`
```typescript
if(process.env.NODE_ENV === 'development'){
console.log('We are in development mode!');
}
```