packages: added more compile-test packages to try deps and transitive deps

This commit is contained in:
Patrik Oldsberg
2020-02-27 17:15:00 +01:00
parent 8d69089cf4
commit 83b8786378
15 changed files with 77 additions and 3 deletions
@@ -13,6 +13,7 @@
},
"devDependencies": {
"@spotify/web-scripts": "^6.0.0",
"@spotify-backstage/cli": "^1.2.0"
"@spotify-backstage/cli": "^1.2.0",
"compile-test-lib": "0.0.0"
}
}
@@ -1,7 +1,13 @@
import React, { FC } from 'react';
import { getMessage } from 'compile-test-lib';
const ExampleComponent: FC<{}> = () => {
return <div>This is the ExampleComponent</div>;
return (
<div>
<h2>This is the ExampleComponent</h2>
<p>{getMessage()}</p>
</div>
);
};
export default ExampleComponent;
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.json",
"extends": "@spotify/web-scripts/config/tsconfig.json",
"include": ["dev", "src"]
}
@@ -0,0 +1,3 @@
# compile-test-lib
Used to try out different setups for building packages separately but supporting global watch mode.
@@ -0,0 +1,4 @@
module.exports = {
...require('@spotify/web-scripts/config/jest.config.js'),
setupFilesAfterEnv: ['../jest.setup.ts'],
};
@@ -0,0 +1 @@
import '@testing-library/jest-dom/extend-expect';
@@ -0,0 +1,16 @@
{
"name": "compile-test-lib-2",
"version": "0.0.0",
"main": "dist/cjs",
"license": "Apache-2.0",
"private": false,
"scripts": {
"build": "tsc --outDir dist/cjs --noEmit false --module CommonJS",
"build:watch": "yarn run build --watch",
"lint": "web-scripts lint",
"test": "web-scripts test"
},
"devDependencies": {
"@spotify/web-scripts": "^6.0.0"
}
}
@@ -0,0 +1,3 @@
export function getPartialMessage(): string {
return '<lib2/>';
}
@@ -0,0 +1,4 @@
{
"extends": "@spotify/web-scripts/config/tsconfig.json",
"include": ["src"]
}
@@ -0,0 +1,3 @@
# compile-test-lib
Used to try out different setups for building packages separately but supporting global watch mode.
@@ -0,0 +1,4 @@
module.exports = {
...require('@spotify/web-scripts/config/jest.config.js'),
setupFilesAfterEnv: ['../jest.setup.ts'],
};
@@ -0,0 +1 @@
import '@testing-library/jest-dom/extend-expect';
@@ -0,0 +1,19 @@
{
"name": "compile-test-lib",
"version": "0.0.0",
"main": "dist/cjs/index.js",
"license": "Apache-2.0",
"private": false,
"scripts": {
"build": "tsc --outDir dist/cjs --noEmit false --module CommonJS",
"build:watch": "yarn run build --watch",
"lint": "web-scripts lint",
"test": "web-scripts test"
},
"dependencies": {
"compile-test-lib-2": "0.0.0"
},
"devDependencies": {
"@spotify/web-scripts": "^6.0.0"
}
}
@@ -0,0 +1,5 @@
import { getPartialMessage } from 'compile-test-lib-2';
export function getMessage(): string {
return `<lib> ${getPartialMessage()} </lib>`;
}
@@ -0,0 +1,4 @@
{
"extends": "@spotify/web-scripts/config/tsconfig.json",
"include": ["src"]
}