@homebound/truss 1.110.2 → 1.111.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/build/config.d.ts +9 -0
- package/build/config.js +13 -0
- package/build/config.js.map +1 -1
- package/build/index.js.map +1 -1
- package/cli.js +18 -0
- package/package.json +4 -2
package/build/config.d.ts
CHANGED
|
@@ -63,6 +63,15 @@ export interface Config {
|
|
|
63
63
|
/** Any extra chunks of code you want appended to the end of the file. */
|
|
64
64
|
extras?: Array<string | Code>;
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* A helper method to define config w/o a trailing cast.
|
|
68
|
+
*
|
|
69
|
+
* Based on `vite.config.ts`'s approach.
|
|
70
|
+
*
|
|
71
|
+
* We could eventually use this as a place to apply defaults, but currently
|
|
72
|
+
* just return the passed in `config` object as-is.
|
|
73
|
+
*/
|
|
74
|
+
export declare function defineConfig(config: Config): Config;
|
|
66
75
|
/**
|
|
67
76
|
* A function takes the project's `Config` and produces a list of utility methods to
|
|
68
77
|
* add to the generated `Css.ts` file.
|
package/build/config.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineConfig = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* A helper method to define config w/o a trailing cast.
|
|
6
|
+
*
|
|
7
|
+
* Based on `vite.config.ts`'s approach.
|
|
8
|
+
*
|
|
9
|
+
* We could eventually use this as a place to apply defaults, but currently
|
|
10
|
+
* just return the passed in `config` object as-is.
|
|
11
|
+
*/
|
|
12
|
+
function defineConfig(config) {
|
|
13
|
+
return config;
|
|
14
|
+
}
|
|
15
|
+
exports.defineConfig = defineConfig;
|
|
3
16
|
//# sourceMappingURL=config.js.map
|
package/build/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AA8EA;;;;;;;GAOG;AACH,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO,MAAM,CAAC;AAChB,CAAC;AAFD,oCAEC"}
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,2CAA2B;AAC3B,gDAAwD;AAA/C,2GAAA,eAAe,OAAA;AACxB,uCAAwC;AAA/B,oGAAA,QAAQ,OAAA;AAEjB,qCAQqB;AAPnB,4GAAA,iBAAiB,OAAA;AACjB,oGAAA,SAAS,OAAA;AACT,4GAAA,iBAAiB,OAAA;AACjB,sHAAA,2BAA2B,OAAA;AAC3B,8GAAA,mBAAmB,OAAA;AACnB,yGAAA,cAAc,OAAA;AACd,mHAAA,wBAAwB,OAAA"}
|
package/cli.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Hook up ts-node so we can require a TypeScript file
|
|
4
|
+
require("ts-node/register/transpile-only");
|
|
5
|
+
|
|
6
|
+
// Get the config from the root project directory
|
|
7
|
+
const configPath = require("path").join(process.cwd(), "./truss-config.ts");
|
|
8
|
+
const config = require(configPath).default;
|
|
9
|
+
|
|
10
|
+
const { generate } = require("./build/index.js");
|
|
11
|
+
generate(config)
|
|
12
|
+
.then((done) => {
|
|
13
|
+
console.log(`Generated ${config.outputPath}`);
|
|
14
|
+
})
|
|
15
|
+
.catch((err) => {
|
|
16
|
+
console.error(err);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
});
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homebound/truss",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.111.3",
|
|
4
4
|
"main": "build/index.js",
|
|
5
|
+
"bin": "cli.js",
|
|
5
6
|
"scripts": {
|
|
6
7
|
"test": "jest"
|
|
7
8
|
},
|
|
8
9
|
"license": "ISC",
|
|
9
10
|
"dependencies": {
|
|
10
11
|
"csstype": "^2.6.10",
|
|
11
|
-
"
|
|
12
|
+
"ts-node": "^10.7.0",
|
|
12
13
|
"ts-poet": "^3.2.2"
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
15
16
|
"@homebound/tsconfig": "^1.0.3",
|
|
16
17
|
"@types/jest": "^26.0.20",
|
|
18
|
+
"@types/node": "^16.0.3",
|
|
17
19
|
"jest": "^26.6.3",
|
|
18
20
|
"ts-jest": "^26.4.4",
|
|
19
21
|
"typescript": "^4.6.3"
|