Skip to content

Commit

Permalink
chore: revert type module (#3172)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Mar 9, 2023
1 parent 6e93df0 commit d5ceeb6
Show file tree
Hide file tree
Showing 19 changed files with 111 additions and 48 deletions.
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Library providing ability to translate messages directly in context of developed application.",
"main": "./dist/tolgee.cjs.js",
"module": "./dist/tolgee.esm.js",
"svelte": "./dist/tolgee.esm.mjs",
"types": "./lib/index.d.ts",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/tolgee/tolgee-js"
Expand All @@ -23,7 +23,7 @@
"exports": {
".": {
"require": "./dist/tolgee.cjs.js",
"import": "./dist/tolgee.esm.js"
"import": "./dist/tolgee.esm.mjs"
},
"./package.json": "./package.json"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ export default {
format: 'esm',
sourcemap: true,
},
{
file: 'dist/tolgee.esm.min.js',
format: 'esm',
plugins: [terser()],
sourcemap: true,
},
{
file: 'dist/tolgee.esm.mjs',
format: 'esm',
sourcemap: true,
},
{
file: 'dist/tolgee.esm.min.mjs',
format: 'esm',
Expand Down
4 changes: 2 additions & 2 deletions packages/format-icu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Tolgee format-icu plugin.",
"main": "./dist/tolgee-format-icu.cjs.js",
"module": "./dist/tolgee-format-icu.esm.js",
"svelte": "./dist/tolgee-format-icu.esm.mjs",
"types": "./lib/index.d.ts",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/tolgee/tolgee-js"
Expand All @@ -27,7 +27,7 @@
"exports": {
".": {
"require": "./dist/tolgee-format-icu.cjs.js",
"import": "./dist/tolgee-format-icu.esm.js"
"import": "./dist/tolgee-format-icu.esm.mjs"
},
"./package.json": "./package.json"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/format-icu/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ export default {
format: 'esm',
sourcemap: true,
},
{
file: 'dist/tolgee-format-icu.esm.mjs',
format: 'esm',
sourcemap: true,
},
{
file: 'dist/tolgee-format-icu.esm.min.js',
format: 'esm',
plugins: [terser()],
sourcemap: true,
},
{
file: 'dist/tolgee-format-icu.esm.min.mjs',
format: 'esm',
Expand Down
1 change: 1 addition & 0 deletions packages/i18next/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules
/dist
/lib
/coverage


# local env files
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/i18next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Tolgee i18n integration.",
"main": "./dist/tolgee-i18next.cjs.js",
"module": "./dist/tolgee-i18next.esm.js",
"svelte": "./dist/tolgee-i18next.esm.mjs",
"types": "./lib/index.d.ts",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/tolgee/tolgee-js"
Expand All @@ -27,7 +27,7 @@
"scripts": {
"build": "rollup -c rollup.config.js && tsc --project tsconfig.prod.json",
"clean": "rm -rf build build-e2e dist dist-e2e lib",
"test": "jest --config ./jest.config.js",
"test": "jest --collect-coverage",
"develop": "concurrently \"rollup -c rollup.config.js -w\" \"tsc --watch --preserveWatchOutput --project tsconfig.prod.json\" ",
"schema": "openapi-typescript http://localhost:8080/v3/api-docs/All%20Internal%20-%20for%20Tolgee%20Web%20application --output ./src/types/apiSchema.generated.ts",
"typedoc": "typedoc --entryPointStrategy expand --out docs src/index.ts src/Tolgee.ts src/types.ts src/services/EventEmitter.ts src/services/Subscription.ts"
Expand Down Expand Up @@ -68,7 +68,7 @@
"exports": {
".": {
"require": "./dist/tolgee-i18next.cjs.js",
"import": "./dist/tolgee-i18next.esm.js"
"import": "./dist/tolgee-i18next.esm.mjs"
},
"./package.json": "./package.json"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/i18next/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ export default {
format: 'esm',
sourcemap: true,
},
{
file: 'dist/tolgee-i18next.esm.min.js',
format: 'esm',
plugins: [terser()],
sourcemap: true,
},
{
file: 'dist/tolgee-i18next.esm.mjs',
format: 'esm',
sourcemap: true,
},
{
file: 'dist/tolgee-i18next.esm.min.mjs',
format: 'esm',
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"main": "./dist/tolgee-react.cjs.js",
"module": "./dist/tolgee-react.esm.js",
"types": "lib/index.d.ts",
"type": "module",
"repository": "https://github.com/tolgee/tolgee-js",
"homepage": "https://tolgee.io",
"keywords": [
Expand Down Expand Up @@ -73,7 +72,7 @@
"exports": {
".": {
"require": "./dist/tolgee-react.cjs.js",
"import": "./dist/tolgee-react.esm.js"
"import": "./dist/tolgee-react.esm.mjs"
},
"./package.json": "./package.json"
},
Expand Down
13 changes: 13 additions & 0 deletions packages/react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ export default {
format: 'esm',
sourcemap: true,
},
{
name: '@tolgee/react',
file: 'dist/tolgee-react.esm.min.js',
format: 'esm',
sourcemap: true,
plugins: [terser()],
},
{
name: '@tolgee/react',
file: 'dist/tolgee-react.esm.mjs',
format: 'esm',
sourcemap: true,
},
{
name: '@tolgee/react',
file: 'dist/tolgee-react.esm.min.mjs',
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": "dist/tolgee-vue.esm.js",
"main": "dist/tolgee-vue.cjs.js",
"types": "lib/index.d.ts",
"type": "module",
"repository": "https://github.com/tolgee/tolgee-js",
"homepage": "https://tolgee.io",
"keywords": [
Expand All @@ -22,10 +21,10 @@
"dist": "dist"
},
"scripts": {
"build": "rollup -c rollup.config.js && tsc --project tsconfig.prod.json",
"build": "rollup -c rollup.config.mjs && tsc --project tsconfig.prod.json",
"clean": "rm -rf build build-e2e dist dist-e2e lib",
"test": "jest --collect-coverage",
"develop": "concurrently \"rollup -c rollup.config.js -w\" \"tsc --watch --preserveWatchOutput --project tsconfig.prod.json\" "
"develop": "concurrently \"rollup -c rollup.config.mjs -w\" \"tsc --watch --preserveWatchOutput --project tsconfig.prod.json\" "
},
"author": "JanCizmar",
"license": "MIT",
Expand Down Expand Up @@ -55,7 +54,7 @@
"concurrently": "7.2.2",
"jest": "^27.3.1",
"jest-fetch-mock": "^3.0.3",
"rollup": "3.15.0",
"rollup": "3.18.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-terser": "7.0.2",
Expand All @@ -67,7 +66,7 @@
"exports": {
".": {
"require": "./dist/tolgee-vue.cjs.js",
"import": "./dist/tolgee-vue.esm.js"
"import": "./dist/tolgee-vue.esm.mjs"
},
"./package.json": "./package.json"
},
Expand Down
13 changes: 13 additions & 0 deletions packages/vue/rollup.config.js → packages/vue/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ export default {
format: 'esm',
sourcemap: true,
},
{
name: '@tolgee/vue',
file: 'dist/tolgee-vue.esm.min.js',
format: 'esm',
sourcemap: true,
plugins: [terser()],
},
{
name: '@tolgee/vue',
file: 'dist/tolgee-vue.esm.mjs',
format: 'esm',
sourcemap: true,
},
{
name: '@tolgee/vue',
file: 'dist/tolgee-vue.esm.min.mjs',
Expand Down
File renamed without changes.
12 changes: 4 additions & 8 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@
"declaration": true,
"main": "./index.js",
"types": "./types/index.d.ts",
"type": "module",
"exports": {
".": {
"production": {
"require": "./dist/tolgee-web.production.cjs.js",
"import": "./dist/tolgee-web.production.esm.js",
"svelte": "./dist/tolgee-web.production.esm.js"
"import": "./dist/tolgee-web.production.esm.mjs"
},
"require": "./index.js",
"import": "./dist/tolgee-web.development.esm.js",
"svelte": "./dist/tolgee-web.development.esm.js",
"import": "./dist/tolgee-web.development.esm.mjs",
"types": "./types/index.d.ts"
},
"./tools": {
"require": "./dist/tolgee-in-context-tools.cjs.js",
"import": "./dist/tolgee-in-context-tools.esm.js",
"svelte": "./dist/tolgee-in-context-tools.esm.js",
"import": "./dist/tolgee-in-context-tools.esm.mjs",
"types": "./types/index.d.ts"
},
"./package.json": "./package.json"
Expand All @@ -33,7 +29,7 @@
"scripts": {
"build": "rollup -c rollup.config.js && tsc --project tsconfig.prod.json",
"clean": "rm -rf build build-e2e dist dist-e2e lib",
"test": "jest --config ./jest.config.js --collect-coverage",
"test": "jest --collect-coverage",
"develop": "concurrently \"rollup -c rollup.dev.js -w\" \"tsc --watch --preserveWatchOutput --project tsconfig.prod.json\" ",
"schema": "openapi-typescript http://localhost:8202/v3/api-docs/Accessible%20with%20API%20key --output ./src/ui/client/apiSchema.generated.ts"
},
Expand Down
13 changes: 11 additions & 2 deletions packages/web/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"internal": true,
"main": "../dist/tolgee-in-context-tools.cjs.js",
"module": "../dist/tolgee-in-context-tools.cjs.js",
"types": "../types/tools.d.ts"
"module": "../dist/tolgee-in-context-tools.esm.js",
"svelte": "../dist/tolgee-in-context-tools.esm.mjs",
"types": "../types/tools.d.ts",
"exports": {
".": {
"require": "../dist/tolgee-in-context-tools.cjs.js",
"import": "../dist/tolgee-in-context-tools.esm.mjs",
"types": "../types/index.d.ts"
},
"./package.json": "./package.json"
}
}
Loading

0 comments on commit d5ceeb6

Please sign in to comment.