Skip to content

Commit

Permalink
Merge pull request #2 from edumudu/feat/monorepo
Browse files Browse the repository at this point in the history
Moves to monorepo structure
  • Loading branch information
edumudu authored Mar 17, 2022
2 parents 9fbfb9a + bc73d30 commit b2109aa
Show file tree
Hide file tree
Showing 15 changed files with 374 additions and 164 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ jobs:

- uses: pocket-apps/action-update-version@v1
with:
files: ./package.json
files: ./packages/cli/package.json
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publishing Library
run: npm publish
run: |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
npm publish --workspace loctry
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ jspm_packages/

# parcel-bundler cache (https://parceljs.org/)
.cache

# Turborepo
.turbo
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

28 changes: 1 addition & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,7 @@

This is a CLI for improve the local library testing experience. Under the hood this CLI uses `npm pack` for generate a tarball equals the sended to the npm registry to allow you test if the proejct is correcty configurated.

### Usage

Install the loctry globaly
```bash
npm install -g loctry
```

Enter in your pacakge directory and run
```bash
loctry publish
```
> NOTE: This command needs to be run in the same dir as the `package.json`
This command will pack and send your package tarball to the `.loctry` folder to be avaiable to be installed in others projects.

> NOTE: Do not modify `.loctry` dir manually. This is an internal API
To install the package enter in the project directory and run
```bash
loctry install <package-name>
```

This command will install your local package in the current project

## LICENSE

This project is under MIT licence. See the archive [LICENSE](LICENSE) to more details.
Check The CLI [docs](./packages/cli/README.md)

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
Expand Down
45 changes: 13 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
{
"name": "loctry",
"version": "1.2.0",
"name": "loctry-morepo",
"version": "1.0.0",
"author": "Eduardo Wesley <[email protected]>",
"description": "A CLI to manage local library testing",
"main": "bin/index.mjs",
"license": "MIT",
"type": "module",
"repository": "github:edumudu/loctry",
"homepage": "https://github.com/edumudu/loctry#readme",
"keywords": [
"cli",
"local development",
"library testing",
"library development",
"local registry",
"local npm"
],
"files": [
"bin",
"config",
"commands"
],
"bin": {
"loctry": "./bin/index.mjs"
},
"dependencies": {
"chalk": "^5.0.1",
"yargs": "^17.3.1"
},
"private": true,
"engines": {
"node": ">=10.0.0",
"npm": ">=7.0.0",
"node": ">=16.0.0",
"npm": ">=8.0.0",
"yarn": ">=1.0.0"
}
}
},
"devDependencies": {
"turbo": "^1.1.6"
},
"workspaces": [
"packages/*"
]
}
58 changes: 58 additions & 0 deletions packages/cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Turborepo
.turbo
File renamed without changes.
75 changes: 75 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<div align="center">

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
</div>

<br />
<p align="center">
<h3 align="center">loctry</h3>

<p align="center">
This is a CLI for improve the local library testing experience
<br />
<br />
<a href="https://github.com/edumudu/loctry/issues">
Report Bug
</a>
·
<a href="https://github.com/edumudu/loctry/issues">
Request Feature
</a>
</p>
</p>

## About The Project

This is a CLI for improve the local library testing experience. Under the hood this CLI uses `npm pack` for generate a tarball equals the sended to the npm registry to allow you test if the proejct is correcty configurated.

### Usage

Install the loctry globaly
```bash
npm install -g loctry
```

Enter in your pacakge directory and run
```bash
loctry publish
```
> NOTE: This command needs to be run in the same dir as the `package.json`
This command will pack and send your package tarball to the `.loctry` folder to be avaiable to be installed in others projects.

> NOTE: Do not modify `.loctry` dir manually. This is an internal API
To install the package enter in the project directory and run
```bash
loctry install <package-name>
```

This command will install your local package in the current project

## LICENSE

This project is under MIT licence. See the archive [LICENSE](./packages/cli/LICENSE) to more details.

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/edumudu/loctry?style=flat-square
[contributors-url]: https://github.com/edumudu/loctry/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/edumudu/loctry?style=flat-square
[forks-url]: https://github.com/edumudu/loctry/network/members

[stars-shield]: https://img.shields.io/github/stars/edumudu/loctry?style=flat-square
[stars-url]: https://github.com/edumudu/loctry/stargazers

[issues-shield]: https://img.shields.io/github/issues-raw/edumudu/loctry?style=flat-square
[issues-url]: https://github.com/edumudu/loctry/issues

[license-shield]: https://img.shields.io/github/license/edumudu/loctry?style=flat-square
[license-url]: https://github.com/edumudu/loctry/blob/master/LICENSE
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "loctry",
"version": "1.2.0",
"author": "Eduardo Wesley <[email protected]>",
"description": "A CLI to manage local library testing",
"main": "bin/index.mjs",
"license": "MIT",
"type": "module",
"repository": "github:edumudu/loctry",
"homepage": "https://github.com/edumudu/loctry/tree/main/packages/cli#readme",
"keywords": [
"cli",
"local development",
"library testing",
"library development",
"local registry",
"local npm"
],
"files": [
"bin",
"config",
"commands"
],
"bin": {
"loctry": "./bin/index.mjs"
},
"dependencies": {
"chalk": "^5.0.1",
"yargs": "^17.3.1"
},
"engines": {
"node": ">=10.0.0",
"npm": ">=7.0.0",
"yarn": ">=1.0.0"
}
}
5 changes: 5 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {}
}
Loading

0 comments on commit b2109aa

Please sign in to comment.