Skip to content

Commit

Permalink
Version 0.0.7: remove common js support
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed Sep 23, 2023
1 parent c69eeb6 commit ba2ed79
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modprompt",
"version": "0.0.6",
"version": "0.0.7",
"description": "Prompt templates for language models",
"license": "MIT",
"scripts": {
Expand All @@ -22,16 +22,15 @@
"typedoc-plugin-rename-defaults": "^0.6.5",
"typescript": "^5.2.2"
},
"type": "module",
"files": [
"dist"
],
"main": "./dist/mod.cjs.min.js",
"module": "./dist/mod.es.js",
"module": "./dist/mod.es.mjs",
"types": "./dist/main.d.ts",
"exports": {
".": {
"import": "./dist/mod.es.js",
"require": "./dist/mod.cjs.min.js"
"import": "./dist/mod.es.mjs"
}
},
"publishConfig": {
Expand Down
7 changes: 1 addition & 6 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ export default {
input: 'src/main.ts',
output: [
{
file: 'dist/mod.cjs.min.js',
format: 'cjs',
plugins: [terser(),]
},
{
file: 'dist/mod.es.js',
file: 'dist/mod.es.mjs',
format: 'esm'
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/cls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class ModTemplate implements LmTemplate {
private _load(name: string): LmTemplate {
try {
if (name in templates) {
console.log("Loading", name)
//console.log("Loading", name)
return templates[name];
} else {
throw new Error(`Template ${name} not found`)
Expand Down
5 changes: 2 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { templates } from "./db.js";
import { ModTemplate } from "./cls.js";
import type { SpacingSlots, PromptBlock, TurnBlock, LmTemplate } from "@/interfaces.js";
import { SpacingSlots, PromptBlock, TurnBlock, LmTemplate } from "./interfaces.js";

export { templates, ModTemplate };
export type { SpacingSlots, PromptBlock, TurnBlock, LmTemplate };
export { templates, ModTemplate, SpacingSlots, PromptBlock, TurnBlock, LmTemplate };

0 comments on commit ba2ed79

Please sign in to comment.