File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed
Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ const pkgName = 'generate-ip',
44 copyright = '© 2024–2025 Adam Lui & contributors under the MIT license.' ,
55 cmdFormat = 'generate-[ip|ipv6|mac] [options|commands]' ,
66 srcURL = 'https://code.generate-ip.org' ,
7- docURL = 'https://docs.generate-ip.org/#-command-line-usage' ;
7+ docURL = 'https://docs.generate-ip.org/#-command-line-usage' ,
8+ latestLocaleCommitHash = '3560750' ;
89
910( async ( ) => {
1011
@@ -33,8 +34,9 @@ const pkgName = 'generate-ip',
3334 // Define MESSAGES
3435 let msgs = { }
3536 const msgsLoaded = new Promise ( ( resolve , reject ) => {
36- const msgHostURL = 'https://cdn.jsdelivr.net/gh/adamlui/js-utils/generate-ip/_locales/' ,
37- msgLocaleDir = ( langCode ? langCode . replace ( '-' , '_' ) : 'en' ) + '/'
37+ const msgHostURL = `https://cdn.jsdelivr.net/gh/adamlui/js-utils@${
38+ latestLocaleCommitHash } /${ pkgName } /_locales/`
39+ const msgLocaleDir = ( langCode ? langCode . replace ( '-' , '_' ) : 'en' ) + '/'
3840 let msgHref = msgHostURL + msgLocaleDir + 'messages.json' , msgFetchTries = 0
3941 fetchData ( msgHref ) . then ( onLoad ) . catch ( reject )
4042 async function onLoad ( resp ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ const pkgName = 'generate-pw',
44 copyright = '© 2024–2025 Adam Lui & contributors under the MIT license.' ,
55 cmdFormat = 'generate-pw [options|commands]' ,
66 srcURL = 'https://code.generatepw.org' ,
7- docURL = 'https://docs.generatepw.org/#-command-line-usage' ;
7+ docURL = 'https://docs.generatepw.org/#-command-line-usage' ,
8+ latestLocaleCommitHash = '3560750' ;
89
910( async ( ) => {
1011
@@ -33,8 +34,9 @@ const pkgName = 'generate-pw',
3334 // Define MESSAGES
3435 let msgs = { }
3536 const msgsLoaded = new Promise ( ( resolve , reject ) => {
36- const msgHostURL = 'https://cdn.jsdelivr.net/gh/adamlui/js-utils/generate-pw/_locales/' ,
37- msgLocaleDir = ( langCode ? langCode . replace ( '-' , '_' ) : 'en' ) + '/'
37+ const msgHostURL = `https://cdn.jsdelivr.net/gh/adamlui/js-utils@${
38+ latestLocaleCommitHash } /${ pkgName } /_locales/`
39+ const msgLocaleDir = ( langCode ? langCode . replace ( '-' , '_' ) : 'en' ) + '/'
3840 let msgHref = msgHostURL + msgLocaleDir + 'messages.json' , msgFetchTries = 0
3941 fetchData ( msgHref ) . then ( onLoad ) . catch ( reject )
4042 async function onLoad ( resp ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ const pkgName = '@adamlui/geolocate',
44 copyright = '© 2024–2025 Adam Lui under the MIT license.' ,
55 cmdFormat = 'geolocate [ip1] [ip2] [...] [options|commands]' ,
66 srcURL = 'https://code.geolocatejs.org' ,
7- docURL = 'https://docs.geolocatejs.org/#-command-line-usage' ;
7+ docURL = 'https://docs.geolocatejs.org/#-command-line-usage' ,
8+ latestLocaleCommitHash = '3560750' ;
89
910( async ( ) => {
1011
@@ -33,7 +34,7 @@ const pkgName = '@adamlui/geolocate',
3334 // Define MESSAGES
3435 let msgs = { }
3536 const msgsLoaded = new Promise ( ( resolve , reject ) => {
36- const msgHostURL = ' https://cdn.jsdelivr.net/gh/adamlui/js-utils/geolocate/_locales/' ,
37+ const msgHostURL = ` https://cdn.jsdelivr.net/gh/adamlui/js-utils@ ${ latestLocaleCommitHash } /geolocate/_locales/` ,
3738 msgLocaleDir = ( langCode ? langCode . replace ( '-' , '_' ) : 'en' ) + '/'
3839 let msgHref = msgHostURL + msgLocaleDir + 'messages.json' , msgFetchTries = 0
3940 fetchData ( msgHref ) . then ( onLoad ) . catch ( reject )
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ const pkgName = '@adamlui/minify.js',
44 copyright = '© 2024–2025 Adam Lui & contributors under the MIT license.' ,
55 cmdFormat = 'minify-js [inputPath] [outputPath] [options]' ,
66 srcURL = 'https://code.minify-js.org/node.js' ,
7- docURL = 'https://docs.minify-js.org/node.js/#-command-line-usage' ;
7+ docURL = 'https://docs.minify-js.org/node.js/#-command-line-usage' ,
8+ latestLocaleCommitHash = '55480ff' ;
89
910( async ( ) => {
1011
@@ -34,7 +35,7 @@ const pkgName = '@adamlui/minify.js',
3435 // Define MESSAGES
3536 let msgs = { }
3637 const msgsLoaded = new Promise ( ( resolve , reject ) => {
37- const msgHostURL = ' https://cdn.jsdelivr.net/gh/adamlui/minify.js/_locales/' ,
38+ const msgHostURL = ` https://cdn.jsdelivr.net/gh/adamlui/minify.js@ ${ latestLocaleCommitHash } /_locales/` ,
3839 msgLocaleDir = ( langCode ? langCode . replace ( '-' , '_' ) : 'en' ) + '/'
3940 let msgHref = msgHostURL + msgLocaleDir + 'messages.json' , msgFetchTries = 0
4041 fetchData ( msgHref ) . then ( onLoad ) . catch ( reject )
You can’t perform that action at this time.
0 commit comments