From 4d54b90c0e6a6c7a18b3cb8e8dea1d4ba7b8e487 Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Wed, 18 Sep 2019 07:32:17 +0900 Subject: [PATCH] Refactor: directory structure (#31) * config: update version * refactor: move source codes to lib directory, Close #30 * refactor: move test code --- index.test.js => __tests__/index.test.js | 0 action.yml | 2 +- get-latest-version.js => lib/get-latest-version.js | 0 index.js => lib/index.js | 0 package.json | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename index.test.js => __tests__/index.test.js (100%) rename get-latest-version.js => lib/get-latest-version.js (100%) rename index.js => lib/index.js (100%) diff --git a/index.test.js b/__tests__/index.test.js similarity index 100% rename from index.test.js rename to __tests__/index.test.js diff --git a/action.yml b/action.yml index e53ca4f..5a09dd1 100644 --- a/action.yml +++ b/action.yml @@ -12,7 +12,7 @@ inputs: default: 'false' runs: using: 'node12' - main: 'index.js' + main: 'lib/index.js' branding: icon: 'package' color: 'yellow' diff --git a/get-latest-version.js b/lib/get-latest-version.js similarity index 100% rename from get-latest-version.js rename to lib/get-latest-version.js diff --git a/index.js b/lib/index.js similarity index 100% rename from index.js rename to lib/index.js diff --git a/package.json b/package.json index 64bf7dc..452cdc2 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "hugo-action", "version": "2.1.0", "description": "Hugo setup action", - "main": "index.js", + "main": "lib/index.js", "scripts": { - "lint": "eslint ./index.js ./get-latest-version.js", + "lint": "eslint ./lib/**/*", "test": "jest", "build": "npm prune --production" },