@form8ion/git 1.0.0-alpha.1 → 1.0.0-alpha.3

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/lib/index.js CHANGED
@@ -1,7 +1,15 @@
1
+ import { promises } from 'node:fs';
1
2
  import touch from 'touch';
3
+ import simpleGit from 'simple-git';
2
4
 
3
5
  async function scaffolder ({projectRoot}) {
4
- await touch(`${projectRoot}/.gitignore`);
6
+ const git = simpleGit({baseDir: projectRoot});
7
+
8
+ await Promise.all([
9
+ touch(`${projectRoot}/.gitignore`),
10
+ promises.writeFile(`${projectRoot}/.gitattributes`, '* text=auto'),
11
+ git.init()
12
+ ]);
5
13
 
6
14
  return {};
7
15
  }
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/scaffolder.js"],"sourcesContent":["import touch from 'touch';\n\nexport default async function ({projectRoot}) {\n await touch(`${projectRoot}/.gitignore`);\n\n return {};\n}\n"],"names":[],"mappings":";;AAEe,yBAAc,EAAE,CAAC,WAAW,CAAC,EAAE;AAC9C,EAAE,MAAM,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;AAC3C;AACA,EAAE,OAAO,EAAE,CAAC;AACZ;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/scaffolder.js"],"sourcesContent":["import {promises as fs} from 'node:fs';\nimport touch from 'touch';\nimport simpleGit from 'simple-git';\n\nexport default async function ({projectRoot}) {\n const git = simpleGit({baseDir: projectRoot});\n\n await Promise.all([\n touch(`${projectRoot}/.gitignore`),\n fs.writeFile(`${projectRoot}/.gitattributes`, '* text=auto'),\n git.init()\n ]);\n\n return {};\n}\n"],"names":["fs"],"mappings":";;;;AAIe,yBAAc,EAAE,CAAC,WAAW,CAAC,EAAE;AAC9C,EAAE,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;AAChD;AACA,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC;AACpB,IAAI,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;AACtC,IAAIA,QAAE,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC;AAChE,IAAI,GAAG,CAAC,IAAI,EAAE;AACd,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,EAAE,CAAC;AACZ;;;;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@form8ion/git",
3
3
  "description": "form8ion plugin for managing projects versioned with git",
4
4
  "license": "MIT",
5
- "version": "1.0.0-alpha.1",
5
+ "version": "1.0.0-alpha.3",
6
6
  "type": "module",
7
7
  "author": "Matt Travi <npm@travi.org> (https://matt.travi.org)",
8
8
  "repository": "form8ion/git",
@@ -29,7 +29,7 @@
29
29
  "lint:peer": "npm ls >/dev/null",
30
30
  "pretest:integration:base": "run-s build",
31
31
  "test:integration": "run-s 'test:integration:base -- --profile noWip'",
32
- "test:integration:base": "NODE_OPTIONS=--enable-source-maps DEBUG=any cucumber-js test/integration",
32
+ "test:integration:base": "NODE_OPTIONS=\"--loader=testdouble --enable-source-maps\" DEBUG=any cucumber-js test/integration",
33
33
  "test:integration:debug": "DEBUG=test run-s test:integration",
34
34
  "test:integration:wip": "run-s 'test:integration:base -- --profile wip'",
35
35
  "test:integration:wip:debug": "DEBUG=test run-s 'test:integration:wip'",
@@ -74,9 +74,11 @@
74
74
  "rimraf": "5.0.7",
75
75
  "rollup": "4.18.0",
76
76
  "rollup-plugin-auto-external": "2.0.0",
77
+ "testdouble": "3.20.2",
77
78
  "vitest": "1.6.0"
78
79
  },
79
80
  "dependencies": {
81
+ "simple-git": "^3.25.0",
80
82
  "touch": "^3.1.1"
81
83
  }
82
84
  }