Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
feat(package): allow publish on lafourchette registry and update with…
Browse files Browse the repository at this point in the history
… origin project main branch (#1)

* chore(deps): bump eslint-utils from 1.3.1 to 1.4.3 (SimenB#181)

* chore(deps): bump js-yaml from 3.12.1 to 3.14.0 (SimenB#180)

* chore(deps): bump acorn from 5.7.3 to 5.7.4 (SimenB#172)

* chore: set up GH Actions as CI (SimenB#190)

* chore: enable smeantic-release on main

* chore: refresh lockfile (SimenB#193)

* chore: run tests against multiple versions of html-webpack-plugin (SimenB#194)

* chore: run lint in only one job (SimenB#195)

* chore: always upload coverage result (SimenB#196)

* chore: fix example

* chore: add test running dll in the browser (SimenB#197)

* chore: use includes to test puppeteer rather than separate job (SimenB#198)

* feat: add support for webpack@5 and html-webpack-plugin@5 (SimenB#187)

Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>

* chore: increase timeout for puppeteer test

* chore(deps): bump ssri from 6.0.1 to 6.0.2 (SimenB#203)

* chore: add renovate

* chore(deps): update actions/setup-node action to v2.1.5 (SimenB#205)

* chore: automerge lockfile PRs

* chore: lock down merge2

* chore(deps): bump lodash from 4.17.20 to 4.17.21 (SimenB#223)

* chore(deps): bump browserslist from 4.16.3 to 4.16.6 (SimenB#227)

* chore(package): edit package.json to allow publish on lafourchette registry

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <simenb@folio.no>
Co-authored-by: Alex Gorbatchev <alexgorbatchev@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
6 people authored Oct 13, 2021
1 parent 253209c commit c3f4568
Show file tree
Hide file tree
Showing 20 changed files with 14,601 additions and 3,119 deletions.
10 changes: 10 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
comment: off

coverage:
status:
patch:
default:
target: 100%
project:
default:
target: 100%
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"extends": "simenb-base",
"overrides": [
{
"files": "test.js",
"files": ["test.js", "puppeteer.test.js"],
"env": {
"jest": true
},
"rules": {
"no-console": "off"
}
},
{
Expand Down
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["config:base"],
"lockFileMaintenance": { "enabled": true, "automerge": true },
"rangeStrategy": "replace",
"postUpdateOptions": ["yarnDedupeHighest"]
}
160 changes: 160 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
name: Node.js CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test-node:
name: Test on Node.js v${{ matrix.node-version }} and html-webpack-plugin v${{ matrix.html-plugin-version }} and webpack v${{ matrix.webpack-version }}
strategy:
fail-fast: false
matrix:
node-version: [6.x, 8.x, 10.x, 12.x, 14.x, 15.x]
html-plugin-version: [3, 4, 5]
webpack-version: [4, 5]
exclude:
# plugin@5 only supports webpack@5
- html-plugin-version: 5
webpack-version: 4
# plugin@3 only supports webpack@4
- html-plugin-version: 3
webpack-version: 5
# webpack@5 and plugin@5 does not support node 6 or 8
- node-version: 6.x
webpack-version: 5
- node-version: 6.x
html-plugin-version: 5
- node-version: 8.x
webpack-version: 5
- node-version: 8.x
html-plugin-version: 5
include:
- node-version: 10.x
install-puppeteer: true
- node-version: 12.x
install-puppeteer: true
- node-version: 14.x
install-puppeteer: true
- node-version: 15.x
install-puppeteer: true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: install with html-webpack-plugin v${{matrix.html-plugin-version }} and webpack v${{ matrix.webpack-version }}
run: |
yarn
yarn add --dev html-webpack-plugin@${{matrix.html-plugin-version }} webpack@${{ matrix.webpack-version }}
git checkout yarn.lock
- name: install puppeteer
if: ${{ matrix.install-puppeteer }}
run: |
yarn add --dev puppeteer
yarn example
git checkout yarn.lock
- name: run tests
run: yarn cover
- uses: codecov/codecov-action@v1
if: ${{ always() }}
test-os:
name: Test on ${{ matrix.os }} using Node.js LTS
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-node@v2.1.5
with:
node-version: 14.x
- run: yarn
- name: install puppeteer
run: |
yarn add --dev puppeteer
yarn example
git checkout yarn.lock
- name: run tests
run: yarn cover
lint:
name: Run ESLint using Node.js LTS
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-node@v2.1.5
with:
node-version: 14.x
- run: yarn
- run: yarn lint

release:
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
name: Release new version
needs: [lint, test-node, test-os]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: install
run: yarn
- run: npx semantic-release@17
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ coverage/
*.log
build/
dist/
.eslintcache
5 changes: 0 additions & 5 deletions .hound.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
> Add a JavaScript or CSS asset to the HTML generated by `html-webpack-plugin`
[![NPM Version][npm-image]][npm-url]
[![Linux & Mac Build Status][travis-image]][travis-url]
[![Windows Build Status][appveyor-image]][appveyor-url]
[![CI Build Status][gh-actions-image]][gh-actions-url]
[![Code Coverage branch][codecov-image]][codecov-url]

[![Dependency Status][david-image]][david-url]
[![Dev Dependency Status][david-dev-image]][david-dev-url]
[![Peer Dependency Status][david-peer-image]][david-peer-url]
[![Greenkeeper Dependency Status][greenkeeper-image]][greenkeeper-url]

## Installation

Expand Down Expand Up @@ -261,13 +259,10 @@ const webpackConfig = {

[npm-url]: https://npmjs.org/package/add-asset-html-webpack-plugin
[npm-image]: https://img.shields.io/npm/v/add-asset-html-webpack-plugin.svg
[travis-url]: https://travis-ci.org/SimenB/add-asset-html-webpack-plugin
[travis-image]:
https://img.shields.io/travis/SimenB/add-asset-html-webpack-plugin/master.svg
[appveyor-url]:
https://ci.appveyor.com/project/SimenB/add-asset-html-webpack-plugin
[appveyor-image]:
https://ci.appveyor.com/api/projects/status/dim5hcl49h3pi332/branch/master?svg=true
[gh-actions-url]:
https://github.com/SimenB/add-asset-html-webpack-plugin/actions/workflows/node.js.yml
[gh-actions-image]:
https://github.com/SimenB/add-asset-html-webpack-plugin/actions/workflows/node.js.yml/badge.svg?branch=main
[codecov-url]: https://codecov.io/gh/SimenB/add-asset-html-webpack-plugin
[codecov-image]:
https://img.shields.io/codecov/c/github/SimenB/add-asset-html-webpack-plugin/master.svg
Expand All @@ -282,6 +277,3 @@ const webpackConfig = {
https://david-dm.org/SimenB/add-asset-html-webpack-plugin?type=peer
[david-peer-image]:
https://img.shields.io/david/peer/SimenB/add-asset-html-webpack-plugin.svg
[greenkeeper-url]: https://greenkeeper.io/
[greenkeeper-image]:
https://badges.greenkeeper.io/SimenB/add-asset-html-webpack-plugin.svg
28 changes: 0 additions & 28 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion example/dll/webpack.config.dll.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
entry: {
vendor: ['classnames'],
},
devtool: '#source-map',
devtool: 'source-map',
mode: 'development',
output: {
path: path.join(__dirname, 'build'),
Expand Down
3 changes: 2 additions & 1 deletion example/dll/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ module.exports = {
// Normally CWD
context: __dirname,
entry: path.join(__dirname, 'entry.js'),
devtool: '#source-map',
devtool: 'source-map',
mode: 'development',
output: {
path: path.join(__dirname, 'dist'),
filename: 'index_bundle.js',
publicPath: '',
},
plugins: [
new webpack.DllReferencePlugin({
Expand Down
3 changes: 2 additions & 1 deletion example/polyfill/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ module.exports = {
// Normally CWD
context: __dirname,
entry: path.join(__dirname, 'entry.js'),
devtool: '#source-map',
devtool: 'source-map',
mode: 'development',
output: {
path: path.join(__dirname, 'dist'),
filename: 'index_bundle.js',
publicPath: '',
},
plugins: [
new HtmlWebpackPlugin(),
Expand Down
Loading

0 comments on commit c3f4568

Please sign in to comment.