Skip to content

Commit

Permalink
feat(di): better packaging setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzofox3 committed Mar 2, 2024
1 parent f79e988 commit 86b8f78
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/di/dist/cofn-di.min.js

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

4 changes: 3 additions & 1 deletion packages/di/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
},
"scripts": {
"dev": "vite",
"test": "node test/run-ci.js"
"test": "node test/run-ci.js",
"build": "rollup -c rollup.config.js > ./dist/cofn-di.min.js",
"size": "rollup -c rollup.config.js | brotli | wc -c"
},
"author": "Laurent RENARD",
"devDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions packages/di/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DI

Dependency injection container which leans on the DOM

## Installation

you can install the library with a package manager (like npm):
``npm install @cofn/di``

Or import it directly from a CDN
5 changes: 5 additions & 0 deletions packages/di/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import terser from '@rollup/plugin-terser';
export default {
input: 'src/index.js',
plugins: [terser()],
};
6 changes: 6 additions & 0 deletions packages/di/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from 'vite';
import zoraDev from '@cofn/test-lib/vite';

export default defineConfig({
plugins: [zoraDev()],
});

0 comments on commit 86b8f78

Please sign in to comment.