Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08a296bc9a
|
No files matched your search
@@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
lib
|
||||
coverage
|
||||
lib-cjs
|
||||
@@ -17,3 +17,4 @@ lib
|
||||
# Claude Code local settings
|
||||
.claude/
|
||||
|
||||
lib-cjs
|
||||
+5
-3
@@ -2,14 +2,15 @@
|
||||
"name": "@qrunio/qqq-frontend-core",
|
||||
"version": "0.40.27-SNAPSHOT",
|
||||
"description": "",
|
||||
"main": "qqq-frontend-core.js",
|
||||
"module": "lib/qqq-frontend-core.esm.js",
|
||||
"main": "lib-cjs/qqq-frontend-core.js",
|
||||
"module": "lib/qqq-frontend-core.js",
|
||||
"types": "lib/qqq-frontend-core.d.ts",
|
||||
"scripts": {
|
||||
"delete-modules": "rm -rf node_modules; rm package-lock.json",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"npm-install": "npm install",
|
||||
"clean-and-install": "npm ci && npm run prepublishOnly",
|
||||
"prepublishOnly": "rm -rf lib/ && tsc -p ./ --outDir lib/",
|
||||
"prepublishOnly": "node scripts/clean-build.cjs && tsc -p ./ --outDir lib/ && tsc -p ./ --module commonjs --outDir lib-cjs/",
|
||||
"test": "jest",
|
||||
"yalc-push": "npm run prepublishOnly && yalc push --private",
|
||||
"yalc-watch": "yalc-watch"
|
||||
@@ -21,6 +22,7 @@
|
||||
"keywords": [],
|
||||
"files": [
|
||||
"lib",
|
||||
"lib-cjs",
|
||||
"package.json",
|
||||
"NOTICE"
|
||||
],
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
const {rmSync} = require("node:fs");
|
||||
const {resolve} = require("node:path");
|
||||
|
||||
// Resolve only these build outputs relative to the repository, never the caller's cwd.
|
||||
for (const directory of ["lib", "lib-cjs"]) {
|
||||
rmSync(resolve(__dirname, "..", directory), {recursive: true, force: true});
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import {QFieldMetaData} from "./model/metaData/QFieldMetaData";
|
||||
import {QFieldType} from "./model/metaData/QFieldType";
|
||||
import {QTableMetaData} from "./model/metaData/QTableMetaData";
|
||||
|
||||
module.exports = {
|
||||
export {
|
||||
QController,
|
||||
QTableMetaData,
|
||||
QFieldMetaData,
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* QQQ - Low-code Application Framework for Engineers.
|
||||
* Copyright (C) 2021-2022. Kingsrook, LLC
|
||||
* 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
|
||||
* contact@kingsrook.com
|
||||
* https://github.com/Kingsrook/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {QController, QFieldMetaData, QFieldType, QTableMetaData} from "../src/qqq-frontend-core";
|
||||
|
||||
describe("public package exports", () =>
|
||||
{
|
||||
it("exposes the controller and metadata constructors", () =>
|
||||
{
|
||||
expect(typeof QController).toBe("function");
|
||||
expect(typeof QTableMetaData).toBe("function");
|
||||
expect(new QFieldMetaData({name: "id", type: QFieldType.INTEGER}).name).toBe("id");
|
||||
expect(QFieldType.INTEGER).toBeDefined();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user