@atproto/dev-env 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
package/tsconfig.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
+ "rootDir": "./src",
4
5
  "outDir": "./dist", // Your outDir,
5
6
  "emitDeclarationOnly": true
6
7
  },
package/update-pkg.js ADDED
@@ -0,0 +1,14 @@
1
+ const pkgJson = require('@npmcli/package-json')
2
+
3
+ if (process.argv.includes('--update-main-to-dist')) {
4
+ return pkgJson
5
+ .load(__dirname)
6
+ .then((pkg) => pkg.update({ main: 'dist/index.js' }))
7
+ .then((pkg) => pkg.save())
8
+ }
9
+ if (process.argv.includes('--update-main-to-src')) {
10
+ return pkgJson
11
+ .load(__dirname)
12
+ .then((pkg) => pkg.update({ main: 'src/index.ts' }))
13
+ .then((pkg) => pkg.save())
14
+ }