Skip to content

Commit

Permalink
feat: bin script
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Dec 26, 2023
1 parent 6fdbc66 commit 386db99
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 16 deletions.
1 change: 1 addition & 0 deletions packages/sample/.best-shot/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const config = {
path: 'dist',
module: true,
},
copy: ['./lib/bin.mjs'],
entry: {
sub: './lib/cmd.mjs',
},
Expand Down
4 changes: 4 additions & 0 deletions packages/sample/lib/bin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node

/* eslint-disable n/shebang */
import '@bring-it/cli/dist/cli.mjs';
5 changes: 4 additions & 1 deletion packages/sample/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/sample",
"version": "0.4.0",
"version": "0.4.1",
"description": "Generate code sample files",
"license": "MIT",
"author": {
Expand All @@ -26,6 +26,9 @@
"bugs": {
"url": "https://github.com/airkro/bring-it/issues"
},
"bin": {
"bring-it": "dist/bin.mjs"
},
"main": "dist/sub.mjs",
"files": [
"dist"
Expand Down
14 changes: 1 addition & 13 deletions packages/sentry/.best-shot/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,11 @@ export const config = {
path: 'dist',
module: true,
},
copy: ['./lib/bin.mjs'],
entry: {
sub: './lib/cmd.mjs',
},
externals: {
globby: 'globby',
},
optimization: {
// splitChunks: {
// cacheGroups: {
// vendors: {
// name: 'share',
// chunks: 'all',
// minChunks: 2,
// enforce: true,
// reuseExistingChunk: true,
// },
// },
// },
},
};
4 changes: 4 additions & 0 deletions packages/sentry/lib/bin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node

/* eslint-disable n/shebang */
import '@bring-it/cli/dist/cli.mjs';
5 changes: 4 additions & 1 deletion packages/sentry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/sentry",
"version": "0.5.0",
"version": "0.5.1",
"description": "Update sentry artifacts",
"license": "MIT",
"author": {
Expand All @@ -26,6 +26,9 @@
"bugs": {
"url": "https://github.com/airkro/bring-it/issues"
},
"bin": {
"bring-it": "dist/bin.mjs"
},
"main": "dist/sub.mjs",
"files": [
"dist"
Expand Down
1 change: 1 addition & 0 deletions packages/sftp/.best-shot/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const config = {
path: 'dist',
module: true,
},
copy: ['./lib/bin.mjs'],
entry: {
sub: './lib/cmd.mjs',
},
Expand Down
4 changes: 4 additions & 0 deletions packages/sftp/lib/bin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node

/* eslint-disable n/shebang */
import '@bring-it/cli/dist/cli.mjs';
5 changes: 4 additions & 1 deletion packages/sftp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/sftp",
"version": "0.3.0",
"version": "0.3.1",
"description": "SFTP deployment tool for frontend",
"license": "MIT",
"author": {
Expand All @@ -27,6 +27,9 @@
"bugs": {
"url": "https://github.com/airkro/bring-it/issues"
},
"bin": {
"bring-it": "dist/bin.mjs"
},
"main": "dist/sub.mjs",
"files": [
"dist"
Expand Down

0 comments on commit 386db99

Please sign in to comment.