diff --git a/CHANGELOG.md b/CHANGELOG.md index d759403..af26c9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @6degrees/source-code-spitter +## 2.0.3 + +### Patch Changes + +- Removing open and github stuff + ## 2.0.0 ### Major Changes diff --git a/index.js b/index.js index 7d16ec3..803f0d1 100644 --- a/index.js +++ b/index.js @@ -10,15 +10,15 @@ const fs = require('fs-extra'); const path = require('path'); const ignore = require('ignore'); const chalk = require('chalk'); -const { Octokit } = require('@octokit/rest'); +// const { Octokit } = require('@octokit/rest'); -const open = require('open'); +// const open = require('open'); const init = require('./utils/init'); const cli = require('./utils/cli'); const log = require('./utils/log'); const DEFAULT_IGNORED_FILES = require('./utils/ignore-config'); -const clientId = 'f7ec24587e812f6ce928'; +// const clientId = 'f7ec24587e812f6ce928'; const { input, flags } = cli; const { clear, debug, include, exclude } = flags; @@ -77,25 +77,25 @@ const parseIgnoreFiles = () => { }; // Todo: Function to create a GitHub Gist -const createGist = async (code) => { - open(`https://github.com/login/oauth/authorize?client_id=${clientId}&scope=gist`); - - const octokit = new Octokit({ - auth: 'YOUR_PERSONAL_ACCESS_TOKEN', // You'll need to handle authentication - }); - - const response = await octokit.gists.create({ - description: 'Extracted code snippet', - public: true, - files: { - 'snippet.txt': { - content: code - } - } - }); - - return response.data.html_url; -}; +// const createGist = async (code) => { +// open(`https://github.com/login/oauth/authorize?client_id=${clientId}&scope=gist`); + +// const octokit = new Octokit({ +// auth: 'YOUR_PERSONAL_ACCESS_TOKEN', // You'll need to handle authentication +// }); + +// const response = await octokit.gists.create({ +// description: 'Extracted code snippet', +// public: true, +// files: { +// 'snippet.txt': { +// content: code +// } +// } +// }); + +// return response.data.html_url; +// }; // Function to generate a dump of source code from a directory const generateSourceCodeDump = directory => { diff --git a/package.json b/package.json index da47228..ffe0e84 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@6degrees/source-code-spitter", "description": "A command-line tool to extract and organize source code snippets from projects, enabling easy sharing and collaboration.", - "version": "2.0.2", + "version": "2.0.3", "license": "MIT", "bin": { "source-code-spitter": "index.js", diff --git a/utils/cli.js b/utils/cli.js index e456804..0cee478 100644 --- a/utils/cli.js +++ b/utils/cli.js @@ -40,7 +40,7 @@ const flags = { alias: 'g', desc: 'Share the extracted code as a GitHub Gist' }, - + }; const commands = {