Merge pull request #178 from spotify/patriko/cli-dev

cli: always use src/ version of cli inside repo
This commit is contained in:
Patrik Oldsberg
2020-03-06 14:31:58 +01:00
committed by GitHub
2 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
"start": "yarn build && yarn workspace @spotify-backstage/app start",
"build": "lerna run build",
"test": "cross-env CI=true lerna run test --stream --parallel -- --coverage",
"create-plugin": "yarn workspace @spotify-backstage/cli build && backstage-cli create-plugin",
"create-plugin": "backstage-cli create-plugin",
"lint": "lerna run lint --stream"
},
"workspaces": {
+15 -1
View File
@@ -1,2 +1,16 @@
#!/usr/bin/env node
require('../cjs');
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');
} else {
require('ts-node').register({
project: path.resolve(__dirname, '../tsconfig.json'),
transpileOnly: true,
});
require('../src');
}