Skip to content

Commit

Permalink
feat: init core package
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Feb 26, 2023
1 parent cfb747e commit 50becc4
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# epubook

A Node EPUB generation library.

It will support the generation of the [latest epub standard](https://www.w3.org/TR/epub-33/) (3.3).

> 👷‍♂️ Still work in progress.
## License

MIT License © 2023 [XLor](https://github.com/yjl9903)
12 changes: 12 additions & 0 deletions packages/core/build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
entries: [
'src/index',
],
declaration: true,
clean: true,
rollup: {
emitCJS: true,
},
});
43 changes: 43 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "@epubook/core",
"version": "0.0.1",
"description": "",
"keywords": [],
"homepage": "https://github.com/yjl9903/epubook#readme",
"bugs": {
"url": "https://github.com/yjl9903/epubook/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/yjl9903/epubook.git"
},
"license": "MIT",
"author": "XLor",
"sideEffects": false,
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"format": "prettier --write src/**/*.ts test/**/*.ts",
"test": "vitest",
"test:ci": "vitest --run",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"vitest": "^0.29.1"
},
"engines": {
"node": ">=v16.19.0"
}
}
3 changes: 3 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function hello() {
return 'world';
}
7 changes: 7 additions & 0 deletions packages/core/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { describe, expect, it } from 'vitest'

describe('hello', () => {
it('should work', () => {
expect('Hello').toEqual('Hello');
});
});
4 changes: 3 additions & 1 deletion packages/epubook/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# epubook

A JavaScript / TypeScript EPUB generation library.
A Node EPUB generation library.

It will support the generation of the [latest epub standard](https://www.w3.org/TR/epub-33/) (3.3).

> 👷‍♂️ Still work in progress.
Expand Down
3 changes: 3 additions & 0 deletions packages/epubook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"test:ci": "vitest --run",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@epubook/core": "workspace:*"
},
"devDependencies": {
"vitest": "^0.29.1"
},
Expand Down

0 comments on commit 50becc4

Please sign in to comment.