This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ code: 'AU', name: 'Australia' }, | |
{ code: 'AT', name: 'Austria' }, | |
{ code: 'BE', name: 'Belgium' }, | |
{ code: 'BR', name: 'Brazil' }, | |
{ code: 'BG', name: 'Bulgaria' }, | |
{ code: 'CA', name: 'Canada' }, | |
{ code: 'HR', name: 'Croatia' }, | |
{ code: 'CY', name: 'Cyprus' }, | |
{ code: 'CZ', name: 'Czech Republic' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-sync */ | |
const request = require('superagent') | |
const path = require('path') | |
const fs = require('fs') | |
const ACCOUNT = 'account' | |
const PROJECT = 'project-name' | |
const TOKEN = 'your-token' | |
const ASSET_URL = 'https://example.com/assets' | |
const SOURCEMAPS_PATH = './temp' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Scale a value from one range to another | |
* Example of use: | |
* | |
* // Convert 33 from a 0-100 range to a 0-65535 range | |
* var n = scaleValue(33, [0,100], [0,65535]); | |
* | |
* // Ranges don't have to be positive | |
* var n = scaleValue(0, [-50,+50], [0,65535]); | |
* | |
* Ranges are defined as arrays of two values, inclusive |