Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): create config package #589

Merged
merged 5 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"packages/solecs",
"packages/store",
"packages/world",
"packages/config",
"packages/cli",
"packages/recs",
"packages/react",
Expand Down
9 changes: 9 additions & 0 deletions packages/config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cache
dist
docs
_docs
DOCS.md
artifacts
yarn-error.log
API
tsconfig.tsbuildinfo
6 changes: 6 additions & 0 deletions packages/config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*

!dist/**
!src/**
!package.json
!README.md
4 changes: 4 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
1 change: 1 addition & 0 deletions packages/config/CHANGELOG.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: Changelog
1 change: 1 addition & 0 deletions packages/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Config
2 changes: 2 additions & 0 deletions packages/config/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: config
order: 60
30 changes: 30 additions & 0 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@latticexyz/config",
"license": "MIT",
"version": "1.41.0",
"description": "Config for Store and World",
"type": "module",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"repository": {
"type": "git",
"url": "https://github.com/latticexyz/mud.git",
"directory": "packages/config"
},
"scripts": {
"prepare": "yarn build",
"test": "echo 'TODO tests'",
dk1a marked this conversation as resolved.
Show resolved Hide resolved
"build": "vite build",
"link": "yarn link",
"release": "npm publish --access=public"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.0.0",
"@types/rollup-plugin-peer-deps-external": "^2.2.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"vite": "^4.2.1",
"vitest": "^0.29.8"
},
"gitHead": "914a1e0ae4a573d685841ca2ea921435057deb8f"
}
2 changes: 2 additions & 0 deletions packages/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// TODO stub
export {};
17 changes: 17 additions & 0 deletions packages/config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
"target": "es2021",
"module": "esnext",
"moduleResolution": "node",
"types": [],
"declaration": true,
"sourceMap": true,
"rootDir": "./src",
"outDir": "dist",
"isolatedModules": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
}
}
26 changes: 26 additions & 0 deletions packages/config/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineConfig } from "vitest/config";
import typescript from "@rollup/plugin-typescript";
import peerDepsExternal from "rollup-plugin-peer-deps-external";

/**
* @see https://vitejs.dev/config/
*/
export default defineConfig({
build: {
lib: {
entry: "src/index.ts",
formats: ["cjs", "es"],
},
outDir: "dist",
minify: false,
sourcemap: true,
},
/**
* @see https://vitest.dev/config/
*/
test: {
dk1a marked this conversation as resolved.
Show resolved Hide resolved
environment: "node",
globals: true,
},
plugins: [(typescript as any)(), peerDepsExternal()],
});
173 changes: 173 additions & 0 deletions yarn.lock

Large diffs are not rendered by default.