@oscarpalmer/abydon 0.1.0 → 0.2.0

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/.bun.ts ADDED
@@ -0,0 +1,32 @@
1
+ import * as fs from 'node:fs/promises';
2
+
3
+ const directory = String(__dirname).replace(/\\/g, '/');
4
+ const isMjs = process.argv.includes('--mjs');
5
+
6
+ async function getFiles(path: string): Promise<string[]> {
7
+ const entries = await fs.readdir(path, {withFileTypes: true});
8
+
9
+ const files = entries
10
+ .filter(entry => entry.isFile() && entry.name.endsWith('.ts'))
11
+ .map(file => `${path}/${file.name}`);
12
+
13
+ const folders = entries.filter(entry => entry.isDirectory());
14
+
15
+ for (const folder of folders) {
16
+ files.push(...(await getFiles(`${path}/${folder.name}`)));
17
+ }
18
+
19
+ return files;
20
+ }
21
+
22
+ getFiles('./src').then(async files => {
23
+ for (const file of files) {
24
+ await Bun.build({
25
+ entrypoints: [`${directory}/${file}`],
26
+ external: isMjs ? ['*'] : [],
27
+ naming: isMjs ? '[dir]/[name].mjs' : undefined,
28
+ outdir: './dist',
29
+ root: './src',
30
+ });
31
+ }
32
+ });
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
package/biome.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
3
+ "files": {
4
+ "ignore": ["./dist/*"]
5
+ },
6
+ "javascript": {
7
+ "formatter": {
8
+ "arrowParentheses": "asNeeded",
9
+ "bracketSpacing": false,
10
+ "quoteStyle": "single"
11
+ }
12
+ },
13
+ "linter": {
14
+ "enabled": true,
15
+ "rules": {
16
+ "recommended": true
17
+ }
18
+ },
19
+ "organizeImports": {
20
+ "enabled": true
21
+ }
22
+ }
package/bun.lockb ADDED
Binary file
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // src/index.ts
2
+ var src_default = {};
3
+ export {
4
+ src_default as default
5
+ };
package/dist/index.mjs ADDED
@@ -0,0 +1,5 @@
1
+ // src/index.ts
2
+ var src_default = undefined;
3
+ export {
4
+ src_default as default
5
+ };
package/package.json CHANGED
@@ -3,11 +3,34 @@
3
3
  "name": "Oscar Palmér",
4
4
  "url": "https://oscarpalmer.se"
5
5
  },
6
+ "devDependencies": {
7
+ "@biomejs/biome": "^1.8.3",
8
+ "@types/bun": "^1.1.6",
9
+ "bun": "^1.1.20",
10
+ "typescript": "^5.5.4"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./types/index.d.ts",
15
+ "bun": "./src/index.ts",
16
+ "import": "./dist/index.mjs",
17
+ "require": "./dist/index.js"
18
+ }
19
+ },
6
20
  "license": "MIT",
21
+ "main": "dist/index.js",
22
+ "module": "dist/index.mjs",
7
23
  "name": "@oscarpalmer/abydon",
8
24
  "repository": {
9
25
  "type": "git",
10
26
  "url": "git+https://github.com/oscarpalmer/abydon.git"
11
27
  },
12
- "version": "0.1.0"
28
+ "scripts": {
29
+ "build": "bun run clean && bunx bun ./.bun.ts && bunx bun ./.bun.ts --mjs && bun run types",
30
+ "clean": "rm -rf ./dist && rm -rf ./types && rm -rf ./tsconfig.tsbuildinfo",
31
+ "types": "bunx tsc -p ./tsconfig.json",
32
+ "watch": "bun build ./src/index.ts --outfile ./dist/index.js --watch"
33
+ },
34
+ "types": "src/types.d.ts",
35
+ "version": "0.2.0"
13
36
  }
package/src/index.ts ADDED
File without changes
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowImportingTsExtensions": true,
4
+ "allowJs": true,
5
+ "allowSyntheticDefaultImports": true,
6
+ "composite": false,
7
+ "declaration": true,
8
+ "declarationDir": "./types",
9
+ "downlevelIteration": true,
10
+ "emitDeclarationOnly": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "jsx": "react-jsx",
13
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
14
+ "module": "esnext",
15
+ "moduleDetection": "force",
16
+ "moduleResolution": "bundler",
17
+ "rootDir": "./src",
18
+ "skipLibCheck": true,
19
+ "strict": true,
20
+ "target": "esnext"
21
+ },
22
+ "exclude": ["dist", "node_modules", "test", "types", "www"]
23
+ }
@@ -0,0 +1 @@
1
+ export {};