@asayerio/sourcemaps-uploader

NPM module to upload your JS sourcemaps files to Asayer

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@asayerio/sourcemaps-uploader
1.0.4a year ago2 years agoMinified + gzip package size for @asayerio/sourcemaps-uploader in KB

Readme

sourcemaps-uploader
A NPM module to upload your JS sourcemaps files to Asayer.

Installation

npm i @asayerio/sourcemaps-uploader

CLI

Upload sourcemap for one file
sourcemaps-uploader -k API_KEY -p PROJECT_ID file -m ./dist/index.js.map -u https://asayer.io/index.js

Upload all sourcemaps in the directory. The url must correspond to the root where you upload JS files from the directory.
Thus, if you have your app-42.js along with the app-42.js.map in the ./build folder and then want to upload it to you server (you might want to avoid uploading soursemaps) so it can be reachable through the link https://myapp.com/static/app-42.js, the command would be the next:
sourcemaps-uploader -k API_KEY -p PROJECT_ID dir -m ./build -u https://myapp.com/static

NPM

There are two functions inside index.js of the package
uploadFile(api_key, project_id, sourcemap_file_path, js_file_url)
uploadDir(api_key, project_id, sourcemap_dir_path, js_dir_url)

Both functions return Promise.