From 5c3538806207c8fa8d4e152c66fb5d9e4c0320c3 Mon Sep 17 00:00:00 2001 From: loloToster Date: Thu, 20 Jan 2022 09:11:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20moved=20code=20to=20src=20direct?= =?UTF-8?q?ory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/air-pollution.js | 2 +- examples/daily-example.js | 2 +- examples/historical-data.js | 2 +- examples/simple.js | 2 +- examples/using-mergeWeathers.js | 2 +- examples/using-options.js | 2 +- package.json | 2 +- index.js => src/index.js | 0 {models => src/models}/airpollution-model.js | 0 {models => src/models}/weather-model.js | 0 {parsers => src/parsers}/air-pollution/list-parser.js | 0 {parsers => src/parsers}/air-pollution/single-parser.js | 0 {parsers => src/parsers}/weather/current-parser.js | 0 {parsers => src/parsers}/weather/daily-parser.js | 0 {parsers => src/parsers}/weather/hourly-parser.js | 0 {parsers => src/parsers}/weather/minutely-parser.js | 0 test/errors_test.js | 2 +- test/getter_test.js | 2 +- test/uncategorized_test.js | 2 +- tsconfig.json | 4 +--- 20 files changed, 11 insertions(+), 13 deletions(-) rename index.js => src/index.js (100%) rename {models => src/models}/airpollution-model.js (100%) rename {models => src/models}/weather-model.js (100%) rename {parsers => src/parsers}/air-pollution/list-parser.js (100%) rename {parsers => src/parsers}/air-pollution/single-parser.js (100%) rename {parsers => src/parsers}/weather/current-parser.js (100%) rename {parsers => src/parsers}/weather/daily-parser.js (100%) rename {parsers => src/parsers}/weather/hourly-parser.js (100%) rename {parsers => src/parsers}/weather/minutely-parser.js (100%) diff --git a/examples/air-pollution.js b/examples/air-pollution.js index e6e1c8a..419ab4c 100644 --- a/examples/air-pollution.js +++ b/examples/air-pollution.js @@ -1,4 +1,4 @@ -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") const location = "Paris" diff --git a/examples/daily-example.js b/examples/daily-example.js index d8af310..ea61a70 100644 --- a/examples/daily-example.js +++ b/examples/daily-example.js @@ -1,4 +1,4 @@ -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // Set global key, location and units let weather = new OpenWeatherAPI({ diff --git a/examples/historical-data.js b/examples/historical-data.js index bb37e9a..56162d1 100644 --- a/examples/historical-data.js +++ b/examples/historical-data.js @@ -1,4 +1,4 @@ -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // Set global key, location and units let weather = new OpenWeatherAPI({ diff --git a/examples/simple.js b/examples/simple.js index 867039d..68f6eca 100644 --- a/examples/simple.js +++ b/examples/simple.js @@ -1,4 +1,4 @@ -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // Set global key, location and units let weather = new OpenWeatherAPI({ diff --git a/examples/using-mergeWeathers.js b/examples/using-mergeWeathers.js index 9d6fd1b..c30d92e 100644 --- a/examples/using-mergeWeathers.js +++ b/examples/using-mergeWeathers.js @@ -1,4 +1,4 @@ -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // Set global key, location and units let weather = new OpenWeatherAPI({ diff --git a/examples/using-options.js b/examples/using-options.js index fa317bb..976ae21 100644 --- a/examples/using-options.js +++ b/examples/using-options.js @@ -1,4 +1,4 @@ -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // Set global key, location and units let weather = new OpenWeatherAPI({ diff --git a/package.json b/package.json index 89ccf72..2b577e5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "openweather-api-node", "version": "1.3.2", "description": "Simple Node.js package that makes it easy to work with OpenWeather API", - "main": "index.js", + "main": "src/index.js", "scripts": { "test": "mocha" }, diff --git a/index.js b/src/index.js similarity index 100% rename from index.js rename to src/index.js diff --git a/models/airpollution-model.js b/src/models/airpollution-model.js similarity index 100% rename from models/airpollution-model.js rename to src/models/airpollution-model.js diff --git a/models/weather-model.js b/src/models/weather-model.js similarity index 100% rename from models/weather-model.js rename to src/models/weather-model.js diff --git a/parsers/air-pollution/list-parser.js b/src/parsers/air-pollution/list-parser.js similarity index 100% rename from parsers/air-pollution/list-parser.js rename to src/parsers/air-pollution/list-parser.js diff --git a/parsers/air-pollution/single-parser.js b/src/parsers/air-pollution/single-parser.js similarity index 100% rename from parsers/air-pollution/single-parser.js rename to src/parsers/air-pollution/single-parser.js diff --git a/parsers/weather/current-parser.js b/src/parsers/weather/current-parser.js similarity index 100% rename from parsers/weather/current-parser.js rename to src/parsers/weather/current-parser.js diff --git a/parsers/weather/daily-parser.js b/src/parsers/weather/daily-parser.js similarity index 100% rename from parsers/weather/daily-parser.js rename to src/parsers/weather/daily-parser.js diff --git a/parsers/weather/hourly-parser.js b/src/parsers/weather/hourly-parser.js similarity index 100% rename from parsers/weather/hourly-parser.js rename to src/parsers/weather/hourly-parser.js diff --git a/parsers/weather/minutely-parser.js b/src/parsers/weather/minutely-parser.js similarity index 100% rename from parsers/weather/minutely-parser.js rename to src/parsers/weather/minutely-parser.js diff --git a/test/errors_test.js b/test/errors_test.js index 2fadd05..c588819 100644 --- a/test/errors_test.js +++ b/test/errors_test.js @@ -1,6 +1,6 @@ const fs = require("fs") const assert = require("assert") -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // ! Remeber to specify key in key.txt file let key = fs.readFileSync("./test/key.txt").toString().trim() diff --git a/test/getter_test.js b/test/getter_test.js index 32c0ee1..d3fba8d 100644 --- a/test/getter_test.js +++ b/test/getter_test.js @@ -1,6 +1,6 @@ const fs = require("fs") const assert = require("assert") -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // ! Remeber to specify key in key.txt file let key = fs.readFileSync("./test/key.txt").toString().trim() diff --git a/test/uncategorized_test.js b/test/uncategorized_test.js index 549eb12..cbfabf8 100644 --- a/test/uncategorized_test.js +++ b/test/uncategorized_test.js @@ -1,6 +1,6 @@ const fs = require("fs") const assert = require("assert") -const OpenWeatherAPI = require("../index") +const OpenWeatherAPI = require("..") // ! Remeber to specify key in key.txt file let key = fs.readFileSync("./test/key.txt").toString().trim() diff --git a/tsconfig.json b/tsconfig.json index 975cb42..3fbd645 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,6 @@ { "include": [ - "index.js", - "models", - "parsers" + "src/**/*" ], "compilerOptions": { "target": "ES6",