Skip to content

Commit

Permalink
Re-initialized project with new ownership.
Browse files Browse the repository at this point in the history
  • Loading branch information
moonstar-x committed Jul 24, 2024
1 parent 9fac1f5 commit 0b6a305
Show file tree
Hide file tree
Showing 19 changed files with 3,340 additions and 8,469 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
10 changes: 5 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"extends": [
"greencoast/node"
],
"ignorePatterns": [
"**/*.d.ts"
"@moonstar-x/eslint-config/rules/node",
"@moonstar-x/eslint-config/rules/typescript"
],
"rules": {
"no-console": "off"
"no-console": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
}
36 changes: 36 additions & 0 deletions .github/workflows/callable-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Publish Package

on:
workflow_call:
secrets:
token:
required: true

jobs:
publish:
name: Build & Publish Package to Registry
runs-on: ubuntu-latest

steps:
- name: Checkout the Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build Library
run: npm run build

- name: Publish to Registry
uses: JS-DevTools/npm-publish@v3
with:
registry: ${{ inputs.registry }}
access: public
33 changes: 33 additions & 0 deletions .github/workflows/callable-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run Tests

on:
workflow_call:

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest

steps:
- name: Checkout the Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install Dependencies
run: npm ci

- name: Run Type Checks
run : npm run type-check

- name: Run Linter
run: npm run lint

- name: Run Tests
run: npm run test
53 changes: 0 additions & 53 deletions .github/workflows/ci.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: On Pull Request

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

jobs:
test:
name: Run Tests
uses: ./.github/workflows/callable-test.yml
19 changes: 19 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: On Push (Main)

on:
push:
branches:
- main

jobs:
test:
name: Run Tests
uses: ./.github/workflows/callable-test.yml

publish:
name: Publish Package to Registry
uses: ./.github/workflows/callable-publish.yml
needs:
- test
secrets:
token: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ typings/

# next.js build output
.next

# Build
build
5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Greencoast Studios
Copyright (c) 2024 moonstar-x

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[![ci-build-status](https://img.shields.io/github/actions/workflow/status/greencoast-studios/node-logger/ci.yml?logo=github&label=build)](https://github.com/greencoast-studios/node-logger)
[![issues](https://img.shields.io/github/issues/greencoast-studios/node-logger?logo=github)](https://github.com/greencoast-studios/node-logger)
[![bundle-size](https://img.shields.io/bundlephobia/min/@greencoast/logger)](https://www.npmjs.com/package/@greencoast/logger)
[![version](https://img.shields.io/npm/v/@greencoast/logger?logo=npm)](https://www.npmjs.com/package/@greencoast/logger)
[![downloads-week](https://img.shields.io/npm/dw/@greencoast/logger?logo=npm)](https://www.npmjs.com/package/@greencoast/logger)
[![downloads-total](https://img.shields.io/npm/dt/@greencoast/logger?logo=npm)](https://www.npmjs.com/package/@greencoast/logger)
[![ci-build-status](https://img.shields.io/github/actions/workflow/status/moonstar-x/node-logger/ci.yml?logo=github&label=build)](https://github.com/moonstar-x/node-logger)
[![issues](https://img.shields.io/github/issues/moonstar-x/node-logger?logo=github)](https://github.com/moonstar-x/node-logger)
[![bundle-size](https://img.shields.io/bundlephobia/min/@moonstar-x/logger)](https://www.npmjs.com/package/@moonstar-x/logger)
[![version](https://img.shields.io/npm/v/@moonstar-x/logger?logo=npm)](https://www.npmjs.com/package/@moonstar-x/logger)
[![downloads-week](https://img.shields.io/npm/dw/@moonstar-x/logger?logo=npm)](https://www.npmjs.com/package/@moonstar-x/logger)
[![downloads-total](https://img.shields.io/npm/dt/@moonstar-x/logger?logo=npm)](https://www.npmjs.com/package/@moonstar-x/logger)

# @greencoast/logger
# @moonstar-x/logger

This is a small logging module that helps with a more organized message logging through color, logging type and timestamps. Used in [Greencoast Studios](https://github.com/greencoast-studios) packages and projects.
This is a small logging module that helps with a more organized message logging through color, logging type and timestamps.

## Usage

Expand All @@ -16,20 +16,20 @@ This is a small logging module that helps with a more organized message logging
With `npm`:

``` text
npm install @greencoast/logger
npm install @moonstar-x/logger
```

or with `yarn`:

``` text
yarn add @greencoast/logger
yarn add @moonstar-x/logger
```

### Importing the Package

``` js
const logger = require('@greencoast/logger');
import logger from '@greencoast/logger';
const logger = require('@moonstar-x/logger');
import logger from '@moonstar-x/logger';
```

### Logging Messages
Expand Down Expand Up @@ -79,7 +79,3 @@ You can clear the console with:
``` js
logger.clear();
```

## Author

This module was made by [Greencoast Studios](https://github.com/greencoast-studios).
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
module.exports = {
roots: ['<rootDir>./src'],
transform: {
'^.+\\.tsx?$': 'ts-jest'
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'node'
};
Loading

0 comments on commit 0b6a305

Please sign in to comment.