gtfs-to-chart 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,10 +4,25 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## [2.0.4] - 2022-11-09
8
8
  ### Updated
9
9
  - Dependency updates
10
10
 
11
+ ### Fixed
12
+ - Fixed charts path in generated charts HTML
13
+
14
+ ## [2.0.3] - 2022-06-25
15
+ ### Updated
16
+ - Dependency updates
17
+
18
+ ### Fixed
19
+ - Fixed charts path in generated index.html
20
+
21
+ ## [2.0.2] - 2022-06-25
22
+ ### Updated
23
+ - Dependency updates
24
+ - Readme udpates
25
+
11
26
  ## [2.0.1] - 2021-08-17
12
27
  ### Updated
13
28
  - Dependency updates
@@ -17,4 +32,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
32
 
18
33
  ## [2.0.0] - 2021-05-14
19
34
  ### Breaking Changes
20
- - Converted to ES6 Module
35
+ - Converted to ES6 Module
package/README.md CHANGED
@@ -9,7 +9,6 @@
9
9
  <br /><br />
10
10
  <a href="https://www.npmjs.com/package/gtfs-to-chart" rel="nofollow"><img src="https://img.shields.io/npm/v/gtfs-to-chart.svg?style=flat" style="max-width: 100%;"></a>
11
11
  <a href="https://www.npmjs.com/package/gtfs-to-chart" rel="nofollow"><img src="https://img.shields.io/npm/dm/gtfs-to-chart.svg?style=flat" style="max-width: 100%;"></a>
12
- <a href="https://github.com/BlinkTagInc/gtfs-to-chart/actions?query=workflow%3A%22Node+CI%22"><img src="https://img.shields.io/github/workflow/status/BlinkTagInc/gtfs-to-chart/Node%20CI.svg" alt="CircleCI" style="max-width: 100%;"></a>
13
12
  <img src="https://img.shields.io/badge/License-MIT-yellow.svg">
14
13
  <br /><br />
15
14
  Generate stringline charts from GTFS transit data.
@@ -100,7 +99,7 @@ All files starting with `config*.json` are .gitignored - so you can create multi
100
99
  | ------ | ---- | ----------- |
101
100
  | [`agencies`](#agencies) | array | An array of GTFS files to be imported. |
102
101
  | [`beautify`](#beautify) | boolean | Whether or not to beautify the HTML output. |
103
- | [`chartDate`](#templatepath) | string | The date to use for generating the stringline chart. |
102
+ | [`chartDate`](#chartdate) | string | The date to use for generating the stringline chart. |
104
103
  | [`templatePath`](#templatepath) | string | Path to custom pug template for rendering chart html. |
105
104
 
106
105
  ### agencies
package/lib/file-utils.js CHANGED
@@ -27,6 +27,7 @@ export async function prepDirectory(exportPath) {
27
27
  const staticAssetPath = path.join(fileURLToPath(import.meta.url), '../../public');
28
28
  await rm(exportPath, { recursive: true, force: true });
29
29
  await mkdir(exportPath, { recursive: true });
30
+ await mkdir(path.join(exportPath, 'charts'), { recursive: true });
30
31
  await copy(path.join(staticAssetPath, 'css'), path.join(exportPath, 'css'));
31
32
  await copy(path.join(staticAssetPath, 'js'), path.join(exportPath, 'js'));
32
33
  }
@@ -50,7 +50,7 @@ const gtfsToChart = async initialConfig => {
50
50
 
51
51
  // Make directory if it doesn't exist
52
52
  await mkdir(exportPath, { recursive: true });
53
- config.assetPath = '';
53
+ config.assetPath = '../';
54
54
 
55
55
  /* eslint-disable no-await-in-loop */
56
56
  for (const route of routes) {
@@ -58,7 +58,7 @@ const gtfsToChart = async initialConfig => {
58
58
 
59
59
  try {
60
60
  const html = await generateChartHTML(config, route.route_id);
61
- const htmlPath = path.join(exportPath, sanitize(`${formatRouteName(route)}.html`));
61
+ const htmlPath = path.join(exportPath, 'charts', sanitize(`${formatRouteName(route)}.html`));
62
62
  await writeFile(htmlPath, html);
63
63
  } catch (error) {
64
64
  config.logWarning(error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-to-chart",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "private": false,
5
5
  "description": "Generate stringline charts of a transit routes from GTFS",
6
6
  "keywords": [
@@ -44,13 +44,13 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "better-copy": "^1.0.4",
47
- "chalk": "^5.0.1",
47
+ "chalk": "^5.1.2",
48
48
  "connect-slashes": "^1.4.0",
49
- "express": "^4.18.1",
50
- "gtfs": "^3.3.1",
51
- "js-beautify": "^1.14.4",
49
+ "express": "^4.18.2",
50
+ "gtfs": "^3.6.1",
51
+ "js-beautify": "^1.14.7",
52
52
  "lodash-es": "^4.17.21",
53
- "moment": "^2.29.3",
53
+ "moment": "^2.29.4",
54
54
  "morgan": "^1.10.0",
55
55
  "progress": "^2.0.3",
56
56
  "pug": "^3.0.2",
@@ -59,13 +59,22 @@
59
59
  "sqlstring": "^2.3.3",
60
60
  "timer-machine": "^1.1.0",
61
61
  "untildify": "^4.0.0",
62
- "yargs": "^17.5.1"
62
+ "yargs": "^17.6.2"
63
63
  },
64
64
  "devDependencies": {
65
- "xo": "^0.50.0"
65
+ "xo": "^0.52.4"
66
66
  },
67
67
  "engines": {
68
68
  "node": ">= 14.x"
69
69
  },
70
- "false": {}
70
+ "release-it": {
71
+ "github": {
72
+ "release": true
73
+ },
74
+ "plugins": {
75
+ "@release-it/keep-a-changelog": {
76
+ "filename": "CHANGELOG.md"
77
+ }
78
+ }
79
+ }
71
80
  }