diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..af30937 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +dist/** -diff linguist-generated=true diff --git a/.gitignore b/.gitignore index c6bba59..e17f86f 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,7 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* + +# Ignore built ts files +__tests__/runner/* +lib/**/* \ No newline at end of file diff --git a/package.json b/package.json index 3137452..c5cbaec 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,16 @@ { "name": "install-nextflow-action", "version": "1.2.0", - "main": "dist/index.js", "description": "An action to install Nextflow into a GitHub Actions workflow and make it available for subsequent steps.", + "main": "lib/main.js", "scripts": { + "build": "tsc", "format": "prettier --write '**/*.ts'", "format-check": "prettier --check '**/*.ts'", "lint": "eslint src/**/*.ts", + "package": "ncc build --source-map --license LICENSE", "test": "echo \"Error: no test specified\" && exit 1", - "build": "ncc build index.ts --license LICENSE" + "all": "npm run build && npm run format && npm run lint && npm run package && npm test" }, "repository": { "type": "git", diff --git a/index.ts b/src/main.ts similarity index 100% rename from index.ts rename to src/main.ts diff --git a/tsconfig.json b/tsconfig.json index 6beeab9..f6cda4f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,11 @@ "compilerOptions": { "target": "es6", "module": "commonjs", + "outDir": "./lib", + "rootDir": "./src", "strict": true, "noImplicitAny": false, "esModuleInterop": true - } + }, + "exclude": ["node_modules", "**/*.test.ts"] }