@yarn-tool/setup-module-env 1.0.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/CHANGELOG.md +11 -0
- package/README.md +12 -0
- package/index.d.ts +1 -0
- package/index.js +6 -0
- package/index.js.map +1 -0
- package/lib/preset/tsdx/index.d.ts +7 -0
- package/lib/preset/tsdx/index.js +28 -0
- package/lib/preset/tsdx/index.js.map +1 -0
- package/package.json +60 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## 1.0.1 (2021-11-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ✨ Features
|
|
10
|
+
|
|
11
|
+
* support create tsdx project ([12984e6](https://github.com/bluelovers/ws-yarn-workspaces/commit/12984e63422f8a495e8c55cda2f3862a6b12ba26))
|
package/README.md
ADDED
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setup as setupTsdx } from './lib/preset/tsdx/index';
|
package/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupTsdx = void 0;
|
|
4
|
+
var index_1 = require("./lib/preset/tsdx/index");
|
|
5
|
+
Object.defineProperty(exports, "setupTsdx", { enumerable: true, get: function () { return index_1.setup; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,iDAA6D;AAApD,kGAAA,KAAK,OAAa","sourcesContent":["\nexport { setup as setupTsdx } from './lib/preset/tsdx/index';\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setup = exports.updatePackageJson = void 0;
|
|
4
|
+
function updatePackageJson(pkg) {
|
|
5
|
+
var _a, _b, _c, _d, _e;
|
|
6
|
+
var _f, _g, _h;
|
|
7
|
+
(_a = pkg.scripts) !== null && _a !== void 0 ? _a : (pkg.scripts = {});
|
|
8
|
+
(_b = (_f = pkg.scripts)["posttest"]) !== null && _b !== void 0 ? _b : (_f["posttest"] = "yarn run build");
|
|
9
|
+
pkg.scripts["build"] = "yarn run build:tsdx && yarn run build:dts";
|
|
10
|
+
(_c = (_g = pkg.scripts)["build:dts"]) !== null && _c !== void 0 ? _c : (_g["build:dts"] = "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --external-inlines ts-type & echo build:dts");
|
|
11
|
+
(_d = (_h = pkg.scripts)["build:tsdx"]) !== null && _d !== void 0 ? _d : (_h["build:tsdx"] = "tsdx build --target node --name index");
|
|
12
|
+
pkg.main = "dist/index.js";
|
|
13
|
+
pkg.module = "dist/index.esm.js";
|
|
14
|
+
pkg.types = pkg.typings = "dist/index.d.ts";
|
|
15
|
+
(_e = pkg.keywords) !== null && _e !== void 0 ? _e : (pkg.keywords = []);
|
|
16
|
+
pkg.keywords.push('create-by-tsdx');
|
|
17
|
+
return pkg;
|
|
18
|
+
}
|
|
19
|
+
exports.updatePackageJson = updatePackageJson;
|
|
20
|
+
function setup(config) {
|
|
21
|
+
let { pkg } = config;
|
|
22
|
+
pkg = updatePackageJson(pkg);
|
|
23
|
+
return {
|
|
24
|
+
pkg,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.setup = setup;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAEA,SAAgB,iBAAiB,CAAyB,GAAM;;;IAE/D,MAAA,GAAG,CAAC,OAAO,oCAAX,GAAG,CAAC,OAAO,GAAK,EAAE,EAAC;IAEnB,YAAA,GAAG,CAAC,OAAO,EAAC,UAAU,wCAAV,UAAU,IAAM,gBAAgB,EAAC;IAC7C,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,2CAA2C,CAAC;IACnE,YAAA,GAAG,CAAC,OAAO,EAAC,WAAW,wCAAX,WAAW,IAAM,uHAAuH,EAAC;IACrJ,YAAA,GAAG,CAAC,OAAO,EAAC,YAAY,wCAAZ,YAAY,IAAM,uCAAuC,EAAC;IAEtE,GAAG,CAAC,IAAI,GAAG,eAAe,CAAC;IAC3B,GAAG,CAAC,MAAM,GAAG,mBAAmB,CAAC;IACjC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,OAAO,GAAG,iBAAiB,CAAC;IAE5C,MAAA,GAAG,CAAC,QAAQ,oCAAZ,GAAG,CAAC,QAAQ,GAAK,EAAE,EAAC;IACpB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAEpC,OAAO,GAAG,CAAA;AACX,CAAC;AAjBD,8CAiBC;AAED,SAAgB,KAAK,CAAyB,MAG7C;IAEA,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAErB,GAAG,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAE7B,OAAO;QACN,GAAG;KACH,CAAA;AACF,CAAC;AAZD,sBAYC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\n\nexport function updatePackageJson<P extends IPackageJson>(pkg: P)\n{\n\tpkg.scripts ??= {};\n\n\tpkg.scripts[\"posttest\"] ??= \"yarn run build\";\n\tpkg.scripts[\"build\"] = \"yarn run build:tsdx && yarn run build:dts\";\n\tpkg.scripts[\"build:dts\"] ??= \"ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --external-inlines ts-type & echo build:dts\";\n\tpkg.scripts[\"build:tsdx\"] ??= \"tsdx build --target node --name index\";\n\n\tpkg.main = \"dist/index.js\";\n\tpkg.module = \"dist/index.esm.js\";\n\tpkg.types = pkg.typings = \"dist/index.d.ts\";\n\n\tpkg.keywords ??= [];\n\tpkg.keywords.push('create-by-tsdx');\n\n\treturn pkg\n}\n\nexport function setup<P extends IPackageJson>(config: {\n\tpkg: P,\n\n})\n{\n\tlet { pkg } = config;\n\n\tpkg = updatePackageJson(pkg);\n\n\treturn {\n\t\tpkg,\n\t}\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yarn-tool/setup-module-env",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"yarn",
|
|
7
|
+
"yarn-tool",
|
|
8
|
+
"npm",
|
|
9
|
+
"lerna",
|
|
10
|
+
"workspaces",
|
|
11
|
+
"pkg",
|
|
12
|
+
"dependencies",
|
|
13
|
+
"monorepo",
|
|
14
|
+
"yarnlock",
|
|
15
|
+
"node-modules",
|
|
16
|
+
"packages",
|
|
17
|
+
"package"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://github.com/bluelovers/ws-yarn-workspaces/tree/master/packages/@yarn-tool/setup-module-env#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/bluelovers/ws-yarn-workspaces/issues"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/bluelovers/ws-yarn-workspaces.git"
|
|
26
|
+
},
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"author": "bluelovers",
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"coverage": "yarn run test -- --coverage",
|
|
32
|
+
"lint": "ynpx --quiet eslint -- **/*.ts",
|
|
33
|
+
"test": "jest --passWithNoTests",
|
|
34
|
+
"test:jest": "jest --passWithNoTests",
|
|
35
|
+
"test:mocha": "ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"",
|
|
36
|
+
"test:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
|
|
37
|
+
"build:dts": "ynpx @bluelovers/tsdx dts -o ./dist/index.d.ts ./src/index.ts --no-banner & echo build:dts",
|
|
38
|
+
"build:tsdx": "ynpx @bluelovers/tsdx build --target node --name index",
|
|
39
|
+
"preversion": "echo preversion && yarn run test",
|
|
40
|
+
"version": "echo version",
|
|
41
|
+
"postversion": "echo postversion",
|
|
42
|
+
"prepublish": "echo prepublish",
|
|
43
|
+
"prepublishOnly": "echo prepublishOnly",
|
|
44
|
+
"prepublishOnly:update": "yarn run ncu && yarn run sort-package-json",
|
|
45
|
+
"publish": "echo publish",
|
|
46
|
+
"postpublish": "echo postpublish",
|
|
47
|
+
"postpublishOnly": "echo postpublishOnly",
|
|
48
|
+
"ncu": "yarn-tool ncu -u",
|
|
49
|
+
"sort-package-json": "yarn-tool sort",
|
|
50
|
+
"tsc:showConfig": "ynpx get-current-tsconfig -p"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"tslib": "^2.3.1"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
},
|
|
58
|
+
"packageManager": "yarn@^1.22.11",
|
|
59
|
+
"gitHead": "6fabb75bc28d001babfb3c42a0afbc36384a2a9b"
|
|
60
|
+
}
|