Skip to content

Commit

Permalink
feat(nanolib): add nanolib package to export the common packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadhonarvar committed Oct 1, 2024
1 parent cc1ea8b commit 1610b1e
Show file tree
Hide file tree
Showing 6 changed files with 820 additions and 6 deletions.
661 changes: 661 additions & 0 deletions packages/nanolib/LICENSE

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/nanolib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Nanolib
95 changes: 95 additions & 0 deletions packages/nanolib/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"name": "@alwatr/nanolib",
"version": "0.0.0",
"description": "Necessary library for all ECMAScript (JavaScript/TypeScript) projects.",
"author": "S. Ali Mihandoost <[email protected]>",
"keywords": [
"fs",
"file",
"filesystem",
"readFile",
"writeFile",
"readJson",
"writeJson",
"JSON",
"async",
"queue",
"cross-platform",
"ECMAScript",
"typescript",
"javascript",
"node",
"nodejs",
"esm",
"module",
"utility",
"util",
"utils",
"nanolib",
"alwatr"
],
"type": "module",
"main": "./dist/main.cjs",
"module": "./dist/main.mjs",
"types": "./dist/main.d.ts",
"exports": {
".": {
"types": "./dist/main.d.ts",
"import": "./dist/main.mjs",
"require": "./dist/main.cjs"
}
},
"license": "AGPL-3.0-only",
"files": [
"**/*.{js,mjs,cjs,map,d.ts,html,md}",
"!demo/**/*"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/Alwatr/nanolib",
"directory": "packages/nanolib"
},
"homepage": "https://github.com/Alwatr/nanolib/tree/next/packages/nanolib#readme",
"bugs": {
"url": "https://github.com/Alwatr/nanolib/issues"
},
"prettier": "@alwatr/prettier-config",
"scripts": {
"b": "yarn run build",
"w": "yarn run watch",
"c": "yarn run clean",
"cb": "yarn run clean && yarn run build",
"d": "yarn run build:es && yarn node --enable-source-maps --trace-warnings",
"build": "yarn run build:ts && yarn run build:es",
"build:es": "nano-build --preset=module",
"build:ts": "tsc --build",
"watch": "yarn run watch:ts & yarn run watch:es",
"watch:es": "yarn run build:es --watch",
"watch:ts": "yarn run build:ts --watch --preserveWatchOutput",
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/async-queue": "workspace:^",
"@alwatr/dedupe": "workspace:^",
"@alwatr/deep-clone": "workspace:^",
"@alwatr/delay": "workspace:^",
"@alwatr/fetch": "workspace:^",
"@alwatr/flat-string": "workspace:^",
"@alwatr/flatomise": "workspace:^",
"@alwatr/is-number": "workspace:^",
"@alwatr/local-storage": "workspace:^",
"@alwatr/logger": "workspace:^",
"@alwatr/package-tracer": "workspace:^",
"@alwatr/parse-duration": "workspace:^",
"@alwatr/platform-info": "workspace:^",
"@alwatr/render-state": "workspace:^"
},
"devDependencies": {
"@alwatr/nano-build": "workspace:^",
"@alwatr/tsconfig-base": "workspace:^",
"typescript": "^5.6.2"
}
}
17 changes: 17 additions & 0 deletions packages/nanolib/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export * from '@alwatr/async-queue';
export * from '@alwatr/dedupe';
export * from '@alwatr/deep-clone';
export * from '@alwatr/delay';
// export * from '@alwatr/exit-hook';
export * from '@alwatr/fetch';
export * from '@alwatr/flat-string';
export * from '@alwatr/flatomise';
export * from '@alwatr/is-number';
export * from '@alwatr/local-storage';
export * from '@alwatr/logger';
// export * from '@alwatr/node-fs';
export * from '@alwatr/package-tracer';
export * from '@alwatr/parse-duration';
export * from '@alwatr/platform-info';
export * from '@alwatr/render-state';
// export type * from '@alwatr/type-helper/types';
12 changes: 12 additions & 0 deletions packages/nanolib/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "@alwatr/tsconfig-base/tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"emitDeclarationOnly": true,
"composite": true,
"types": ["@alwatr/nano-build"],
},
"include": ["src/**/*.ts"],
"references": [],
}
40 changes: 34 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ __metadata:
languageName: unknown
linkType: soft

