Skip to content

Commit

Permalink
test: add bin for test
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamensuli committed Dec 20, 2023
1 parent ad63819 commit b548b96
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/nodefony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
import nodefony from '../dist/index.js';
import {nodefony , kernel} from '../dist/index.js';

console.log(nodefony)
console.log(nodefony, kernel)
4 changes: 4 additions & 0 deletions bin/tests/nodefony
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node
const {nodefony, kernel} = require("../../dist/index.js")

console.log(nodefony , kernel)
31 changes: 31 additions & 0 deletions bin/tests/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "nodefony-core",
"version": "10.0.0",
"description": "Core Nodefony Framework",
"main": "index.js",
"types": "types/index.d.ts",
"private": true,
"bin": {},
"keywords": [
"nodefony",
"node-js",
"javascript"
],
"scripts": {},
"dependencies": {},
"devDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/nodefony/nodefony.git"
},
"resolutions": {},
"license": "CECILL-B",
"licenses": [
{
"type": "CECILL-B",
"url": "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html"
}
],
"author": "Christophe CAMENSULI <[email protected]>",
"readmeFilename": "README.md"
}
5 changes: 4 additions & 1 deletion src/Nodefony.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ class Nodefony {
}

const nodefony = Nodefony.getInstance()
const kernel = Nodefony.getKernel()

export default nodefony
export const kernel = Nodefony.getKernel()
export {
kernel
}

4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import nodefony, {kernel} from './Nodefony'; // Importe l'instance partagée de Nodefony

// Utilisation du style ES6 pour les modules (import)
export { nodefony , kernel};
export default nodefony;
export { kernel, nodefony};

// Utilisation du style CommonJS (require)
//module.exports = { nodefony };
//module.exports = nodefony ;
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"declarationDir": "./dist/types", /* Specify the output directory for generated declaration files. */
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
/* Interop Constraints */
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
//"isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
Expand Down

0 comments on commit b548b96

Please sign in to comment.