Skip to content

Commit

Permalink
icons upload tested
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ostapenko committed Nov 8, 2024
1 parent 2fbba2c commit 1f75ee1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"webpagetest": "github:HTTPArchive/WebPageTest.api-nodejs"
},
"scripts": {
"lint": "eslint src/**/*.{js,json} tests/**/*.js bin/**/*.js && jsonlint -jsV ./schema.json --trim-trailing-commas --enforce-double-quotes ./src/technologies/ && jsonlint -js --trim-trailing-commas --enforce-double-quotes ./src/categories.json",
"lint:fix": "eslint --fix src/**/*.{js,json} tests/**/*.js bin/**/*.js && jsonlint -isV ./schema.json --trim-trailing-commas --enforce-double-quotes ./src/technologies/ && jsonlint -is --trim-trailing-commas --enforce-double-quotes ./src/categories.json",
"validate": "yarn run lint && node ./bin/validate.js",
"lint": "eslint src/**/*.{js,json} tests/**/*.js scripts/**/*.js && jsonlint -jsV ./schema.json --trim-trailing-commas --enforce-double-quotes ./src/technologies/ && jsonlint -js --trim-trailing-commas --enforce-double-quotes ./src/categories.json",
"lint:fix": "eslint --fix src/**/*.{js,json} tests/**/*.js scripts/**/*.js && jsonlint -isV ./schema.json --trim-trailing-commas --enforce-double-quotes ./src/technologies/ && jsonlint -is --trim-trailing-commas --enforce-double-quotes ./src/categories.json",
"validate": "yarn run lint && node ./scripts/validate.js",
"test": "jest",
"upload": "node ./bin/upload_technology.js && node ./bin/upload_icons.js",
"convert": "node --no-warnings ./bin/convert.js",
"build": "yarn run validate && yarn run convert && node ./bin/build.js"
"upload": "node ./scripts/upload_technology.js",
"convert": "node --no-warnings ./scripts/convert.js",
"build": "yarn run validate && yarn run convert && node ./scripts/build.js"
},
"jest": {
"reporters": [
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions bin/upload_icons.js → scripts/upload_icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path')
const { Storage } = require('@google-cloud/storage')

// Configuration
const BUCKET_NAME = 'wappalizer-icons'
const BUCKET_NAME = 'technology_detections'
const ICONS_DIR = path.resolve(__dirname, '../src/images/icons/converted') // Local directory where your PNG icons are stored

const storage = new Storage({
Expand Down Expand Up @@ -40,7 +40,7 @@ async function syncIcons() {
) {
try {
await bucket.upload(filePath, {
destination: file,
destination: 'icons/'+file,
metadata: {
contentType: 'image/png',
},
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 1f75ee1

Please sign in to comment.