sn-typescript-util 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ Using TypeScript, the CLI provides an enhanced developer workflow.
29
29
 
30
30
  - [Node.js](https://nodejs.org/)
31
31
  - [ServiceNow Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ServiceNow.now-vscode)
32
- - An [imported application](https://docs.servicenow.com/bundle/vancouver-application-development/page/build/applications/task/vscode-import-application.html) in VS Code
32
+ - An [imported application](https://docs.servicenow.com/bundle/washingtondc-application-development/page/build/applications/task/vscode-import-application.html) in VS Code
33
33
 
34
34
  **[Back to top](#table-of-contents)**
35
35
 
@@ -59,7 +59,7 @@ After installation & setup, simply run the TypeScript compiler `--watch` command
59
59
  tsc --watch
60
60
  ```
61
61
 
62
- Any JavaScript ES2015 (ES6) code added will get converted down to ES5 and moved to the `src` directory. Then changes are ready to sync with the target instance using the ServiceNow Extension for VS Code.
62
+ The TypeScript will get transpiled to ES5 (or other ECMAScript target) and moved to the `src` directory. Then changes are ready to sync with the target instance using the ServiceNow Extension for VS Code.
63
63
 
64
64
  **[Back to top](#table-of-contents)**
65
65
 
package/bin/snts.js CHANGED
@@ -52,6 +52,7 @@ async function doBuild() {
52
52
  const esVersion = await getConfigTypes();
53
53
  await addInterfaceFile();
54
54
  await addPrettierFile();
55
+ await initGitRepo();
55
56
  const s = startPrompts('Installing config(s)', null);
56
57
  const filePath = getFilePath('tsconfig.json', 'scripts/templates');
57
58
  await createTemplate('tsconfig.json', filePath);
@@ -225,6 +226,10 @@ async function init() {
225
226
  program.usage(cyan('[options]'));
226
227
  return doOptions(program);
227
228
  }
229
+ async function initGitRepo() {
230
+ const msg = `Initialize a new git repository?`;
231
+ return (await confirmFile(msg)) && (await $`git init`);
232
+ }
228
233
  function introPrompt(msg) {
229
234
  return intro(msg);
230
235
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sn-typescript-util",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "A TypeScript utility for ServiceNow developers using VS Code",
5
5
  "bin": {
6
6
  "snts": "bin/snts.js"
package/scripts/snts.ts CHANGED
@@ -68,6 +68,7 @@ async function doBuild() {
68
68
  const esVersion: any = await getConfigTypes();
69
69
  await addInterfaceFile();
70
70
  await addPrettierFile();
71
+ await initGitRepo();
71
72
  const s = startPrompts('Installing config(s)', null);
72
73
  const filePath = getFilePath('tsconfig.json', 'scripts/templates');
73
74
  await createTemplate('tsconfig.json', filePath);
@@ -257,6 +258,11 @@ async function init() {
257
258
  return doOptions(program);
258
259
  }
259
260
 
261
+ async function initGitRepo() {
262
+ const msg = `Initialize a new git repository?`;
263
+ return (await confirmFile(msg)) && (await $`git init`);
264
+ }
265
+
260
266
  function introPrompt(msg: string) {
261
267
  return intro(msg);
262
268
  }