dop-website-sdk

This project provides website analysis SDK developed with JavaScript.

Usage no npm install needed!

<script type="module">
  import dopWebsiteSdk from 'https://cdn.skypack.dev/dop-website-sdk';
</script>

README

dop-website-sdk

This project provides website analysis SDK developed with JavaScript.

Development Enviroment

1.dop-websiste-sdk requires latest Node.js to run. You can download install at NodeJs Check to install have finished successfully.

$ node -v 
$ v15.11.0
$ npm -v
$ 7.6.0

2.Download and install dependencies third-party library using npm install command line.

$ cd dop-website-sdk
$ npm install --save-dev webpack webpack-cli @babel/core @babel/preset-env style-loader css-loader html-webpack-plugin babel-loader webpack-dev-server detect-browser npm install query-string uglifyjs-webpack-plugin axios
+ @babel/preset-env@7.4.2
+ detect-browser@4.2.0
+ @babel/core@7.4.0
+ babel-loader@8.0.5
+ html-webpack-plugin@3.2.0
+ style-loader@0.23.1
+ webpack-cli@3.3.0
+ css-loader@2.1.1
+ webpack-dev-server@3.2.1
+ webpack@4.29.6
+ install@0.12.2
+ query-string@6.4.2
+ npm@6.9.0
added 1195 packages from 1067 contributors, removed 47 packages, updated 2 packages and audited 22439 packages in 378.894
found 0 vulnerabilities

3.Compile dop-website-sdk project.

$ cd dop-website-sdk
$ npm run build 
> dop-website-sdk@1.0.7 build
> webpack

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Hash: 2b42a84337336f185580
Version: webpack 4.46.0
Time: 2431ms
Built at: 03/30/2021 10:32:45 AM
             Asset       Size  Chunks             Chunk Names
    ./dataRcv.html  188 bytes          [emitted]  
      ./index.html   2.72 KiB          [emitted]  
dop-website-sdk.js   88.9 KiB       0  [emitted]  main
Entrypoint main = dop-website-sdk.js
[31] ./src/jsIndex.js + 17 modules 135 KiB {0} [built]
     | ./src/jsIndex.js 5.62 KiB [built]
     | ./src/V2/constants/SDKConstants.js 9.43 KiB [built]
     | ./src/V2/base/User.js 2.85 KiB [built]
     | ./src/V2/dot/TAdInfoData.js 5.61 KiB [built]
     | ./src/V2/dot/WDOT.js 15.7 KiB [built]
     | ./src/V2/library/stringutil.js 259 bytes [built]
     | ./src/V2/library/timeutil.js 7.05 KiB [built]
     | ./src/V2/library/extractor.js 975 bytes [built]
     | ./src/V2/library/generator.js 1.8 KiB [built]
     | ./src/V2/library/cookieManager.js 271 bytes [built]
     | ./src/V2/library/storage.js 10.8 KiB [built]
     | ./src/V2/library/transmitter.js 8.71 KiB [built]
     | ./src/V2/base/InternalCampaign.js 3.01 KiB [built]
     | ./src/V2/dataObject/SProperties.js 2.41 KiB [built]
     | ./src/V2/base/Session.js 49 KiB [built]
     |     + 3 hidden modules
    + 31 hidden modules
Child html-webpack-plugin for "dataRcv.html":
     1 asset
    Entrypoint undefined = ./dataRcv.html
    [0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/dataRcv.html 326 bytes {0} [built]
    [2] (webpack)/buildin/global.js 472 bytes {0} [built]
    [3] (webpack)/buildin/module.js 497 bytes {0} [built]
        + 1 hidden module
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = ./index.html
    [0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 2.9 KiB {0} [built]
    [2] (webpack)/buildin/global.js 472 bytes {0} [built]
    [3] (webpack)/buildin/module.js 497 bytes {0} [built]
        + 1 hidden module

4.Check compiled dop-website-sdk.js file into dop-website-sdk/dist folder.

$ cd dop-website-sdk/dist
$ ls
total 208
drwxr-xr-x@  6 kimkunsoo  staff    192 Jan 26 17:05 .
drwxr-xr-x@ 20 kimkunsoo  staff    640 Mar 30 10:33 ..
-rw-r--r--@  1 kimkunsoo  staff    188 Mar 30 10:32 dataRcv.html
-rw-r--r--@  1 kimkunsoo  staff    170 May 14  2020 dop-website-sdk-conf.js
-rw-r--r--@  1 kimkunsoo  staff  91079 Mar 30 10:32 dop-website-sdk.js
-rw-r--r--@  1 kimkunsoo  staff   2782 Mar 30 10:32 index.html

5.The dop-website-sdk.js file in the dist folder is the available web sdk.

6.The npm repository for Web SDK address is as follows.

https://www.npmjs.com/package/dop-website-sdk

7.Deploy it to the npm repository using the command below.

$ npm login
npm notice Log in on https://registry.npmjs.org/
Username: wiset......
Password: 
Email: (this IS public) tech...........
Logged in as wisetracker on https://registry.npmjs.org/.

$ npm whoami
w.........

$ npm publish
npm notice 
npm notice 📦  dop-website-sdk@1.0.8
npm notice === Tarball Contents === 
npm notice 4.2kB   README.md                                                    
......                                
npm notice 2.0kB   webpack.config.js                                            
npm notice === Tarball Details === 
npm notice name:          dop-website-sdk                         
npm notice version:       1.0.8                                   
npm notice filename:      dop-website-sdk-1.0.8.tgz               
npm notice package size:  1.6 MB                                  
npm notice unpacked size: 2.0 MB                                  
npm notice shasum:        d81fc1588bfb96c48f343a8f1aba20599b017c8c
npm notice integrity:     sha512-ckyvhVfr5zUyS[...]FPKfaW08CM8Sg==
npm notice total files:   66                                      
npm notice 
+ dop-website-sdk@1.0.8