Explorar o código

Updated root + plugin README

Diana Arreola %!s(int64=4) %!d(string=hai) anos
pai
achega
39bd71b1c9

+ 1 - 1
.github/workflows/node.js.yml

@@ -33,7 +33,7 @@ jobs:
             npm run build --if-present
             npm run lint
             npm test
-          working-directory: ./extension/ext-plugin
+          working-directory: ./extension/code-editor-integration
     
     job_2:
       name: Vscode Ext

+ 69 - 20
README.rst

@@ -128,26 +128,6 @@ And then to run it from the command line simply type:
 ::
 
     $h this is my query for howdoi
-    
-
-Extension
--------
-
-howdoi can now be installed as an extension on Visual Studio Code! There are two ways to use it:
- 1. Directly from this repository using the following steps:
-  :: 
-  
-     npm install  
-     
-  -  Run the extension.js file (inside the extension folder)  in Visual Studio Code
-      - This will open a new VS Code window
-
-.. image:: http://g.recordit.co/3795DyyMm1.gif
-  :width: 200
-  :alt: how the extension works in vs code
-
-2. On the Extension MarketPlace
- - (coming soon)
 
 Contributors
 ------------
@@ -202,6 +182,75 @@ Or parse it yourself (either work):
 
     output = howdoi.howdoi(args)
 
+Extension Development
+-----------
+
+The ``extension`` folder contains the ``code-editor-integration`` and ``vscode-ext`` folder.
+
+The ``code-editor-integration`` folder contains files that simplify the process of integrating howdoi as a code editor extension.
+
+The ``vscode-ext`` folder contains files that contribute to the Visual Studio Code howdoi extension.
+
+To simplify the process of integrating howdoi as a code editor extension, edit the files within the ``code-editor-integration`` folder.
+
+To improve upon the Visual Studio Code howdoi extension, edit the files within the ``vscode-ext`` folder and republish the extension.
+
+Code Editor Integration
+~~~~~~~~~~~~~~~~~~~~~~
+
+To begin development for the howdoi code editor integration plug-in, install all necessary packages:
+
+::
+
+    npm install
+
+To compile the script:
+
+::
+
+    npm run compile
+
+To run the script:
+
+::
+
+    npm start
+
+To compile and run the script:
+
+::
+
+    npm run build
+
+To run the testing script:
+
+::
+
+    npm test
+
+
+Visual Studio Code Extension
+~~~~~~~~~~~~~~~~~~~~~~
+
+To begin development for the Visual Studio Code extension, install all necessary packages:
+
+::
+
+    npm install
+
+To run and test the extension, utilize Visual Studio Code's `debugging tools <https://code.visualstudio.com/api/get-started/your-first-extension>`_.
+
+Visual Studio Code Extension Installation
+------------
+
+howdoi can now be installed as an extension on Visual Studio Code! There are two ways to install it:
+
+1. On the Visual Studio Code MarketPlace:
+ - (coming soon)
+
+2. Directly from the packaged extension:
+ - (coming soon)
+
 Contributing
 ------------
 

+ 0 - 0
extension/ext-plugin/.eslintignore → extension/code-editor-integration/.eslintignore


+ 0 - 0
extension/ext-plugin/.eslintrc.json → extension/code-editor-integration/.eslintrc.json


+ 0 - 0
extension/ext-plugin/.gitignore → extension/code-editor-integration/.gitignore


+ 27 - 0
extension/code-editor-integration/README.md

@@ -0,0 +1,27 @@
+# Code Editor Integration Development
+
+Simplifies the process of integrating howdoi as a code editor extension.
+
+## Installation
+
+To install all necessary packages run:
+
+    npm install
+
+## Development
+
+To compile the script:
+
+    npm run compile
+
+To run the script:
+
+    npm start
+
+To compile and run the script:
+
+    npm run build
+
+To run the testing script:
+
+    npm test

+ 0 - 0
extension/ext-plugin/package-lock.json → extension/code-editor-integration/package-lock.json


+ 9 - 4
extension/ext-plugin/package.json → extension/code-editor-integration/package.json

@@ -1,12 +1,17 @@
 {
-  "name": "ext-plugin",
+  "name": "code-editor-integration",
   "version": "1.0.0",
   "description": "",
   "main": "plugin.js",
   "scripts": {
-    "test": "cross-env TS_NODE_FILES=true mocha --exit --require ts-node/register --colors src/test/**/*.ts",
-    
-    "lint": "eslint . --ext .ts"
+    "prepublish": "npm run compile",
+    "compile": "tsc -p ./",
+    "lint": "eslint . --ext .ts",
+    "watch": "tsc -watch -p ./",
+    "pretest": "npm run compile && npm run lint",
+    "start": "node ./out/plugin.js",
+    "build": "npm run compile && npm run lint && npm run start",
+    "test": "cross-env TS_NODE_FILES=true mocha --exit --require ts-node/register --colors src/test/**/*.ts"
   },
   "keywords": [],
   "author": "",

+ 0 - 0
extension/ext-plugin/src/plugin.ts → extension/code-editor-integration/src/plugin.ts


+ 0 - 0
extension/ext-plugin/src/test/plugin.test.ts → extension/code-editor-integration/src/test/plugin.test.ts


+ 14 - 0
extension/code-editor-integration/tsconfig.json

@@ -0,0 +1,14 @@
+{
+  "compilerOptions": {
+    "target": "es2018",                 
+    "module": "commonjs", 
+    "outDir": "out",                    
+    "lib": ["es2018", "dom"],                             
+    "sourceMap": true,                     
+    "rootDir": "src",
+    "strict": true,                           
+    "esModuleInterop": true,                  
+    "skipLibCheck": true,                    
+    "forceConsistentCasingInFileNames": true  
+  }
+}

+ 0 - 10
extension/ext-plugin/README.md

@@ -1,10 +0,0 @@
-# Howdoi Plugin
-
-Utilize this code for code editor extension integrations.
-
-
-## Installation
-
-To install all necessary packages run:
-
-    npm install

+ 0 - 14
extension/ext-plugin/tsconfig.json

@@ -1,14 +0,0 @@
-{
-  "compilerOptions": {
-    "target": "es2018",                       /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
-    "module": "commonjs", 
-    "outDir": "out",                    /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
-    "lib": ["es2018", "dom"],                             /* Specify library files to be included in the compilation. */
-    "sourceMap": true,                     /* Generates corresponding '.map' file. */
-    "rootDir": "src",
-    "strict": true,                           /* Enable all strict type-checking options. */
-    "esModuleInterop": true,                  /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
-    "skipLibCheck": true,                     /* Skip type checking of declaration files. */
-    "forceConsistentCasingInFileNames": true  /* Disallow inconsistently-cased references to the same file. */
-  }
-}

+ 1 - 5
extension/vscode-howdoi/tsconfig.json

@@ -9,11 +9,7 @@
     ],
     "sourceMap": true,
     "rootDir": "src",
-    "strict": true   /* enable all strict type-checking options */
-    /* Additional Checks */
-    // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
-    // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
-    // "noUnusedParameters": true,  /* Report errors on unused parameters. */
+    "strict": true  
   },
   "exclude": [
     "node_modules",