Merge pull request #478 from spotify/rugvip/core-build

packages/cli: update plugin:build make deps external and work with .js + use to build core
This commit is contained in:
Patrik Oldsberg
2020-04-06 15:58:59 +02:00
committed by GitHub
5 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
"main": "dist",
"scripts": {
"exec": "npx ts-node ./src",
"build": "backstage-cli build-cache -- tsc --outDir dist --noEmit false --module CommonJS",
"build": "backstage-cli build-cache -- tsc",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"start": "nodemon ."
@@ -22,6 +22,7 @@ import postcss from 'rollup-plugin-postcss';
import imageFiles from 'rollup-plugin-image-files';
import json from '@rollup/plugin-json';
import { RollupWatchOptions } from 'rollup';
import { paths } from '../../helpers/paths';
export default {
input: 'src/index.ts',
@@ -30,7 +31,9 @@ export default {
format: 'cjs',
},
plugins: [
peerDepsExternal(),
peerDepsExternal({
includeDependencies: true,
}),
resolve({
mainFields: ['browser', 'module', 'main'],
}),
@@ -41,6 +44,9 @@ export default {
postcss(),
imageFiles(),
json(),
typescript(),
typescript({
include: `${paths.resolveTarget('src')}/**/*.{js,jsx,ts,tsx}`,
exclude: [paths.resolveTarget('src/testUtils/**')],
}),
],
} as RollupWatchOptions;
+3 -1
View File
@@ -1,7 +1,9 @@
{
"extends": "@spotify/web-scripts/config/tsconfig.json",
"extends": "../../tsconfig.json",
"include": ["src"],
"compilerOptions": {
"outDir": "dist",
"module": "CommonJS",
"baseUrl": "src",
"paths": {
"*": ["src/*"]
+4 -4
View File
@@ -16,11 +16,11 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/cjs/index.js",
"types": "dist/cjs/index.d.ts",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"scripts": {
"build:watch": "tsc --outDir dist/cjs --noEmit false --module CommonJS --watch",
"build": "backstage-cli build-cache -- tsc --outDir dist/cjs --noEmit false --module CommonJS",
"build:watch": "backstage-cli plugin:build --watch",
"build": "backstage-cli build-cache -- backstage-cli plugin:build",
"lint": "backstage-cli lint",
"test": "backstage-cli test"
},
+1 -1
View File
@@ -18,7 +18,7 @@ import { SvgIconProps } from '@material-ui/core';
import PeopleIcon from '@material-ui/icons/People';
import PersonIcon from '@material-ui/icons/Person';
import React, { FC } from 'react';
import { useApp } from '../api';
import { useApp } from '../api/app/AppContext';
import { IconComponent, SystemIconKey, SystemIcons } from './types';
export const defaultSystemIcons: SystemIcons = {