express-generator-typescript 1.9.5 → 1.9.6

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.
@@ -0,0 +1,3 @@
1
+ **/node_modules
2
+ dist/
3
+ **/**/*.log
@@ -8,6 +8,7 @@ const path = require('path');
8
8
  const editJsonFile = require('edit-json-file');
9
9
  const childProcess = require('child_process');
10
10
  const ncp = require('ncp').ncp;
11
+ const fs = require('fs');
11
12
 
12
13
 
13
14
  /**
@@ -17,6 +18,7 @@ async function expressGenTs(destination, withAuth, useYarn, useSocketIo) {
17
18
  try {
18
19
  await copyProjectFiles(destination, withAuth, useSocketIo);
19
20
  updatePackageJson(destination);
21
+ await renameGitingoreFile(destination);
20
22
  const depStrings = getDepStrings(withAuth, useSocketIo);
21
23
  downloadNodeModules(destination, depStrings, useYarn);
22
24
  } catch (err) {
@@ -57,6 +59,17 @@ function updatePackageJson(destination) {
57
59
  file.set('name', path.basename(destination));
58
60
  }
59
61
 
62
+ /**
63
+ * Because npm does not allow .gitignore to be published.
64
+ */
65
+ function renameGitingoreFile(destination) {
66
+ return new Promise((res, rej) => {
67
+ fs.rename(destination + '/gitignore', destination + '/.gitignore', (err) => {
68
+ return (!!err ? rej(err) : res());
69
+ });
70
+ });
71
+ }
72
+
60
73
  /**
61
74
  * Setup dependency strings. This way gets you the latest version of everything.
62
75
  */
@@ -0,0 +1,3 @@
1
+ **/node_modules
2
+ dist/
3
+ **/**/*.log
@@ -0,0 +1,3 @@
1
+ **/node_modules
2
+ dist/
3
+ **/**/*.log
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-generator-typescript",
3
- "version": "1.9.5",
3
+ "version": "1.9.6",
4
4
  "description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
5
5
  "scripts": {
6
6
  "express-generator-typescript": "node bin/cli.js",