cli: only build cjs to dist folder and set it as entrypoint
This commit is contained in:
@@ -5,7 +5,7 @@ const path = require('path');
|
||||
// Figure out whether we're running inside the backstage repo or as an installed dependency
|
||||
const isLocal = require('fs').existsSync(path.resolve(__dirname, '../src'));
|
||||
if (!isLocal) {
|
||||
require('../cjs');
|
||||
require('../dist');
|
||||
} else {
|
||||
require('ts-node').register({
|
||||
project: path.resolve(__dirname, '../tsconfig.json'),
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{
|
||||
"name": "@spotify-backstage/cli",
|
||||
"version": "1.3.0",
|
||||
"main": "src/index.ts",
|
||||
"main:src": "src/index.ts",
|
||||
"main": "dist",
|
||||
"license": "Apache-2.0",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"exec": "npx ts-node ./src",
|
||||
"build": "web-scripts build",
|
||||
"build": "tsc --outDir dist --noEmit false --module CommonJS",
|
||||
"lint": "web-scripts lint",
|
||||
"test": "web-scripts test",
|
||||
"start": "nodemon ."
|
||||
@@ -52,7 +51,7 @@
|
||||
"files": [
|
||||
"templates",
|
||||
"bin",
|
||||
"cjs"
|
||||
"dist"
|
||||
],
|
||||
"nodemonConfig": {
|
||||
"watch": "./src",
|
||||
|
||||
Reference in New Issue
Block a user