-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Make Build Script - Make Icon - Update Gitignore to ignore build files
- Loading branch information
1 parent
b80537e
commit 44e0a9d
Showing
10 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const fs = require('fs'); | ||
|
||
//delete old build folder if it exists | ||
if (fs.existsSync('build')) { | ||
fs.rmdirSync('build', { recursive: true }); | ||
} | ||
|
||
//create folder called build | ||
fs.mkdirSync('build'); | ||
|
||
//copy manifest.json to build folder | ||
fs.copyFileSync('manifest.json', 'build/manifest.json'); | ||
|
||
const manifest = require('./manifest.json'); | ||
|
||
//copy all files referenced in manifest.json to build folder | ||
const cs = manifest.content_scripts[0] | ||
|
||
cs.js.forEach((jsFile) => { | ||
fs.copyFileSync(jsFile, `build/${jsFile}`); | ||
}); | ||
|
||
cs.css.forEach((cssFile) => { | ||
fs.copyFileSync(cssFile, `build/${cssFile}`); | ||
}); | ||
|
||
//made media directory in build folder | ||
fs.mkdirSync('build/media'); | ||
|
||
//copy all files referenced in media directory to build folder | ||
const icns = manifest.icons; | ||
|
||
//loop through icons in object | ||
for (const size in icns) { | ||
fs.copyFileSync(icns[size], `build/${icns[size]}`); | ||
} |
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "copy-for-chatgpt", | ||
"version": "1.0.0", | ||
"description": "The purpose of this extention is to copy output given from ChatGPT with just a click of a button or through a keyboard command (CMD+K on Mac or CTRL+K on Windows) ## This is still in development, I made this quickly before I went to bed 💀", | ||
"main": "build.js", | ||
"scripts": { | ||
"build": "node build.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/SethuSenthil/Copy-for-ChatGPT.git" | ||
}, | ||
"author": "Sethu Senthil", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/SethuSenthil/Copy-for-ChatGPT/issues" | ||
}, | ||
"homepage": "https://github.com/SethuSenthil/Copy-for-ChatGPT#readme" | ||
} |