Skip to content

Commit

Permalink
Set up Node environment
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjrw committed Feb 23, 2022
1 parent 932e98a commit 4dcdd1b
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parserOptions": {
"ecmaVersion": 11,
"parser": "@typescript-eslint/parser",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"plugins": ["@typescript-eslint"]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
package-lock.json
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
8 changes: 3 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ branding:
color: yellow

inputs:

preview-branch:
description: >
Branch on which the previews will be deployed. This should be the
Expand All @@ -20,7 +19,7 @@ inputs:
description: >
Name of the directory containing all previews. All previews will be
created inside this directory.
The umbrella directory is used to namespace previews from your main
branch's deployment on GitHub Pages.
Expand Down Expand Up @@ -61,6 +60,5 @@ inputs:
default: auto

runs:
using: composite
steps:

using: node16
main: dist/main.js
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "pr-preview",
"version": "0.0.0",
"main": "dist/main.js",
"scripts": {},
"devDependencies": {
"@types/node": "^17.0.19",
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
"eslint": "^8.9.0",
"prettier": "2.5.1",
"typescript": "^4.5.5"
},
"dependencies": {
"@actions/core": "^1.6.0",
"@actions/github": "^5.0.0",
"@jamesives/github-pages-deploy-action": "^4.2.5"
}
}
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"outDir": "./dist/",
"strict": true,
"module": "CommonJS"
},
"include": ["src/**/*.ts"]
}

0 comments on commit 4dcdd1b

Please sign in to comment.