Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Dec 6, 2020
1 parent 6da5541 commit 8536103
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ jobs:

- name: Copy files for release
run: |
cp package.json dist/
cp package-lock.json dist/
cp oclif.manifest.json dist/
- name: Publish
run: cd dist && npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 0 additions & 7 deletions bin/lift.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#!/usr/bin/env node

import '../src/commands/export';
import '../src/commands/permissions';
import '../src/commands/remove';
import '../src/commands/status';
import '../src/commands/up';
import '../src/commands/variables';

require('@oclif/command').run()
.then(require('@oclif/command/flush'))
.catch((err: any) => {
Expand Down
3 changes: 2 additions & 1 deletion dist/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
lift
oclif.manifest.json
package.json
package-lock.json
bin/*.js
src/**.js
36 changes: 36 additions & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@mnapoli/lift",
"license": "proprietary",
"homepage": "https://github.com/mnapoli/lift",
"repository": "https://github.com/mnapoli/lift",
"bin": {
"lift": "bin/lift.js"
},
"dependencies": {
"@oclif/command": "^1.8.0",
"@oclif/config": "^1.17.0",
"@oclif/plugin-help": "^3.2.0",
"aws-sdk": "^2.737.0",
"chalk": "^4.1.0",
"change-case": "^4.1.1",
"js-yaml": "^3.14.0",
"log-symbols": "^4.0.0",
"ora": "^5.0.0"
},
"engines": {
"node": ">=8.0.0"
},
"files": [
"/bin",
"/src",
"/npm-shrinkwrap.json",
"/oclif.manifest.json"
],
"oclif": {
"commands": "./src/commands",
"bin": "lift",
"plugins": [
"@oclif/plugin-help"
]
}
}
7 changes: 5 additions & 2 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ const fs = require('fs');
const localPkgJson = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));

require('esbuild').build({
entryPoints: ['bin/lift.ts'],
entryPoints: [
'bin/lift.ts',
...fs.readdirSync('src/commands').map(file => 'src/commands/' + file),
],
bundle: true,
platform: 'node',
outfile: 'dist/lift',
outdir: 'dist',
minify: true,
external: Object.keys({
...(localPkgJson.dependencies || {}),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "proprietary",
"homepage": "https://github.com/mnapoli/lift",
"bin": {
"lift": "lift"
"lift": "bin/lift.js"
},
"dependencies": {
"@oclif/command": "^1.8.0",
Expand Down

0 comments on commit 8536103

Please sign in to comment.