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

ExPlat: Self-Contained Client Base Package #49502

Merged
merged 3 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 packages/explat-client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to remove that one if we won't be declaring any special eslint rules or exceptions here.

3 changes: 3 additions & 0 deletions packages/explat-client/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: '../../test/packages/jest-preset.js',
};
25 changes: 25 additions & 0 deletions packages/explat-client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "@automattic/explat-client",
"version": "0.0.1",
"description": "Standalone ExPlat Client",
"author": "Automattic Inc.",
"license": "GPL-2.0-or-later",
"main": "dist/cjs/index.js",
"browser": "dist/esm/index.js",
"module": "dist/esm/index.js",
"calypso:src": "src/index.ts",
"types": "dist/types/index.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/Automattic/wp-calypso.git",
"directory": "packages/explat-client"
},
"scripts": {
"clean": "tsc --build ./tsconfig.json ./tsconfig-cjs.json --clean && npx rimraf dist",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"watch": "tsc --build ./tsconfig.json --watch",
"prepack": "yarn run clean && yarn run build",
"test": "yarn jest"
}
}
1 change: 1 addition & 0 deletions packages/explat-client/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const stubExport = null;
11 changes: 11 additions & 0 deletions packages/explat-client/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"declarationDir": null,
"outDir": "dist/cjs",
"composite": false,
"incremental": true
}
}
30 changes: 30 additions & 0 deletions packages/explat-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compilerOptions": {
"target": "ES5",
"lib": [ "DOM", "ESNext" ],
"baseUrl": ".",
"module": "esnext",
"allowJs": true,
"checkJs": true,
"jsx": "react",
"declaration": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
"rootDir": "src",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"typeRoots": [ "../../node_modules/@types" ],
"types": [ "node" ],
"noEmitHelpers": true,
"importHelpers": true,
"composite": true
},
"include": [ "src" ],
"exclude": [ "**/docs/*", "**/test/*" ]
}