-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This updates monorepo tools nx to latest version and tweaks libs configs of libs Signed-off-by: Danil Kostromin <[email protected]>
- Loading branch information
Danil Kostromin
committed
Jan 12, 2024
1 parent
5bd5778
commit 7150704
Showing
49 changed files
with
2,524 additions
and
2,656 deletions.
There are no files selected for viewing
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
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
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
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
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,64 +1,28 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
/* SPDX-FileCopyrightText: 2021-2023 OKTET Labs Ltd. */ | ||
/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
import dts from 'vite-plugin-dts'; | ||
import { joinPathFragments } from '@nx/devkit'; | ||
import svgr from 'vite-plugin-svgr'; | ||
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; | ||
|
||
export default defineConfig({ | ||
cacheDir: '../../../../node_modules/.vite/bublik-features-auth', | ||
root: __dirname, | ||
cacheDir: '../../../node_modules/.vite/libs/shared/tailwind', | ||
|
||
plugins: [ | ||
dts({ | ||
entryRoot: 'src', | ||
tsConfigFilePath: joinPathFragments(__dirname, 'tsconfig.lib.json'), | ||
skipDiagnostics: true | ||
}), | ||
react(), | ||
viteTsConfigPaths({ | ||
root: '../../../../' | ||
}), | ||
svgr({ svgrOptions: { ref: true } }) | ||
], | ||
plugins: [react(), nxViteTsPaths(), svgr({})], | ||
|
||
// Uncomment this if you are using workers. | ||
// worker: { | ||
// plugins: [ | ||
// viteTsConfigPaths({ | ||
// root: '../../../../', | ||
// }), | ||
// ], | ||
// plugins: [ nxViteTsPaths() ], | ||
// }, | ||
|
||
// Configuration for building your library. | ||
// See: https://vitejs.dev/guide/build.html#library-mode | ||
build: { | ||
lib: { | ||
// Could also be a dictionary or array of multiple entry points. | ||
entry: 'src/index.ts', | ||
name: 'bublik-features-auth', | ||
fileName: 'index', | ||
// Change this to the formats you want to support. | ||
// Don't forgot to update your package.json as well. | ||
formats: ['es', 'cjs'] | ||
}, | ||
rollupOptions: { | ||
// External packages that should not be bundled into your library. | ||
external: ['react', 'react-dom', 'react/jsx-runtime'] | ||
} | ||
}, | ||
|
||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../../../../node_modules/.vitest' | ||
}, | ||
cache: { dir: '../../../node_modules/.vitest' }, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
setupFiles: [`${process.cwd()}/setup-globals.ts`] | ||
// globalSetup: './setup-globals.ts', | ||
reporters: ['default'], | ||
coverage: { | ||
reportsDirectory: '../../../coverage/libs/shared/tailwind', | ||
provider: 'v8' | ||
} | ||
} | ||
}); |
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,15 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
/* SPDX-FileCopyrightText: 2021-2023 OKTET Labs Ltd. */ | ||
import { afterEach, expect } from 'vitest'; | ||
import { cleanup } from '@testing-library/react'; | ||
import matchers from '@testing-library/jest-dom/matchers'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
|
||
expect.extend(matchers); | ||
afterEach(() => { | ||
cleanup(); | ||
}); | ||
|
||
export const setup = () => { | ||
process.env.TZ = 'UTC'; | ||
}; |
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,63 +1,29 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
/* SPDX-FileCopyrightText: 2021-2023 OKTET Labs Ltd. */ | ||
/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
import dts from 'vite-plugin-dts'; | ||
import { join } from 'path'; | ||
import svgr from 'vite-plugin-svgr'; | ||
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; | ||
|
||
export default defineConfig({ | ||
cacheDir: '../../../../node_modules/.vite/bublik-features-dashboard-v2', | ||
root: __dirname, | ||
cacheDir: '../../../node_modules/.vite/libs/bublik/features/dashboard-v2', | ||
|
||
plugins: [ | ||
dts({ | ||
entryRoot: 'src', | ||
tsConfigFilePath: join(__dirname, 'tsconfig.lib.json'), | ||
skipDiagnostics: true | ||
}), | ||
react(), | ||
svgr({ svgrOptions: { ref: true } }), | ||
viteTsConfigPaths({ | ||
root: '../../../../' | ||
}) | ||
], | ||
plugins: [react(), nxViteTsPaths(), svgr({})], | ||
|
||
// Uncomment this if you are using workers. | ||
// worker: { | ||
// plugins: [ | ||
// viteTsConfigPaths({ | ||
// root: '../../../../', | ||
// }), | ||
// ], | ||
// plugins: [ nxViteTsPaths() ], | ||
// }, | ||
|
||
// Configuration for building your library. | ||
// See: https://vitejs.dev/guide/build.html#library-mode | ||
build: { | ||
lib: { | ||
// Could also be a dictionary or array of multiple entry points. | ||
entry: 'src/index.ts', | ||
name: 'bublik-features-dashboard-v2', | ||
fileName: 'index', | ||
// Change this to the formats you want to support. | ||
// Don't forgot to update your package.json as well. | ||
formats: ['es', 'cjs'] | ||
}, | ||
rollupOptions: { | ||
// External packages that should not be bundled into your library. | ||
external: ['react', 'react-dom', 'react/jsx-runtime'] | ||
} | ||
}, | ||
|
||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../../../../node_modules/.vitest' | ||
}, | ||
cache: { dir: '../../../node_modules/.vitest' }, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
setupFiles: [`${process.cwd()}/setup-globals.ts`] | ||
reporters: ['default'], | ||
setupFiles: './setup.ts', | ||
coverage: { | ||
reportsDirectory: '../../../coverage/libs/shared/tailwind', | ||
provider: 'v8' | ||
} | ||
} | ||
}); |
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
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
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
Oops, something went wrong.