Skip to content

Commit

Permalink
Save more bytes (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsenter authored Apr 26, 2022
1 parent a6a3c92 commit 565fbe3
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 167 deletions.
25 changes: 0 additions & 25 deletions .github/dependabot.yml

This file was deleted.

52 changes: 4 additions & 48 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,23 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '27 22 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- uses: github/codeql-action/autobuild@v2
- uses: github/codeql-action/analyze@v2
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.rulers": [80, 100, 120],
"editor.trimAutoWhitespace": true,
"files.encoding": "utf8",
"files.eol": "\n"
}
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The [Project Team](#join-the-project-team) looks forward to your contributions.

If you have a question about this project, how to use it, or just need clarification about something:

* Open an Issue at https://github.com/shinsenter/defer.js/issues
* Open an Issue at https://code.shin.company/defer.js/issues
* Provide as much context as you can about what you're running into.
* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.

Expand All @@ -47,7 +47,7 @@ Once it's filed:

If you run into an error or bug with the project:

* Open an Issue at https://github.com/shinsenter/defer.js/issues
* Open an Issue at https://code.shin.company/defer.js/issues
* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own.
* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it.

Expand All @@ -63,7 +63,7 @@ Once it's filed:

If the project doesn't do something you need or want it to do:

* Open an Issue at https://github.com/shinsenter/defer.js/issues
* Open an Issue at https://code.shin.company/defer.js/issues
* Provide as much context as you can about what you're running into.
* Please try and be clear about why existing features and alternatives would not work for you.

Expand Down Expand Up @@ -106,7 +106,7 @@ To contribute documentation:
* Make sure your changes are formatted correctly and consistently with the rest of the documentation.
* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(<component>): <message>`.
* Go to https://github.com/shinsenter/defer.js/pulls and open a new pull request with your changes.
* Go to https://code.shin.company/defer.js/pulls and open a new pull request with your changes.
* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.

Once you've filed the PR:
Expand All @@ -132,7 +132,7 @@ To contribute code:
* Write tests that verify that your contribution works as expected.
* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `<prefix>(deps): PKG@VERSION`, where `<prefix>` is any of the usual `conventional-changelog` prefixes, at your discretion.
* Go to https://github.com/shinsenter/defer.js/pulls and open a new pull request with your changes.
* Go to https://code.shin.company/defer.js/pulls and open a new pull request with your changes.
* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.

Once you've filed the PR:
Expand All @@ -153,7 +153,7 @@ Sometimes, the `support` label will be added to things that turn out to actually

In order to help other folks out with their questions:

* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/shinsenter/defer.js/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
* Go to the issue tracker and [filter open issues by the `support` label](https://code.shin.company/defer.js/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
* Read through the list until you find something that you're familiar enough with to give an answer to.
* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
Expand All @@ -170,7 +170,7 @@ Some notes on picking up support issues:

One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily.

In order to label issues, [open up the list of unlabeled issues](https://github.com/shinsenter/defer.js/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!
In order to label issues, [open up the list of unlabeled issues](https://code.shin.company/defer.js/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself!

Label | Apply When | Notes
--- | --- | ---
Expand Down Expand Up @@ -205,7 +205,7 @@ To clean up issues and PRs:
* not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available)
* no explicit messages in the comments asking for it to be left open
* does not belong to a milestone
* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/shinsenter/defer.js/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."
* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://code.shin.company/defer.js/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details."

## Review Pull Requests

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

🥇 A super small, super efficient library that helps you lazy load almost everything like images, video, audio, iframes as well as stylesheets, and JavaScript.

[![NPM](https://img.shields.io/npm/l/@shinsenter/defer.js)](https://raw.githubusercontent.com/shinsenter/defer.js/master/LICENSE)
[![NPM](https://img.shields.io/npm/l/@shinsenter/defer.js)](https://code.shin.company/defer.js/blob/master/LICENSE)
[![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@shinsenter/defer.js)](https://snyk.io/advisor/npm-package/@shinsenter/defer.js)
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/shinsenter/defer.js)](https://www.codefactor.io/repository/github/shinsenter/defer.js)

* * *

[![GitHub Release Date](https://img.shields.io/github/release-date/shinsenter/defer.js)](https://github.com/shinsenter/defer.js/releases)
[![GitHub package.json version](https://img.shields.io/github/package-json/v/shinsenter/defer.js)](https://github.com/shinsenter/defer.js/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date/shinsenter/defer.js)](https://code.shin.company/defer.js/releases)
[![GitHub package.json version](https://img.shields.io/github/package-json/v/shinsenter/defer.js)](https://code.shin.company/defer.js/releases)
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@shinsenter/defer.js)](https://www.npmjs.com/package/@shinsenter/defer.js)
[![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/@shinsenter/defer.js)](https://www.jsdelivr.com/package/npm/@shinsenter/defer.js)

[![NPM](https://nodei.co/npm/@shinsenter/defer.js.png?downloads=true)](https://www.npmjs.com/package/@shinsenter/defer.js)

- **Package**: [@shinsenter/defer.js](https://www.npmjs.com/package/@shinsenter/defer.js)
- **Version**: 2.5.0
- **Version**: 2.6.0
- **Author**: Mai Nhut Tan <[email protected]>
- **Copyright**: 2021 AppSeeds <https://code.shin.company/>
- **License**: [MIT](https://raw.githubusercontent.com/shinsenter/defer.js/master/LICENSE)
- **License**: [MIT](https://code.shin.company/defer.js/blob/master/LICENSE)

* * *

Expand Down Expand Up @@ -90,7 +90,7 @@ or load it from a CDN like below example.
<title>My Awesome Page</title>

<!-- Put defer.min.js here -->
<script id="defer-js" src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.5.0/dist/defer.min.js"></script>
<script id="defer-js" src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.6.0/dist/defer.min.js"></script>

<!-- ... -->
</head>
Expand All @@ -111,7 +111,7 @@ instead of `defer.min.js`.
<title>My Awesome Page</title>

<!-- Put defer_plus.min.js here -->
<script id="defer-js" src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.5.0/dist/defer_plus.min.js"></script>
<script id="defer-js" src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.6.0/dist/defer_plus.min.js"></script>

<!-- ... -->
</head>
Expand Down Expand Up @@ -602,7 +602,7 @@ Defer.js(base + '/highlight.pack.min.js', 'hljs-js', 1000, function () {
<a name="Defer.reveal"></a>

### Defer.reveal(element, [revealedClass]) ⇒ <code>void</code>
Reveal an element which is lazyloaded by the library
Reveals an element which is lazyloaded by the library

**Kind**: static method of [<code>Defer</code>](#Defer)
**Since**: 2.1
Expand Down Expand Up @@ -781,21 +781,21 @@ In this library, a closure is a [Function](#Function) that gives you access to a

### PHP library

[https://github.com/shinsenter/defer.php/](https://github.com/shinsenter/defer.php/)
[https://code.shin.company/defer.php/](https://code.shin.company/defer.php/)

🚀 A PHP library that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering the web page.


### Wordpress plugin

[https://github.com/shinsenter/defer-wordpress/](https://github.com/shinsenter/defer-wordpress/)
[https://code.shin.company/defer-wordpress/](https://code.shin.company/defer-wordpress/)

⚡️ A native, blazing fast lazy loader. ✅ Legacy browsers support (IE9+). 💯 SEO friendly. 🧩 Lazy load almost anything.


### Laravel package

[https://github.com/shinsenter/defer-laravel/](https://github.com/shinsenter/defer-laravel/)
[https://code.shin.company/defer-laravel/](https://code.shin.company/defer-laravel/)

🚀 A Laravel package that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering the web page.

Expand All @@ -804,9 +804,9 @@ In this library, a closure is a [Function](#Function) that gives you access to a

[![Donate via Paypal](https://img.shields.io/badge/Donate-Paypal-blue)](https://www.paypal.me/shinsenter)
[![Become a sponsor](https://img.shields.io/badge/Donate-Patreon-orange)](https://www.patreon.com/appseeds)
[![Become a stargazer](https://img.shields.io/badge/Support-Stargazer-yellow)](https://github.com/shinsenter/defer.js/stargazers)
[![Report an issue](https://img.shields.io/badge/Support-Issues-green)](https://github.com/shinsenter/defer.js/issues/new) [![Join the chat at https://gitter.im/shinsenter/defer.js](https://badges.gitter.im/shinsenter/defer.js.svg)](https://gitter.im/shinsenter/defer.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Become a stargazer](https://img.shields.io/badge/Support-Stargazer-yellow)](https://code.shin.company/defer.js/stargazers)
[![Report an issue](https://img.shields.io/badge/Support-Issues-green)](https://code.shin.company/defer.js/issues/new)
[![Join the chat at https://gitter.im/shinsenter/defer.js](https://badges.gitter.im/shinsenter/defer.js.svg)](https://gitter.im/shinsenter/defer.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

* * *

Expand Down
4 changes: 2 additions & 2 deletions dist/defer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 565fbe3

Please sign in to comment.