Skip to content

Commit

Permalink
Merge pull request #87 from IgorKowalczyk/renovate/prettier-3.x
Browse files Browse the repository at this point in the history
Update dependency prettier to v3
  • Loading branch information
IgorKowalczyk authored Jul 6, 2023
2 parents b2fd2e2 + 88cde54 commit d81541b
Show file tree
Hide file tree
Showing 10 changed files with 423 additions and 55 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ module.exports = {
browser: true,
node: true,
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
};
2 changes: 2 additions & 0 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
cache: "pnpm"
- name: 🚀 Install dependencies
run: pnpm install
- name: 🚀 Build package
run: pnpm build
- name: 🚀 Publish package
run: pnpm publish --access public --publish-branch ${{ github.head_ref }} --no-git-checks
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
cache: "pnpm"
- name: 🚀 Install dependencies
run: pnpm install
- name: 🚀 Build package
run: pnpm build
- name: 🚀 Publish package
run: pnpm publish --access public --publish-branch ${{ github.head_ref }} --no-git-checks
env:
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
package.json
pnpm-lock.yaml
pnpm-lock.yaml
dist
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<img width="170" height="170" align="left" style="float: left; margin: 0 10px 0 0; border-radius: 50%;" alt="Replit Logo" src="https://user-images.githubusercontent.com/49127376/163621584-81a05476-a4ba-4f0d-affa-a378f338a0e7.png">
<img width="170" height="170" align="left" style="float: left; margin: 0 10px 0 0; border-radius: 50%;" alt="Replit Logo" src="https://github.com/IgorKowalczyk/repl-uptime/assets/49127376/7a63817d-1b90-4be2-a3c6-3cbee075dbf8">

# Repl-uptime

🤙 Don't let your repl go to sleep! Create a http server with just one line of code and keep pinging it!
<br><br><br>

[![GitHub License](https://img.shields.io/github/license/igorkowalczyk/repl-uptime?color=%23F26207&logo=github&style=flat-square&label=License)](https://github.com/igorkowalczyk/repl-uptime/blob/main/license.md)
[![NPM Version](https://img.shields.io/npm/v/%40igorkowalczyk%2Frepl-uptime/latest.svg?logo=npm&logoColor=fff&style=flat-square&color=%23F26207)](https://npmjs.com/package/@igorkowalczyk/repl-uptime)
[![NPM Downloads](https://img.shields.io/npm/dw/@igorkowalczyk/repl-uptime?logo=npm&logoColor=fff&style=flat-square&color=%23F26207&label=Downloads)](https://npmjs.com/package/@igorkowalczyk/repl-uptime)

---

Expand All @@ -29,12 +32,20 @@ pnpm add @igorkowalczyk/repl-uptime
**No Config**

```javascript
/// CommonJS
require("@igorkowalczyk/repl-uptime").config();
```

```javascript
/// ES6
import { config } from "@igorkowalczyk/repl-uptime";
config();
```

**With Config**

```javascript
/// CommonJS
require("@igorkowalczyk/repl-uptime").config({
port: 8080,
path: "/",
Expand All @@ -43,6 +54,17 @@ require("@igorkowalczyk/repl-uptime").config({
});
```

```javascript
/// ES6
import { config } from "@igorkowalczyk/repl-uptime";
config({
port: 8080,
path: "/",
message: "🤙 Don't let your repl go to sleep!",
debug: true,
});
```

## ⁉️ Issues

If you have any issues with the page please create [new issue here](https://github.com/igorkowalczyk/repl-uptime/issues)
Expand All @@ -58,3 +80,7 @@ When submitting a pull request:
## 📋 License

This project is licensed under the MIT. See the [LICENSE](https://github.com/igorkowalczyk/repl-uptime/blob/master/license.md) file for details

---

<sub>This package is an independent project and is not affiliated, endorsed, or associated with <a href="https://replit.com">Replit</a> in any way.</sub>
8 changes: 2 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"use strict";
import { createServer } from "node:http";

const { createServer } = require("node:http");

function config(options = {}) {
export function config(options = {}) {
let port = options.port || 8080;
let customURL = options.path ? options.path.toString() : "/";
let customResponse = options.message ? options.message.toString() : "200 OK!";
Expand All @@ -18,5 +16,3 @@ function config(options = {}) {
if (options.debug) console.log(`::debug:: [repl-uptime] => Server listening on port ${port}`);
});
}

module.exports = { config };
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
{
"name": "@igorkowalczyk/repl-uptime",
"version": "1.3.1",
"version": "1.4.0",
"description": "🤙 Don't let your repl go to sleep! Create a http server with just one line of code and keep pinging it! ",
"main": "index.js",
"module": "index.js",
"type": "module",
"exports": {
"import": "./dist/mjs/index.js",
"require": "./dist/cjs/index.cjs"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rollup -c",
"format:check": "prettier --check --cache .",
"format": "prettier --write . --ignore-unknown --cache",
"lint": "eslint . --ext .js,.ts",
"lint:fix": "eslint . --ext .js,.ts --fix"
},
"devDependencies": {
"@igorkowalczyk/eslint-config": "1.5.2",
"@igorkowalczyk/prettier-config": "1.5.2",
"eslint": "8.44.0",
"prettier": "3.0.0",
"rollup": "3.26.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/IgorKowalczyk/repl-uptime.git"
Expand All @@ -19,14 +29,9 @@
"url": "https://github.com/IgorKowalczyk/repl-uptime/issues"
},
"homepage": "https://github.com/IgorKowalczyk/repl-uptime#readme",
"devDependencies": {
"@igorkowalczyk/eslint-config": "1.4.2",
"@igorkowalczyk/prettier-config": "1.4.2",
"eslint": "8.44.0",
"prettier": "2.8.8"
},
"files": [
"index.js"
"README.md",
"dist"
],
"author": "Igor Kowalczyk",
"license": "MIT",
Expand Down
Loading

0 comments on commit d81541b

Please sign in to comment.