-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPCP-65] Oneiros: Morpheus: Add Oneiros to Morpheus (#15)
* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus * ar(fix) [DPCP-65]: Adding Oneiros to Morpheus * ar(fix) [DPCP-65]: Adding Oneiros to Morpheus * ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep * ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep * ar(fix) [cherry-pick] date range colors * ar(fix) [cherry-pick] date range colors * ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep * ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep * ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep
- Loading branch information
1 parent
056da3c
commit ca30564
Showing
7 changed files
with
178 additions
and
43 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES5", | ||
"useDefineForClassFields": true, | ||
"lib": ["DOM", "DOM.Iterable"], | ||
"module": "commonjs", | ||
"skipLibCheck": true, | ||
"allowImportingTsExtensions": true, | ||
"resolveJsonModule": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"declaration": true, | ||
"outDir": "dist/cjs" | ||
}, | ||
"include": ["src"], | ||
"exclude": [ | ||
"src/**/__docs__","src/**/__test__", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,92 @@ | ||
/// <reference types='vitest' /> | ||
import commonjs from 'vite-plugin-commonjs'; | ||
import eslint from 'vite-plugin-eslint'; | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import dts from 'vite-plugin-dts'; | ||
import { peerDependencies } from './package.json'; | ||
|
||
export default defineConfig((env) => ({ | ||
build: { | ||
lib: { | ||
entry: './src/index.ts', | ||
name: 'vite-react-ts-button', | ||
fileName: (format) => `index.${format}.js`, | ||
formats: ['cjs', 'es'], | ||
}, | ||
rollupOptions: { | ||
external: [...Object.keys(peerDependencies), 'react/jsx-runtime'], | ||
}, | ||
sourcemap: true, | ||
emptyOutDir: true, | ||
}, | ||
plugins: [ | ||
dts({ | ||
insertTypesEntry: true, | ||
}), | ||
react({ fastRefresh: false }), | ||
env.mode !== 'test' && | ||
eslint({ | ||
exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'], | ||
}), | ||
], | ||
test: { | ||
globals: true, | ||
environment: 'jsdom', | ||
setupFiles: './setupTests.ts', | ||
}, | ||
})); | ||
export default defineConfig((env) => { | ||
return env.mode != 'cjs' | ||
? { | ||
// es-module | ||
build: { | ||
outDir: './dist/esm', | ||
lib: { | ||
entry: './src/index.ts', | ||
name: 'oneiros-esm', | ||
fileName: (format) => `index.es.js`, | ||
formats: ['es'], | ||
}, | ||
rollupOptions: { | ||
external: [ | ||
...Object.keys(peerDependencies), | ||
'react/jsx-runtime', | ||
'moment', | ||
], | ||
}, | ||
sourcemap: true, | ||
emptyOutDir: false, | ||
}, | ||
plugins: [ | ||
dts({ | ||
insertTypesEntry: true, | ||
tsconfigPath: './tsconfig.json', | ||
}), | ||
react({ fastRefresh: false }), | ||
env.mode !== 'test' && | ||
eslint({ | ||
exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'], | ||
}), | ||
], | ||
test: { | ||
globals: true, | ||
environment: 'jsdom', | ||
setupFiles: './setupTests.ts', | ||
}, | ||
} | ||
: { | ||
build: { | ||
// cjs | ||
outDir: './dist/cjs', | ||
lib: { | ||
entry: './src/index.ts', | ||
name: 'oneiros-cjs', | ||
fileName: (format) => `index.cjs`, | ||
formats: ['cjs'], | ||
}, | ||
rollupOptions: { | ||
external: [ | ||
...Object.keys(peerDependencies), | ||
'react/jsx-runtime', | ||
'moment', | ||
], | ||
onwarn(warning, defaultHandler) { | ||
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') { | ||
return; | ||
} | ||
defaultHandler(warning); | ||
}, | ||
}, | ||
sourcemap: true, | ||
emptyOutDir: false, | ||
}, | ||
plugins: [ | ||
dts({ | ||
insertTypesEntry: true, | ||
tsconfigPath: './tsconfig-cjs.json', | ||
}), | ||
commonjs(), | ||
// react({ fastRefresh: false }), | ||
env.mode !== 'test' && | ||
eslint({ | ||
exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'], | ||
}), | ||
], | ||
test: { | ||
globals: true, | ||
environment: 'jsdom', | ||
setupFiles: './setupTests.ts', | ||
}, | ||
}; | ||
}); |