Skip to content

Commit

Permalink
build: rename directory module to esm
Browse files Browse the repository at this point in the history
Release-As: 1.0.2
  • Loading branch information
remarkablemark committed Jul 12, 2023
1 parent 3c64afb commit a066d72
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jspm_packages
# Build files
cjs/
docs/
esm/

# Vim swap files
*.swp
Expand Down
6 changes: 0 additions & 6 deletions module/index.mjs

This file was deleted.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"description": "Convert Base64 to Blob/File and Blob/File to Base64.",
"author": "Mark <mark@remarkablemark.org>",
"main": "cjs/index.js",
"types": "cjs/index.d.ts",
"module": "module/index.mjs",
"module": "esm/index.js",
"exports": {
"types": "./cjs/index.d.ts",
"import": "./module/index.mjs",
"import": "./esm/index.js",
"require": "./cjs/index.js"
},
"scripts": {
"build": "tsc",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc",
"build:esm": "tsc --module nodenext --outDir esm",
"build:watch": "tsc --watch",
"clean": "rm -rf cjs coverage docs",
"clean": "rm -rf cjs coverage docs esm",
"docs": "typedoc",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
"lint:fix": "npm run lint -- --fix",
Expand All @@ -24,7 +24,7 @@
"prepublishOnly": "pinst --disable && npm run lint && npm run lint:tsc && npm run test:ci && npm run test:esm && npm run clean && npm run build",
"test": "jest",
"test:ci": "CI=true jest --ci --colors --coverage",
"test:esm": "npm run build && node --test module",
"test:esm": "npm run build:esm && node --test src",
"test:watch": "jest --watch"
},
"repository": {
Expand Down Expand Up @@ -68,7 +68,7 @@
},
"files": [
"cjs/",
"module/"
"esm/"
],
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion module/index.test.mjs → src/index.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
base64ToFile,
blobToBase64,
fileToBase64,
} from './index.mjs';
} from '../esm/index.js';

describe('index', () => {
it('exports base64ToBlob', () => {
Expand Down

0 comments on commit a066d72

Please sign in to comment.