Compare commits
4 Commits
1.0.0-alph
...
1.0.0-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aefd888de3 | ||
|
|
577e619089 | ||
|
|
2159398a3d | ||
|
|
1d079bdc26 |
@@ -1,9 +0,0 @@
|
|||||||
.github
|
|
||||||
build
|
|
||||||
src
|
|
||||||
|
|
||||||
*.log
|
|
||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
.cache
|
|
||||||
*.lock
|
|
||||||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
build
|
||||||
@@ -52,7 +52,7 @@ Run the `ldd` binary to see the available commands:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# With Yarn
|
# With Yarn
|
||||||
$ yarn ldd
|
$ yarn ldd --help
|
||||||
Usage: ldd [options] [command]
|
Usage: ldd [options] [command]
|
||||||
|
|
||||||
A zero-config local MariaDB instance for local development (using Docker)
|
A zero-config local MariaDB instance for local development (using Docker)
|
||||||
|
|||||||
@@ -3,10 +3,12 @@
|
|||||||
// Inspired by: https://blog.xendit.engineer/how-we-repurposed-npm-to-publish-and-distribute-our-go-binaries-for-internal-cli-23981b80911b
|
// Inspired by: https://blog.xendit.engineer/how-we-repurposed-npm-to-publish-and-distribute-our-go-binaries-for-internal-cli-23981b80911b
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
const BIN_BASE_NAME = './bin/@mep-agency/local-dev-db';
|
const BIN_BASE_DIR = `${__dirname}/bin/@mep-agency`;
|
||||||
|
const BIN_BASE_NAME = `${BIN_BASE_DIR}/local-dev-db`;
|
||||||
|
|
||||||
if (!fs.existsSync(BIN_BASE_NAME) || !fs.statSync(BIN_BASE_NAME).isDirectory()) {
|
if (!fs.existsSync(path.dirname(BIN_BASE_DIR)) || !fs.statSync(path.dirname(BIN_BASE_DIR)).isDirectory()) {
|
||||||
console.info('Binaries are not available, this probably means we are in a development environment... skipping!');
|
console.info('Binaries are not available, this probably means we are in a development environment... skipping!');
|
||||||
|
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mep-agency/local-dev-db",
|
"name": "@mep-agency/local-dev-db",
|
||||||
"version": "1.0.0-alpha2",
|
"version": "1.0.0-alpha4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A zero-config local MariaDB instance for local development (using Docker)",
|
"description": "A zero-config local MariaDB instance for local development (using Docker)",
|
||||||
"author": "Marco Lipparini <developer@liarco.net>",
|
"author": "Marco Lipparini <developer@liarco.net>",
|
||||||
@@ -21,11 +21,11 @@
|
|||||||
"url": "https://github.com/mep-agency/local-dev-db/issues"
|
"url": "https://github.com/mep-agency/local-dev-db/issues"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rm -rf ./bin && rm -rf ./build && tsc && pkg -c package.json ./build/src/index.js && yarn postinstall",
|
"build": "rm -rf ./bin && rm -rf ./build && tsc && pkg -c package.json ./build/src/index.js",
|
||||||
"watch": "tsc --watch",
|
"watch": "tsc --watch",
|
||||||
"format": "prettier --write \"**/*.{ts,md,scss,css,js}\"",
|
"format": "prettier --write \"**/*.{ts,md,scss,css,js}\"",
|
||||||
"lint": "prettier --check \"**/*.{ts,md,scss,css,js}\"",
|
"lint": "prettier --check \"**/*.{ts,md,scss,css,js}\"",
|
||||||
"postinstall": "node postinstall.js install"
|
"install": "node lifecycle.js install"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"ldd": "./ldd"
|
"ldd": "./ldd"
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
"docker",
|
"docker",
|
||||||
"postinstall.js",
|
"lifecycle.js",
|
||||||
"LICENCE",
|
"LICENCE",
|
||||||
"README.md"
|
"README.md"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user