cli: only build cjs to dist folder and set it as entrypoint

This commit is contained in:
Patrik Oldsberg
2020-03-06 15:59:26 +01:00
parent cb8a9c285d
commit 427ad9c242
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -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'),
+3 -4
View File
@@ -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",