Skip to content

Commit

Permalink
Merge pull request #40 from cursorinsight/denes-rename-package
Browse files Browse the repository at this point in the history
chore: Rename the package to ci-trap-web
  • Loading branch information
denessapi authored Mar 28, 2024
2 parents 8364f52 + 8fb7696 commit 14e7162
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 33 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#
# Use the following command to build the image:
#
# $ docker build --ssh default --build-arg GIT_USER=build . -t ci-trap
# $ docker build --ssh default --build-arg GIT_USER=build . -t ci-trap-web
#
# Replace `build` with your Git user to be able to clone sources from Gerrit.
#
# Then run the built image with:
#
# $ docker run --rm -p 8080:80 --name ci-trap ci-trap
# $ docker run --rm -p 8080:80 --name ci-trap-web ci-trap-web
#
# Your static asset server with `trap.min.js` and `gt.min.js` assets will be
# available at https://docker-server:8080/.
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ a website do the following in your ES6 or CommonJS compatible project:
**1. Install:**

```shell
$ npm install ci-trap
$ npm install ci-trap-web
```

**2. Import `trap` client using ES6 module syntax:**

```javascript
import trap from 'ci-trap';
import trap from 'ci-trap-web';
```

**... or using CommonJS syntax:**

```javascript
const { trap } = require('ci-trap');
const { trap } = require('ci-trap-web');
```

**3. Set up data collection server and start collecting events:**
Expand Down Expand Up @@ -84,7 +84,7 @@ The UI of the example is available at http://localhost:3000/.
## Configuration
You can configure `ci-trap` by specifying environment variables during build
You can configure `ci-trap-web` by specifying environment variables during build
time. These environment variables act as configuration parameters.
You can find the configuration parameters in `src/constants.js`. Each
Expand Down Expand Up @@ -132,7 +132,8 @@ Node.js and its dependencies.
2. Build JavaScript asset files with the Docker environment provided:
```
$ docker build --ssh default --build-arg GIT_USER=${GIT_USER} . -t ci-trap
$ docker build --ssh default --build-arg GIT_USER=${GIT_USER} . \
-t ci-trap-web
```
Replace `${GIT_USER}` with your Gerrit/Git user.
Expand All @@ -144,7 +145,7 @@ Node.js and its dependencies.
- Start the container:
```
$ docker run --rm -p 8080:80 --name ci-trap ci-trap
$ docker run --rm -p 8080:80 --name ci-trap-web ci-trap-web
```
- In a separate shell, use `curl` to fetch the asset:
Expand All @@ -156,11 +157,11 @@ Node.js and its dependencies.
- Or directly copy the file out of it:
```
$ docker cp ci-trap:/opt/app/gt.min.js ./gt.min.js
$ docker cp ci-trap-web:/opt/app/gt.min.js ./gt.min.js
```
## License
`ci-trap` is released under the [MIT license].
`ci-trap-web` is released under the [MIT license].
[MIT license]: https://github.com/cursorinsight/ci-trap/blob/master/LICENSE
6 changes: 3 additions & 3 deletions examples/es6/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/es6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ci-trap-example-esm",
"version": "1.0.0",
"private": true,
"description": "ESM example for ci-trap",
"description": "ESM example for ci-trap-web",
"scripts": {
"serve": "webpack serve --config webpack.config.js --hot"
},
Expand All @@ -13,7 +13,7 @@
},
"license": "MIT",
"dependencies": {
"ci-trap": "file:../../"
"ci-trap-web": "file:../../"
},
"devDependencies": {
"babel-loader": "^9.1.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/es6/src/trap-esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import trap from 'ci-trap';
import trap from 'ci-trap-web';
import './style.css';

// Mount Trap's event listener and disable touch events
Expand Down
6 changes: 3 additions & 3 deletions examples/sandbox/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ci-trap-example-research",
"version": "1.0.0",
"private": true,
"description": "Research example for ci-trap",
"description": "Research example for ci-trap-web",
"scripts": {
"serve": "webpack serve --config webpack.config.js --hot"
},
Expand All @@ -13,7 +13,7 @@
},
"license": "MIT",
"dependencies": {
"ci-trap": "file:../../"
"ci-trap-web": "file:../../"
},
"devDependencies": {
"babel-loader": "^9.1.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/sandbox/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import trap from 'ci-trap';
import trap from 'ci-trap-web';
import './style.css';

// Mount Trap's event listener and disable touch events
Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# https://docker-server:8080/.

# Source image name
ARG CI_TRAP_IMAGE_NAME=ci-trap
ARG CI_TRAP_IMAGE_NAME=ci-trap-web

# Source image tag
ARG CI_TRAP_IMAGE_TAG=latest
Expand Down
8 changes: 4 additions & 4 deletions examples/vanilla/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"license": "MIT",
"dependencies": {
"ci-trap": "file:../../"
"ci-trap-web": "file:../../"
},
"devDependencies": {
"babel-loader": "^9.1.2",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ci-trap",
"name": "ci-trap-web",
"version": "1.0.4",
"description": "Lightweight mouse and touch event tracker library for browsers.",
"main": "dist/trap-umd.min.js",
Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# must be unique in a given SonarQube instance
sonar.projectKey=cursor-insight:ci-trap
sonar.projectKey=cursor-insight:ci-trap-web

# --- optional properties ---

# defaults to project key
sonar.projectName=ci-trap
sonar.projectName=ci-trap-web

# defaults to 'not provided'
#sonar.projectVersion=1.0
Expand Down

0 comments on commit 14e7162

Please sign in to comment.