Skip to content

Commit

Permalink
add umd export
Browse files Browse the repository at this point in the history
  • Loading branch information
cadgerfeast committed Jan 3, 2023
1 parent d9a6d62 commit 23e4b34
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 13 deletions.
2 changes: 1 addition & 1 deletion addons/components/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface Node {

export type SchemaInstance = {
getParentNodes: () => HTMLDivElement[];
getNodes (parents: HTMLDivElement[] = []): Node[];
getNodes (parents: HTMLDivElement[]): Node[];
};
122 changes: 110 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"parallel",
"typescript"
],
"files": [
"dist"
],
"author": "Jérémie Pichon <contact@cadgerfeast.com>",
"license": "MIT",
"exports": {
Expand All @@ -20,6 +23,7 @@
"types": "./dist/dts/index.d.ts"
}
},
"unpkg": "dist/umd/index.js",
"main": "./dist/cjs/index.js",
"types": "./dist/dts/index.d.ts",
"scripts": {
Expand All @@ -28,21 +32,25 @@
"build:lib": "run-p build:lib:*",
"build:lib:esm": "tsc -p tsconfig.esm.json",
"build:lib:cjs": "tsc -p tsconfig.cjs.json",
"build:lib:umd": "rollup -c rollup.config.js",
"build:lib:dts": "tsc -p tsconfig.dts.json",
"build:docs": "madoc build",
"test": "jest",
"lint": "eslint ./src ./test"
},
"devDependencies": {
"@madoc/core": "^0.1.8",
"@rollup/plugin-typescript": "^10.0.1",
"@types/jest": "^29.2.4",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"eslint": "^8.29.0",
"jest": "^29.3.1",
"npm-run-all": "^4.1.5",
"rollup": "^3.9.1",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"tslib": "^2.4.1",
"typescript": "^4.9.4"
}
}
14 changes: 14 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Helpers
import typescript from '@rollup/plugin-typescript';

export default {
input: './src/index.ts',
output: {
file: './dist/umd/index.js',
format: 'umd',
name: 'Duncan'
},
plugins: [
typescript()
]
};

0 comments on commit 23e4b34

Please sign in to comment.