Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: DevTools correctly ommitted at production
- Loading branch information
Showing
27 changed files
with
248 additions
and
163 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,5 +61,6 @@ | |
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
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 |
---|---|---|
|
@@ -62,5 +62,6 @@ | |
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
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 |
---|---|---|
|
@@ -74,5 +74,6 @@ | |
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
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 |
---|---|---|
|
@@ -52,5 +52,6 @@ | |
"publishConfig": { | ||
"directory": "./package", | ||
"access": "public" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
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,16 +1,3 @@ | ||
import { buildMain, buildVanilla } from './rollup.common'; | ||
import { buildMain } from './rollup.common'; | ||
|
||
export default [ | ||
...buildMain(), | ||
// separately built modules intended for vanilla usage | ||
...buildVanilla('src/index.ts', 'web'), | ||
...buildVanilla('src/InContextTools.ts', 'in-context-tools'), | ||
...buildVanilla('src/ObserverPlugin.ts', 'observer-plugin'), | ||
...buildVanilla('src/Tolgee.ts', 'tolgee'), | ||
...buildVanilla('src/LanguageStorage.ts', 'language-storage'), | ||
...buildVanilla('src/LanguageDetector.ts', 'language-detector'), | ||
...buildVanilla('src/BackendFetch.ts', 'backend-fetch'), | ||
...buildVanilla('src/BackendFetch.ts', 'backend-fetch'), | ||
...buildVanilla('src/LanguageDetector.ts', 'language-detector'), | ||
...buildVanilla('src/LanguageStorage.ts', 'language-storage'), | ||
]; | ||
export default [...buildMain()]; |
This file was deleted.
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
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,5 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
export * from './production'; | ||
import { InContextTools } from '../InContextTools'; | ||
|
||
export const DevTools = InContextTools; |
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,8 @@ | ||
import { TolgeeInstance } from '@tolgee/core'; | ||
|
||
export const DevTools = () => (tolgee: TolgeeInstance) => tolgee; | ||
export * from '../typedIndex'; | ||
export { | ||
PREFERRED_LANGUAGES_LOCAL_STORAGE_KEY, | ||
DEVTOOLS_ID, | ||
} from '../constants'; |
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,2 @@ | ||
export { InContextTools } from '../InContextTools'; | ||
export { ContextUi } from '../ContextUi'; |
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,8 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
export * from './production'; | ||
import { TolgeeInstance } from '@tolgee/core'; | ||
|
||
export const DevTools = | ||
process.env.NODE_ENV === 'production' | ||
? () => (tolgee: TolgeeInstance) => tolgee | ||
: require('../dist/tolgee-in-context-tools.umd').InContextTools; |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"internal": true, | ||
"main": "../dist/tolgee-in-context-tools.cjs.js", | ||
"module": "../dist/tolgee-in-context-tools.cjs.js", | ||
"types": "../types/tools.d.ts" | ||
} |
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,4 +1,4 @@ | ||
{ | ||
"extends": "./tsconfig", | ||
"include": ["src/index.ts"] | ||
"exclude": ["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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
import type { TolgeePlugin, DevCredentials } from '@tolgee/core'; | ||
import type { TolgeePlugin } from '@tolgee/core'; | ||
import type { InContextOptions } from '../lib/types'; | ||
|
||
export declare const ContextUi: () => TolgeePlugin; | ||
export declare const InContextTools: ( | ||
options?: InContextOptions | ||
) => TolgeePlugin; | ||
export declare const DevTools: typeof InContextTools; | ||
export declare const DevTools: (options?: InContextOptions) => TolgeePlugin; | ||
|
||
export * from '../lib/typedIndex'; |
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,7 @@ | ||
import type { TolgeePlugin } from '@tolgee/core'; | ||
import type { InContextOptions } from '../lib/types'; | ||
|
||
export declare const ContextUi: () => TolgeePlugin; | ||
export declare const InContextTools: ( | ||
options?: InContextOptions | ||
) => TolgeePlugin; |
Oops, something went wrong.