"@alwatr/deep-clone@workspace:packages/deep-clone":
"@alwatr/deep-clone@workspace:^, @alwatr/deep-clone@workspace:packages/deep-clone":
version: 0.0.0-use.local
resolution: "@alwatr/deep-clone@workspace:packages/deep-clone"
dependencies:
Expand Down Expand Up @@ -86,7 +86,7 @@ __metadata:
languageName: unknown
linkType: soft

"@alwatr/exit-hook@workspace:packages/exit-hook":
"@alwatr/exit-hook@workspace:^, @alwatr/exit-hook@workspace:packages/exit-hook":
version: 0.0.0-use.local
resolution: "@alwatr/exit-hook@workspace:packages/exit-hook"
dependencies:
Expand All @@ -100,7 +100,7 @@ __metadata:
languageName: unknown
linkType: soft

"@alwatr/fetch@workspace:packages/fetch":
"@alwatr/fetch@workspace:^, @alwatr/fetch@workspace:packages/fetch":
version: 0.0.0-use.local
resolution: "@alwatr/fetch@workspace:packages/fetch"
dependencies:
Expand Down Expand Up @@ -168,7 +168,7 @@ __metadata:
languageName: unknown
linkType: soft

"@alwatr/local-storage@workspace:packages/local-storage":
"@alwatr/local-storage@workspace:^, @alwatr/local-storage@workspace:packages/local-storage":
version: 0.0.0-use.local
resolution: "@alwatr/local-storage@workspace:packages/local-storage"
dependencies:
Expand Down Expand Up @@ -208,7 +208,35 @@ __metadata:
languageName: unknown
linkType: soft

"@alwatr/node-fs@workspace:packages/node-fs":
"@alwatr/nanolib@workspace:packages/nanolib":
version: 0.0.0-use.local
resolution: "@alwatr/nanolib@workspace:packages/nanolib"
dependencies:
"@alwatr/async-queue": "workspace:^"
"@alwatr/dedupe": "workspace:^"
"@alwatr/deep-clone": "workspace:^"
"@alwatr/delay": "workspace:^"
"@alwatr/exit-hook": "workspace:^"
"@alwatr/fetch": "workspace:^"
"@alwatr/flat-string": "workspace:^"
"@alwatr/flatomise": "workspace:^"
"@alwatr/is-number": "workspace:^"
"@alwatr/local-storage": "workspace:^"
"@alwatr/logger": "workspace:^"
"@alwatr/nano-build": "workspace:^"
"@alwatr/node-fs": "workspace:^"
"@alwatr/package-tracer": "workspace:^"
"@alwatr/parse-duration": "workspace:^"
"@alwatr/platform-info": "workspace:^"
"@alwatr/render-state": "workspace:^"
"@alwatr/tsconfig-base": "workspace:^"
"@alwatr/type-helper": "workspace:^"
"@types/node": "npm:^22.7.4"
typescript: "npm:^5.6.2"
languageName: unknown
linkType: soft

"@alwatr/node-fs@workspace:^, @alwatr/node-fs@workspace:packages/node-fs":
version: 0.0.0-use.local
resolution: "@alwatr/node-fs@workspace:packages/node-fs"
dependencies:
Expand Down Expand Up @@ -283,7 +311,7 @@ __metadata:
languageName: unknown
linkType: soft

"@alwatr/render-state@workspace:packages/redner-state":
"@alwatr/render-state@workspace:^, @alwatr/render-state@workspace:packages/redner-state":
version: 0.0.0-use.local
resolution: "@alwatr/render-state@workspace:packages/redner-state"
dependencies:
Expand Down

0 comments on commit 1610b1e

Please sign in to comment.