mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-14 00:58:26 -05:00
Compare commits
14 Commits
adds-eslin
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2c4681af2 | ||
|
|
091a357382 | ||
|
|
88ce8763fc | ||
|
|
83ba9d23ff | ||
|
|
c3a1e71d98 | ||
|
|
17f5731912 | ||
|
|
97367a94f4 | ||
|
|
b99ebd644a | ||
|
|
94f79e4c17 | ||
|
|
f814431eea | ||
|
|
1fd0124ecd | ||
|
|
1e01d6e47f | ||
|
|
15bf5543c3 | ||
|
|
a0db7c3c5d |
19
.eslintrc.js
19
.eslintrc.js
@@ -1,19 +0,0 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
mocha: true,
|
||||
node: true,
|
||||
},
|
||||
plugins: ['mocha'],
|
||||
extends: 'eslint:recommended',
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
indent: ['error', 2],
|
||||
quotes: ['error', 'single'],
|
||||
semi: ['error', 'always'],
|
||||
},
|
||||
};
|
||||
47
.github/workflows/build-dist.yml
vendored
Normal file
47
.github/workflows/build-dist.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Build and PR dist changes
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-pr-dist:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build project
|
||||
run: npm run build
|
||||
|
||||
- name: Check for dist changes
|
||||
id: git-diff
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add dist
|
||||
if git diff --cached --quiet; then
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Create Pull Request for dist changes
|
||||
if: steps.git-diff.outputs.changed == 'true'
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
commit-message: "chore(dist): update dist folder after build"
|
||||
title: "chore(dist): update dist folder after build"
|
||||
body: "This PR updates the dist folder with the latest build output."
|
||||
branch: update-dist-after-build
|
||||
add-paths: dist
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -22,13 +22,15 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
|
||||
with:
|
||||
languages: "javascript"
|
||||
queries: +security-and-quality
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
|
||||
|
||||
7
.github/workflows/dependency-review.yml
vendored
7
.github/workflows/dependency-review.yml
vendored
@@ -9,6 +9,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Dependency Review"
|
||||
uses: actions/dependency-review-action@v4
|
||||
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3
|
||||
|
||||
43
.github/workflows/ossf-scorecard.yml
vendored
Normal file
43
.github/workflows/ossf-scorecard.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
branch_protection_rule:
|
||||
schedule:
|
||||
- cron: '27 12 * * 2'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
|
||||
permissions:
|
||||
security-events: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
10
.github/workflows/publish.yml
vendored
10
.github/workflows/publish.yml
vendored
@@ -16,7 +16,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Get tag
|
||||
id: get_version
|
||||
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> "$GITHUB_OUTPUT"
|
||||
@@ -25,7 +27,7 @@ jobs:
|
||||
run: zip -r ../html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip ./
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
@@ -35,7 +37,7 @@ jobs:
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
@@ -44,7 +46,7 @@ jobs:
|
||||
asset_name: html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
6
.github/workflows/push-to-template.yml
vendored
6
.github/workflows/push-to-template.yml
vendored
@@ -21,9 +21,11 @@ jobs:
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
- name: Install dependencies
|
||||
|
||||
7
.github/workflows/spellcheck.yml
vendored
7
.github/workflows/spellcheck.yml
vendored
@@ -12,8 +12,11 @@ jobs:
|
||||
spellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: streetsidesoftware/cspell-action@v7
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d # v7.2.0
|
||||
with:
|
||||
inline: warning
|
||||
strict: false
|
||||
|
||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@@ -26,15 +26,15 @@ jobs:
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run tests ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
|
||||
12
dist/package.json
vendored
12
dist/package.json
vendored
@@ -14,11 +14,11 @@
|
||||
"build": "webpack --config webpack.config.prod.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"webpack": "^5.91.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4",
|
||||
"webpack-merge": "^5.10.0"
|
||||
"copy-webpack-plugin": "^13.0.1",
|
||||
"html-webpack-plugin": "^5.6.4",
|
||||
"webpack": "^5.101.3",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.2",
|
||||
"webpack-merge": "^6.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
30
eslint.config.mjs
Normal file
30
eslint.config.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import globals from 'globals';
|
||||
import js from '@eslint/js';
|
||||
import mocha from 'eslint-plugin-mocha';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
plugins: {
|
||||
js,
|
||||
mocha,
|
||||
},
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.mocha,
|
||||
},
|
||||
},
|
||||
extends: ['js/recommended'],
|
||||
rules: {
|
||||
// Your custom rules
|
||||
indent: ['error', 2],
|
||||
quotes: ['error', 'single'],
|
||||
semi: ['error', 'always'],
|
||||
},
|
||||
},
|
||||
]);
|
||||
@@ -2,7 +2,7 @@ import fs from 'fs';
|
||||
import path from 'path';
|
||||
import gulp from 'gulp';
|
||||
import gulpAutoPrefixer from 'gulp-autoprefixer';
|
||||
import gulpEslint from 'gulp-eslint';
|
||||
import gulpEslint from 'gulp-eslint-new';
|
||||
import gulpHeader from 'gulp-header';
|
||||
import gulpRename from 'gulp-rename';
|
||||
import archiver from 'archiver';
|
||||
|
||||
4666
package-lock.json
generated
4666
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -29,21 +29,21 @@
|
||||
"test": "gulp archive && mocha --reporter spec --timeout 5000"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.35.0",
|
||||
"archiver": "^7.0.1",
|
||||
"del": "^7.1.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-recommended": "^4.1.0",
|
||||
"eslint-plugin-mocha": "^10.5.0",
|
||||
"glob": "^11.0.2",
|
||||
"gulp": "^5.0.0",
|
||||
"del": "^8.0.1",
|
||||
"eslint": "^9.35.0",
|
||||
"eslint-plugin-mocha": "^11.1.0",
|
||||
"glob": "^11.1.0",
|
||||
"globals": "^16.4.0",
|
||||
"gulp": "^5.0.1",
|
||||
"gulp-autoprefixer": "^9.0.0",
|
||||
"gulp-eslint": "^6.0.0",
|
||||
"gulp-eslint-new": "^2.4.0",
|
||||
"gulp-header": "^2.0.9",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-rename": "^2.1.0",
|
||||
"main.css": "3.0.0",
|
||||
"mocha": "^11.5.0",
|
||||
"prettier": "3.5.3",
|
||||
"strip-json-comments": "^5.0.2"
|
||||
"mocha": "^11.7.2",
|
||||
"prettier": "3.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
"build": "webpack --config webpack.config.prod.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^13.0.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"webpack": "^5.99.9",
|
||||
"copy-webpack-plugin": "^13.0.1",
|
||||
"html-webpack-plugin": "^5.6.4",
|
||||
"webpack": "^5.101.3",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.1",
|
||||
"webpack-dev-server": "^5.2.2",
|
||||
"webpack-merge": "^6.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user