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

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
amarjanica committed Oct 11, 2024
1 parent 11e8518 commit 3bc5243
Show file tree
Hide file tree
Showing 54 changed files with 7,503 additions and 19,811 deletions.
25 changes: 0 additions & 25 deletions .cspell.json

This file was deleted.

28 changes: 16 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# editorconfig.org

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.md]
trim_trailing_whitespace = false

[*.mdx]
trim_trailing_whitespace = false
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.js

This file was deleted.

5 changes: 0 additions & 5 deletions .gitattributes

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Continuous Integration
on:
workflow_dispatch:
push:

jobs:
test-and-build:
runs-on: ubuntu-latest
name: Test and build loader
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm ci
- run: npm run lint
- run: npm run security
- name: Build loader
run: npm run build
- name: Test
run: npm test
109 changes: 0 additions & 109 deletions .github/workflows/nodejs.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.release.outputs.tag_name}}
release_created: ${{ steps.release.outputs.release_created}}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Print release outputs for debugging
continue-on-error: true
run: |
echo "Release outputs:"
echo "${{ toJson(steps.release.outputs) }}"
release-loader:
if: ${{needs.release-please.outputs.release_created}}
runs-on: ubuntu-latest
needs: release-please
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm ci
- run: npm test
- run: npm run build
- run: zip -r nextjsnodeloader.zip dist
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} nextjsnodeloader.zip
- run: npm publish
env:
NPM_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
38 changes: 19 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
logs
*.log
npm-debug.log*
.eslintcache
/coverage
/dist
/local
/reports
node_modules
.DS_Store
Thumbs.db
.idea
.vscode
*.sublime-project
*.sublime-workspace
*.iml
test/fixtures/example/build
test/fixtures/example/node_modules
.next
logs
*.log
npm-debug.log*
.eslintcache
/coverage
/dist
/local
/reports
node_modules
.DS_Store
Thumbs.db
.idea
.vscode
*.sublime-project
*.sublime-workspace
*.iml
test/example/build
test/example/node_modules
.next
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"bracketSameLine": true,
"trailingComma": "es5",
"singleAttributePerLine": true
}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.1.5"
}
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ module.exports = (api) => {
return {
presets: [
[
"@babel/preset-env",
'@babel/preset-env',
{
targets: {
node: "10.13.0",
node: '10.13.0',
},
},
],
Expand Down
26 changes: 26 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import prettier from "eslint-plugin-prettier";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["coverage", "dist", "node_modules", "test/fixtures", "examples", "eslint.config.mjs"],
}, ...compat.extends("@webpack-contrib/eslint-config-webpack", "prettier"), {
plugins: {
prettier,
},

rules: {
"eslint-comments/no-unlimited-disable": 0,
"prettier/prettier": ["error"],
},
}];
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
}
{
"extends": "next/core-web-vitals"
}
Loading

0 comments on commit 3bc5243

Please sign in to comment.