@data-visuals/create 6.2.2 → 7.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-visuals/create",
3
- "version": "6.2.2",
3
+ "version": "7.1.2",
4
4
  "description": "Create graphics and features the Data Visuals way.",
5
5
  "scripts": {
6
6
  "build:docs": "doctoc README.md --github",
@@ -130,8 +130,10 @@
130
130
  font-weight: $font-weight-bold;
131
131
  font-size: 1.4rem;
132
132
  line-height: $line-height-subtitle;
133
- margin-top: 1em;
134
- margin-bottom: 1em;
133
+ margin-bottom: 1em; // Ensures spacing below the <p> syncs up with font-size
134
+ margin-left: auto; // Centers <p> tag within max-width
135
+ margin-right: auto; // Centers <p> tag within max-width
136
+ margin-top: 1em; // Ensures spacing above the <p> syncs up with font-size
135
137
  max-width: 27em;
136
138
 
137
139
  @include mq($from: m) {
@@ -122,7 +122,6 @@ const parseGraphic = async (
122
122
  lastBuildTime,
123
123
  folder,
124
124
  id,
125
- tags,
126
125
  parserOptions,
127
126
  } = config;
128
127
 
@@ -157,6 +156,7 @@ const parseGraphic = async (
157
156
  const altText = await getText({ key: 'alt-text', page });
158
157
  const note = await getText({ key: 'note', page });
159
158
  const source = await getText({ key: 'source', page });
159
+ const tags = await (await getText({ key: 'tags', page })).split(',');
160
160
  let credits = await getText({ key: 'credit', page });
161
161
 
162
162
  // ignore graphics with no title
@@ -228,11 +228,16 @@ const parseGraphic = async (
228
228
  };
229
229
 
230
230
  module.exports = async localURL => {
231
+ const {
232
+ parserOptions,
233
+ } = config;
234
+
231
235
  // find all html pages in project
232
236
  const pages = await glob('**/*.html', {
233
237
  absolute: true,
234
238
  cwd: './.tmp',
235
239
  recursive: true,
240
+ ignore: parserOptions.metadataIgnore,
236
241
  });
237
242
 
238
243
  // spin up headless browser using local chrome
@@ -0,0 +1,67 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7
+ <title>The Texas Tribune</title>
8
+ <base target='_parent'>
9
+
10
+ {% if graphicTitle %}
11
+ <meta name="tt-graphic-title" content="{{ graphicTitle }}" />
12
+ {% endif %}
13
+ {% if graphicAltText %}
14
+ <meta name="tt-graphic-alt-text" content="{{ graphicAltText }}" />
15
+ {% endif %}
16
+ {% if graphicCaption %}
17
+ <meta name="tt-graphic-caption" content="{{ graphicCaption }}" />
18
+ {% endif %}
19
+ {% if graphicNote %}
20
+ <meta name="tt-graphic-note" content="{{ graphicNote }}" />
21
+ {% endif %}
22
+ {% if graphicSource %}
23
+ <meta name="tt-graphic-source" content="{{ graphicSource }}" />
24
+ {% endif %}
25
+ {% if graphicCredit %}
26
+ <meta name="tt-graphic-credit" content="{{ graphicCredit }}" />
27
+ {% endif %}
28
+ {% if graphicTags %}
29
+ <meta name="tt-graphic-tags" content="{{ graphicTags or 'subject-politics' }}" />
30
+ {% endif %}
31
+
32
+ <link rel="dns-prefetch" href="https://www.google-analytics.com">
33
+ <link rel="dns-prefetch" href="https://fonts.googleapis.com">
34
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
35
+
36
+ <!-- Start fonts -->
37
+ <script>
38
+ window.WebFontConfig = {
39
+ google: { families: ['Open Sans:300,400,700'] },
40
+ timeout: 10000,
41
+ };
42
+ </script>
43
+ <script async src="https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
44
+ <!-- End fonts -->
45
+ <link rel="stylesheet" href="{{ static('styles/main.css') }}">
46
+
47
+ {% if jsPackName %}
48
+ {% block head_scripts %}
49
+ {{ javascriptPack(jsPackName, { mjs: true }) }}
50
+ {% endblock head_scripts %}
51
+ {% endif %}
52
+ </head>
53
+ <body>
54
+
55
+ {% block content %}{% endblock content %}
56
+
57
+ {% block inline_data %}{% endblock inline_data %}
58
+
59
+ {% include 'includes/nomodule-shim.html' %}
60
+
61
+ {% if jsPackName %}
62
+ {% block scripts %}
63
+ {{ javascriptPack(jsPackName) }}
64
+ {% endblock scripts %}
65
+ {% endif %}
66
+ </body>
67
+ </html>
@@ -7,9 +7,9 @@
7
7
  <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/about/">About Us</a></li>
8
8
  <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/contact/">Contact Us</a></li>
9
9
  <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/support-us/donors-and-members/">Who Funds Us?</a></li>
10
- <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/terms-of-service/">Terms of Service</a></li>
11
- <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/ethics/">Code of Ethics</a></li>
12
- <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/privacy/">Privacy Policy</a></li>
10
+ <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/about/terms-of-service/">Terms of Service</a></li>
11
+ <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/about/ethics/">Code of Ethics</a></li>
12
+ <li class="footer-nav-item"><a class="footer-link" href="http://www.texastribune.org/about/privacy-policy/">Privacy Policy</a></li>
13
13
  <li class="footer-nav-item"><a class="footer-link footer-link-donate" href="https://support.texastribune.org/">Donate</a></li>
14
14
  </ul>
15
15
  </div>
@@ -0,0 +1,47 @@
1
+ {# Template for any scripted graphics, i.e. D3 charts #}
2
+ {% extends 'base-graphic.html' %}
3
+ {% from 'macros/prose.html' import prose %}
4
+
5
+ {# set pack that provides JS #}
6
+ {% set jsPackName = 'main' %}
7
+
8
+ {# data.text --> data/text.json #}
9
+ {% set context = data.text %}
10
+
11
+ {# data.data --> data/data.json #}
12
+ {% set graphicData = data.data %}
13
+
14
+ {# graphicAltText is used by the CMS for accessibility #}
15
+ {% set graphicAltText = context.alttext %}
16
+
17
+ {# graphics will be surfaced in the graphics plugin under these tags #}
18
+ {% set graphicTags = context.guten_tags %}
19
+
20
+ {% block content %}
21
+ {# data-graphic signifies that this can be embedded in the CMS #}
22
+ <div class="app" data-graphic>
23
+ {# data-title is used to grab the title in the CMS #}
24
+ <h1 class="graphic-title" data-title>{{ context.headline | widont }}</h1>
25
+ {# data-caption is used to grab the caption in the CMS #}
26
+ <span data-caption>{{ prose(context.graphic_prose, context, graphicData) }}</span>
27
+
28
+ {# container that JS is attached to #}
29
+ <div id="graphic" class="graphic"></div>
30
+
31
+ {# data-source, data-credit, and data-note are also used in the CMS #}
32
+ <ul class="graphic-footer">
33
+ {% if context.note %}<li data-note>Note: {{ context.note }}</li>{% endif %}
34
+ {% if context.source %}<li data-source>Source: {{ context.source }}</li>{% endif %}
35
+ {% if context.credit %}<li data-credit>Credit: {{ context.credit }}</li>{% endif %}
36
+ </ul>
37
+ </div>
38
+ {% endblock content %}
39
+
40
+ {# set data/data.json as a window variable #}
41
+ {% block inline_data %}
42
+ {% if data.data %}
43
+ <script>
44
+ window.DATA = {{ data.data|dump }};
45
+ </script>
46
+ {% endif %}
47
+ {% endblock inline_data %}
@@ -106,4 +106,27 @@ module.exports = {
106
106
  *
107
107
  */
108
108
  customFilters: {},
109
+ /**
110
+ * Where custom settings for parsing graphics can be added.
111
+ *
112
+ * metadataIgnore
113
+ * Add paths here that you do not want parsed for metadata and shown
114
+ * in the graphics plugin in the CMS.
115
+ *
116
+ * appleNewsIgnore
117
+ * Some graphics are too dynamic to be accurately captured in a screenshot.
118
+ * Those graphics shouldn't be considered for platforms like Apple News.
119
+ *
120
+ * Paths for metadataIgnore and appleNewsIgnore are relative to the build folders.
121
+ * Example:
122
+ * appleNewsIgnore: [
123
+ * 'complex-graphic-folder/index.html',
124
+ * 'some-other-folder',
125
+ * ],
126
+ *
127
+ */
128
+ parserOptions: {
129
+ metadataIgnore: [],
130
+ appleNewsIgnore: [],
131
+ },
109
132
  };
@@ -14,31 +14,25 @@
14
14
  {# graphicAltText is used by the CMS for accessibility #}
15
15
  {% set graphicAltText = context.alttext %}
16
16
 
17
- {% block content %}
18
- {# data-graphic signifies that this can be embedded in the CMS #}
19
- <div class="app" data-graphic>
20
- {# data-title is used to grab the title in the CMS #}
21
- <h1 class="graphic-title" data-title>{{ context.headline | widont }}</h1>
22
- {# data-caption is used to grab the caption in the CMS #}
23
- <span data-caption>{{ prose(context.prose, context, graphicData) }}</span>
24
-
25
- {# container that JS is attached to #}
26
- <div id="graphic" class="graphic"></div>
17
+ {# graphics will be surfaced in the graphics plugin under these tags #}
18
+ {% set graphicTags = context.guten_tags %}
27
19
 
28
- {# data-source, data-credit, and data-note are also used in the CMS #}
29
- <ul class="graphic-footer">
30
- {% if context.note %}<li data-note>Note: {{ context.note }}</li>{% endif %}
31
- {% if context.source %}<li data-source>Source: {{ context.source }}</li>{% endif %}
32
- {% if context.credit %}<li data-credit>Credit: {{ context.credit }}</li>{% endif %}
33
- </ul>
20
+ {% block content %}
21
+ <div class="app">
22
+ <h1 class="article-subheader">Welcome to The Texas Tribune's data visuals graphics kit!</h1>
23
+ <p class="copy">
24
+ Start creating graphics by copying <span class="font-weight-bold">graphic.html</span> and/or
25
+ <span class="font-weight-bold">graphic-static.html</span>, both located in the <span class="font-weight-bold">templates/</span>
26
+ folder, and pasting it in the <span class="font-weight-bold">app/</span> folder at the top level. You can make as many graphics as you need.
27
+ Feel free to rename the files!
28
+ </p>
29
+ <p class="copy"><span class="font-weight-bold">graphic.html</span> is set up for graphics involving JavaScript</p>
30
+ <p class="copy"><span class="font-weight-bold">graphic-static.html</span> is set up for static graphics (HTML tables, Adobe Illustrator graphics)</p>
31
+ <p class="copy">All of our graphics are set up to fetch text and other attributes from a Google Doc.
32
+ <a href="https://docs.google.com/document/d/1BKQy7bsteC7Od5Jgzt_PX8KRe0pD2Ba1LXEj02uWf4I/edit">Here's the template for that</a>.
33
+ You'll need to make a copy of this template and swap out the template's file ID with your copy's file ID in <span class="font-weight-bold">project.config.js</span>,
34
+ in the <span class="font-weight-bold">files</span> property. Then, run <span class="font-weight-bold">npm run data:fetch</span> and you'll see your text in the templates.</p>
35
+ <p class="copy">For more documentation on the kit, check out the <a href="https://github.com/texastribune/data-visuals-create">README</a> and our
36
+ <a href="https://github.com/texastribune/data-visuals-guides/blob/master/kit-setup.md#creating-a-feature-story">kit setup guide</a>.</p>
34
37
  </div>
35
38
  {% endblock content %}
36
-
37
- {# set data/data.json as a window variable #}
38
- {% block inline_data %}
39
- {% if data.data %}
40
- <script>
41
- window.DATA = {{ data.data|dump }};
42
- </script>
43
- {% endif %}
44
- {% endblock inline_data %}
@@ -25,6 +25,9 @@
25
25
  {% if graphicCredit %}
26
26
  <meta name="tt-graphic-credit" content="{{ graphicCredit }}" />
27
27
  {% endif %}
28
+ {% if graphicTags %}
29
+ <meta name="tt-graphic-tags" content="{{ graphicTags or 'subject-politics' }}" />
30
+ {% endif %}
28
31
 
29
32
  <link rel="dns-prefetch" href="https://www.google-analytics.com">
30
33
  <link rel="dns-prefetch" href="https://fonts.googleapis.com">
@@ -40,9 +43,12 @@
40
43
  <script async src="https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
41
44
  <!-- End fonts -->
42
45
  <link rel="stylesheet" href="{{ static('styles/main.css') }}">
43
- {% block head_scripts %}
44
- {{ javascriptPack(jsPackName, { mjs: true }) }}
45
- {% endblock head_scripts %}
46
+
47
+ {% if jsPackName %}
48
+ {% block head_scripts %}
49
+ {{ javascriptPack(jsPackName, { mjs: true }) }}
50
+ {% endblock head_scripts %}
51
+ {% endif %}
46
52
  </head>
47
53
  <body>
48
54
 
@@ -52,8 +58,10 @@
52
58
 
53
59
  {% include 'includes/nomodule-shim.html' %}
54
60
 
55
- {% block scripts %}
56
- {{ javascriptPack(jsPackName) }}
57
- {% endblock scripts %}
61
+ {% if jsPackName %}
62
+ {% block scripts %}
63
+ {{ javascriptPack(jsPackName) }}
64
+ {% endblock scripts %}
65
+ {% endif %}
58
66
  </body>
59
67
  </html>
@@ -20,6 +20,8 @@
20
20
  {% set graphicNote = context.note %}
21
21
  {% set graphicSource = context.source %}
22
22
  {% set graphicCredit = context.credit %}
23
+ {# graphics will be surfaced in the graphics plugin under these tags #}
24
+ {% set graphicTags = context.guten_tags %}
23
25
 
24
26
  {% block content %}
25
27
  {# data-graphic signifies that this can be embedded in the CMS #}
@@ -0,0 +1,44 @@
1
+ {# Template for any scripted graphics, i.e. D3 charts #}
2
+ {% extends 'base.html' %}
3
+ {% from 'macros/prose.html' import prose %}
4
+
5
+ {# set pack that provides JS #}
6
+ {% set jsPackName = 'main' %}
7
+
8
+ {# data.text --> data/text.json #}
9
+ {% set context = data.text %}
10
+
11
+ {# data.data --> data/data.json #}
12
+ {% set graphicData = data.data %}
13
+
14
+ {# graphicAltText is used by the CMS for accessibility #}
15
+ {% set graphicAltText = context.alttext %}
16
+
17
+ {% block content %}
18
+ {# data-graphic signifies that this can be embedded in the CMS #}
19
+ <div class="app" data-graphic>
20
+ {# data-title is used to grab the title in the CMS #}
21
+ <h1 class="graphic-title" data-title>{{ context.headline | widont }}</h1>
22
+ {# data-caption is used to grab the caption in the CMS #}
23
+ <span data-caption>{{ prose(context.prose, context, graphicData) }}</span>
24
+
25
+ {# container that JS is attached to #}
26
+ <div id="graphic" class="graphic"></div>
27
+
28
+ {# data-source, data-credit, and data-note are also used in the CMS #}
29
+ <ul class="graphic-footer">
30
+ {% if context.note %}<li data-note>Note: {{ context.note }}</li>{% endif %}
31
+ {% if context.source %}<li data-source>Source: {{ context.source }}</li>{% endif %}
32
+ {% if context.credit %}<li data-credit>Credit: {{ context.credit }}</li>{% endif %}
33
+ </ul>
34
+ </div>
35
+ {% endblock content %}
36
+
37
+ {# set data/data.json as a window variable #}
38
+ {% block inline_data %}
39
+ {% if data.data %}
40
+ <script>
41
+ window.DATA = {{ data.data|dump }};
42
+ </script>
43
+ {% endif %}
44
+ {% endblock inline_data %}
@@ -72,6 +72,7 @@ Project config keys output in `manifest.json`
72
72
  - `id`
73
73
  - `tags`
74
74
  - `parserOptions`
75
+ - `metadataIgnore` - This is an array of files or folders that should not be parsed for metadata and displayed in the CMS graphics plugin. For example, any graphics or features created for testing but are not publishable should be added here.
75
76
  - `appleNewsIgnore` - This is an array of files or folders that should be flagged in the CMS as not compatible with Apple News. Use this for graphics that are too dynamic to be accurately captured in a screenshot.
76
77
 
77
78
  ### Sample `manifest.json` output
@@ -64,13 +64,6 @@ module.exports = {
64
64
  name: 'data',
65
65
  },
66
66
  ],
67
- /**
68
- * Tags that will be plugged in via the graphics plugin.
69
- * This an array of each tag's slug, not the tag names.
70
- * Refer to https://www.texastribune.org/admin/guten_tags/tag/ for our guten tag slugs.
71
- * YOU CAN CHANGE THESE.
72
- */
73
- tags: ['subject-politics'],
74
67
  /**
75
68
  * The dataMutators option makes it possible to modify what's returned by
76
69
  * the data fetchers. This is a good place to restructure the raw data, or
@@ -116,11 +109,15 @@ module.exports = {
116
109
  /**
117
110
  * Where custom settings for parsing graphics can be added.
118
111
  *
112
+ * metadataIgnore
113
+ * Add paths here that you do not want parsed for metadata and shown
114
+ * in the graphics plugin in the CMS.
115
+ *
119
116
  * appleNewsIgnore
120
117
  * Some graphics are too dynamic to be accurately captured in a screenshot.
121
118
  * Those graphics shouldn't be considered for platforms like Apple News.
122
- * Paths are relative to the build folders.
123
119
  *
120
+ * Paths for metadataIgnore and appleNewsIgnore are relative to the build folders.
124
121
  * Example:
125
122
  * appleNewsIgnore: [
126
123
  * 'complex-graphic-folder/index.html',
@@ -129,6 +126,7 @@ module.exports = {
129
126
  *
130
127
  */
131
128
  parserOptions: {
129
+ metadataIgnore: [],
132
130
  appleNewsIgnore: [],
133
131
  },
134
132
  };
package/CHANGELOG.md DELETED
@@ -1,323 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ## Unreleased
8
- ### Added
9
- ### Changed
10
- ### Removed
11
- ### Fixed
12
-
13
- ## [6.2.2] - 2021-09-15
14
- ### Fixed
15
- - `README.md` - updated kit `npx` command for making graphics and features with `@latest` for npm and npx versions >= 7.0.0
16
-
17
- ## [6.2.1] - 2021-09-15
18
- ### Fixed
19
- - `templates/__common__/_package.json` - downgrade `assets-webpack-plugin` to 6.1.2, v7.0.0 requires webpackv5.0.0 as a peer dependency
20
-
21
- ## [6.2.0] - 2021-09-09
22
- ### Changed
23
- - `templates/__common__/config/tasks/graphics-meta.js`, `templates/__common__/utils/deployment/update-log-sheet.js` - change `description` to `alttext`
24
- - `templates/graphic/app/index.html`, `templates/graphic/app/static.html`, `templates/graphic/app/templates/base.html` - change `description` to `alttext` in HTML templates
25
- - `templates/graphic/graphics-meta.md` - change `description` to `alttext` in documentation
26
-
27
- ## [6.1.0] - 2021-08-25
28
- ### Changed
29
- - `templates/__common__/utils/deployment/update-log-sheet.js` - swap out log sheet for [new one](https://docs.google.com/spreadsheets/d/1hCP5zGx8dNxk59gI9wBSFY2juJVM8OFCDY45VnNb2nI/edit#gid=965603489) with complete metadata columns
30
-
31
- ## [6.0.0] - 2021-08-12
32
- ### Changed
33
- - `templates/__common__/utils/deployment/update-log-sheet.js` - write more metadata from `manifest.json` to the log sheet
34
- - `templates/__common__/utils/deployment/update-readme.js` - add bullets to links pasted to README
35
- - `templates/graphic/app/index.html`, `templates/graphic/app/static.html` - get alt-text from our [graphic ArchieML template](https://docs.google.com/document/d/1BKQy7bsteC7Od5Jgzt_PX8KRe0pD2Ba1LXEj02uWf4I/edit)
36
-
37
- ## [5.0.1] - 2021-08-05
38
- ## Fixed
39
- - `_common_/app/styles/_functions.scss`, `_common_/app/styles/utilities/_embed.scss` - replace `/` with `math.div` to address Dart Sass warnings #94
40
-
41
- ## [5.0.0] - 2021-08-04
42
- ### Changed
43
- - `package.json`, `package-lock.json` - bump `assets-webpack-plugin`, `googleapis`, `imagemin`, `imagemin-gifsicle`, `imagemin-jpegtran`, `imagemin-optipng` packages (major version bumps for `imagemin-gifsicle`, `imagemin-jpegtran`, `imagemin-optipng` require Node.js v10)
44
-
45
- ## [4.0.2] - 2021-06-04
46
- ### Changed
47
- - `package.json`, `package-lock.json` - bump `np` and `doctoc` packages
48
-
49
- ## [4.0.1] - 2021-06-04
50
- ### Removed
51
- - `templates/feature/app/scripts/kickstart.js` - remove trending bar from our feature pages because it was getting in the way of other designs
52
-
53
- ## [4.0.0] - 2021-05-05
54
- ### Changed
55
- - `templates/__common__/config/scripts/build.js` - add script to update the `lastBuildTime` in `build.js`
56
- - `templates/__common__/config/tasks/graphics-meta.js` - add more keys to manifest.json output; simplify warning logs; ignore graphics with no title
57
- - `templates/__common__/config/utils.js` - add a `logMessage` function for console logging with colors
58
- - `templates/feature/project.config.js` - add `lastBuildTime` field to feature config, change `slug` to `projectName`, add comments to clarify which properties should and should not be changed
59
- - `templates/graphic/project.config.js` - add `lastBuildTime` field to graphic config, change `slug` to `projectName`, add comments to clarify which properties should and should not be changed; update default tag to `subject-politics`
60
- - `bin/data-visuals-create`, `README.md`, `templates/__common__/_package.json`, `templates/__common__/utils/deployment/update-log-sheet.js` - change `slug` to `projectName` to avoid confusion with the slug in our project URL and what we add to the CMS
61
- - `templates/graphic/app/index.html`, `templates/graphic/app/static.html`, `templates/graphic/app/templates/base.html` - add caption for graphic context and assume description is for accessibility
62
- - `templates/graphic/graphics-meta.md` - document the new caption field and rules
63
-
64
- ### Added
65
- - `templates/__common__/config/tasks/last-build-time.js` - add script to parse the config file, update the `lastBuildTime` and write the file back to the filepath
66
-
67
- ## [3.8.0] - 2021-04-20
68
- ### Changed
69
- - `templates/__common__/config/tasks/graphics-meta.js` - Adds a graphic note to the manifest file. Also now logs a warning to the terminal if you don't update the tags in the project config.
70
- - ` templates/graphic/app/index.html`,
71
- `templates/graphic/app/static.html`,
72
- ` templates/graphic/app/templates/base.html` - Adds all the proper template attributes to surface notes to the parsing task
73
- ` templates/graphic/graphics-meta.md` - Documents the new key
74
-
75
- ## [3.7.0] - 2021-03-16
76
- ### Changed
77
- - `templates/graphic/project.config.js` - Adds new key for adding customization to the parsing step. For now the only one there is one to ignore Apple News for specified files. Adds some placeholder tags to tag our graphics also. (Tags will be included in the graphic metadata.)
78
- - `templates/__common__/_package.json` - Adds puppeteer and a new `npm run parse` step. Add `npm run parse` to `npm run build` so the parse step runs automatically on deploy.
79
- - `templates/graphic/README.md` - Adds default Chrome install path, required in the parse step.
80
- - `templates/graphic/app/templates/base.html` - New meta tags on graphics to be used internally.
81
- - `templates/graphic/app/index.html`, `templates/graphic/app/static.html` - Add variables to set for graphic metadata, plus data attributes that allow the parser to pull metadata from existing HTML as a fallback.
82
-
83
- ### Added
84
- - ` templates/__common__/_.npmrc`- This tells puppeteer to skip downloading chrome each time we create a new project. Saves us some storage on our machines.
85
- - `templates/__common__/config/scripts/parse.js ` - Task runner that spins up a local server and kicks off the graphics-meta.js step.
86
- - `templates/__common__/config/tasks/graphics-meta.js `- The base for this whole process. At a high level, this will step through the whole project /dist folder and extract all the relevant metadata info we specify. This is also where we capture screenshots of graphics.
87
-
88
- How we generate graphic metadata is also documented in `templates/graphic/graphics-meta.md`.
89
-
90
- ## [3.6.0] - 2021-01-21
91
- ### Changed
92
- - `templates/feature/app/templates/includes/ldjson.html` - change some of our attributes in our structured data schema
93
-
94
- ## [3.5.0] - 2021-01-12
95
- ### Changed
96
- - `templates/__common__/utils/deployment/update-log-sheet.js` - change ID of the Google sheet to write our projects to
97
-
98
- ## [3.4.0] - 2020-12-22
99
- ### Changed
100
- - `package.json` - bump `np` to v7.0.0
101
- - `templates/feature/app/scripts/utils/ad-loader.js` - set correct ad tags for roofline and footer ads
102
- - `templates/feature/app/styles/main-queso.scss`, `templates/feature/app/styles/main.scss` - add chart and graphic CSS by default
103
- - `templates/feature/app/templates/macros/processors-queso.html`, `templates/feature/app/templates/macros/processors.html` - add option to ad to set it as a roofline or footer ad
104
- - `templates/feature/app/index.html`, `templates/feature/app/index-queso.html` - add footer option to ad to set ad tag
105
-
106
- ## [3.3.0] - 2020-11-19
107
- ### Changed
108
- - `templates/graphic/project.config.js`, `templates/feature/project.config.js` - comment the slug and folder variables (folder variable should be changed when the URL slug is changed)
109
- - `templates/feature/app/index-queso.html` - change `{{ context.title }}` to `{{ context.headline }}`, add HTML to include publish and update dates
110
- - `templates/feature/app/index.html`, `templates/feature/project.config.js`, `templates/graphic/app/index.html`, `templates/graphic/app/static.html` - change `{{ context.title }}` to `{{ context.headline }}`
111
- - `templates/feature/app/templates/components/simple-masthead.html`,
112
- `templates/feature/app/templates/includes/logo.html` - change 10th anniversary logo back to original TT logo
113
- - `templates/__common__/app/styles/_typography-queso.scss` - add t-subheader styling
114
-
115
- ### Added
116
- - `templates/__common__/app/templates/macros/prose-queso.html`, `templates/feature/app/templates/macros/processors-queso.html` - added prose and processors with queso styling
117
-
118
- ### Fixed
119
- - `templates/feature/app/index-queso.html`, `templates/feature/app/index.html` - add widont to headline
120
-
121
- ## [3.2.0] - 2020-09-15
122
- ### Changed
123
- - `templates/__common__/config/tasks/nunjucks.js` - added getAuthor() and getAuthorLink() to extract author name and author link for structured data schema
124
- - `templates/feature/app/templates/includes/ldjson.html` - add new structured data attributes
125
-
126
- ## [3.1.0] - 2020-09-02
127
- ### Added
128
- - `templates/feature/app/styles/components/_navbar.scss` - added masthead title to the nav bar component in the `index-queso.html` template
129
- - `templates/feature/app/templates/components/navbar.html` - added additional styling for the masthead title
130
-
131
- ### Fixed
132
- - `config/tasks/serve.js` - Adds an extra reload to refresh the page. When you first run npm run start there's a blip of no CSS while the CSS cleanup step runs. This will refresh again after that's finished so that console error referring to that missing CSS clears.
133
- - `config/tasks/unused-css.js` - Generalizes the gobbing pattern to capture more types of script files and in any folder. Previously CSS classes referenced in JS files weren't making it to the extra-minified CSS file, which is set up to only include classes used in the project.
134
-
135
- ## [3.0.0] - 2020-08-25
136
- ### Changed
137
- - `templates/feature/project.config.js` - change destination s3 bucket on deploy
138
-
139
- ### Fixed
140
- - `package-lock.json` - bump version of `np` package to resolve security vulnerability
141
-
142
- ## [2.8.1] - 2020-07-20
143
- ### Fixed
144
- - `package-lock.json` - bump lodash from 4.17.15 to 4.17.19
145
-
146
- ## [2.8.0] - 2020-07-20
147
- ### Added
148
- - `/feature/app/index-queso.html` - Starter template for queso CSS framework
149
- - `/feature/app/styles/main-queso.scss` - Starter styles for CSS framework
150
- - `/__common__/app/styles/_typography-queso.scss` - Extra typography styles not accounted for in queso-ui and data viz specific overrides of existing helpers. Appended `-queso` as to not be confused with current _typography.scss
151
- - `/feature/app/styles/components/_navbar.scss` - Overrides for queso navbar
152
- - `feature/app/styles/layout/_container.scss` - Additional container classes
153
- - `/feature/app/templates/components/navbar.html` - Standard navbar component (used on TT)
154
- - `/feature/app/templates/components/share.html` - Standard share component (used on TT)
155
- - `/feature/app/templates/includes/logo.html` - Standard logo include (used on TT)
156
-
157
- ### Changed
158
- - `_package.json` - Added queso dependency
159
- - `_variables.scss` - Added variables required for queso
160
- - `/feature/app/scripts/components/RelatedContent.js` and `/feature/app/scripts/components/Story.js` - Sprinkled in queso helpers (to be compatible in either starter template)
161
- - `/feature/app/styles/components/_ads.scss` - Updated teal to match TT site (it's a random darkened-teal for accessibility)
162
- - `/feature/app/styles/main.scss` - Removed sass-mq because it comes with the queso imports and added just the base queso variables and tools. This doesn't actually add any CSS so it's helpful if you ever want to include queso helpers in this file in your project.
163
- - `/feature/app/templates/base.html` - Added more blocks so that the queso starter template could vary in those parts. Example: Google fonts isn't needed in the queso started so we override that with an empty block.
164
-
165
- ## [2.7.2] - 2020-07-01
166
- ### Added
167
- - `templates/feature/app/scripts/packs/graphic.js` - add useful functions to JS for graphics (functions were already available in feature JS)
168
-
169
- ### Fixed
170
- - `templates/feature/app/templates/includes/ldjson.html` - check for `updated` or `update date` so the tracker shows up in search on updates, add `author` field
171
-
172
- ## [2.7.1] - 2020-07-01
173
- ### Added
174
- - `templates/__common__/app/styles/_typography.scss` - add styling for update date #44
175
-
176
- ### Changed
177
- - `templates/feature/app/index.html` - add HTML to handle update date and pub date #44
178
-
179
- ### Fixed
180
- - `templates/feature/app/scripts/utils/feeds.js` - switch v1 API urls to v2 API urls #6
181
- - `templates/feature/app/scripts/components/Story.js` - switch out properties to match v2 API urls #6
182
-
183
- ## [2.7.0] - 2020-07-01
184
- ### Added
185
- - `templates/__common__/config/tasks/templates.js` - add renderStringWithNunjucks() filter to process data variables pulled in from a Google Doc #46
186
- - `templates/graphic/app/templates/macros/processors.html`, `templates/feature/app/templates/macros/processors.html` - separate processors files for graphics and features, add renderStringWithNunjucks() filter to macros #46
187
-
188
- ### Changed
189
- - `templates/feature/app/index.html` - set featureData variable to store data
190
- - `templates/graphic/app/index.html`, `templates/graphic/app/static.html` - set graphicData variable to store data, render graphic prose with prose macro so we can add data variables
191
-
192
- ### Removed
193
- - `templates/__common__/app/templates/macros/processors.html` - remove common processors file
194
-
195
- ## [2.6.0] - 2020-05-08
196
- ### Added
197
- - `templates/__common__/config/tasks/unused-css.js` - A step that looks at the CSS file linked in any .html file, parses that CSS, and writes new CSS based only on what the HTML needs through the magic of this wonderful tool, [purgecss](https://github.com/FullHuman/purgecss)
198
-
199
- ### Changed
200
- - `templates/__common__/config/scripts/build.js` - This cleanup step will now run right after the HTML of the templates compile and before the file revving step
201
- - `templates/__common__/config/tasks/serve.js` - New watchers added mostly in the build output folder to re-run the CSS cleanup step after the build
202
- - `templates/__common__/_package.json` - Adds purgecss as a dev dependency
203
-
204
- ## [2.5.3] - 2020-04-21
205
- ### Added
206
- - `_variables.scss` - add elections color palette
207
- - `deploy.js` - add reminder to check social media for features and fetch the latest data
208
- - `README.md` - update feature README with more publication reminders
209
-
210
- ## [2.4.3] - 2020-02-11
211
- ### Fixed
212
- - `package.json` - removed `npm run assets:pull` from the `predeploy` command #39
213
-
214
- ## [2.4.2] - 2020-01-15
215
- ### Changed
216
- - `package.json` - pull assets and push to workspace on predeploy, which is run automatically before deploy #31
217
- - `feature/app/styles/components/_related-content.scss`, `feature/app/styles/components/_ads.scss`,
218
- `processors.html` - update appearance of ads
219
- - `graphic/README.md, feature/README.md` - added project launch checklist
220
-
221
- ## [2.4.1]
222
- ### Changed
223
- - `update-log-sheet.js` - change sheet to new 2020 data visuals work sheet
224
-
225
- ## [2.4.0]
226
- ### Added
227
- - `_polls.scss`, `_variables.scss`, `_graphic.scss`, `mixins/_grid.scss` — add styles needed for poll graphics
228
- - `templates.js`, `nunjucks.js` — add helpers needed for poll graphics
229
-
230
- ## [2.3.2] - 2019-11-26
231
- ### Changed
232
- - `graphic/app/scripts/embeds/frames.js` - don't pass debounced function to resize listener, simplify code #29
233
-
234
- ## [2.3.1] - 2019-11-15
235
- ### Fixed
236
- - `deploy.js` - add property to iframe sandbox so user can click to other pages #25
237
- - `project.config.js` - change default archieML doc to be the one we actually use #26
238
- - `update-log-sheet.js` - add year to repo name for `newsapps-dailies` graphics (post reorganization of our dailies)
239
-
240
- ## [2.3.0] - 2019-10-28
241
- ### Changed
242
- - `feature/app/templates/components/simple-masthead.html` - switch out normal logo for 10th anniversary logo
243
-
244
- ## [2.2.1] - 2019-10-22
245
- ### Fixed
246
- - `__common__/utils/deployment/update-log-sheet.js` - handle cases when there are no files specified in the config file
247
-
248
- ## [2.2.0] - 2019-10-17
249
- ### Added
250
- - `__common__/app/templates/macros/processors.html` - add ad macro to processors file #16
251
- - `feature/app/scripts/packs/graphic.js` - add graphic pack for code in a feature with resize() function #22
252
-
253
- ### Changed
254
- - `feature/app/index.html` - import ad from processors file #16
255
- - `feature/app/scripts/packs/main.js` - import new graphic pack
256
- - `graphic/app/scripts/packs/graphic.js` - fixed data path
257
-
258
- ### Removed
259
- - `feature/app/templates/macros/ads.html` - remove special ad macro from feature #16
260
-
261
- ## [2.1.0] - 2019-10-17
262
- ### Changed
263
- - `_common_/utils/deployment/deploy.js` - change deploy function to update log sheet and README #20
264
- - `_common_/utils/fetch/authorize.js`- change SCOPES to include write permissions #20
265
- - `project.config.js` for graphics and features - add `createDate` and `slug` property
266
-
267
- ### Added
268
- - `_common_/utils/deployment/update-log-sheet.js` - add utility file for adding to data visuals log sheet #20
269
- - `_common_/utils/deployment/update-readme.js` - add utility file for adding links to README #20
270
-
271
- ## [2.0.0] - 2019-09-25
272
- ### Added
273
- - `graphic/app/styles/raw-plugin-styles.html` - add styles snippet that goes into the CSS content section of Raw Plugins
274
- - `graphic/app/static.html` - template for non-scripted graphics
275
- - `graphic/app/scripts/static.js` - pack for non-scripted graphics
276
-
277
- ### Changed
278
- - Switched from using Pym to `frames` library #17
279
-
280
- ### Removed
281
- - `graphic/app/scripts/embeds/pym.js`
282
-
283
- ## [1.2.0] - 2019-09-19
284
- ### Fixed
285
- - Fixed security vulnerability introduced by `lodash` #10
286
-
287
- ### Added
288
- - Added `widont` tag to graphic and feature templates #11
289
- - Added a CHANGELOG #13
290
- - Added a subheader example to the feature template #14
291
- - Added a subheader macro #14
292
- - Added styling for a subheader #14
293
-
294
- ## [1.1.1] - 2019-05-08
295
- * Change GA event tags
296
-
297
- ## [1.1.0] - 2019-04-03
298
- - Redundant ternary a828d34
299
- - Better default doc and sheet examples b8abc16
300
- - Merge branch 'master' into develop d82ebed
301
- - Make https serving an option set with an env variable 1310cdb
302
-
303
- https://github.com/texastribune/data-visuals-create/compare/1.0.1...1.1.0
304
-
305
- ## [1.0.1] - 2019-03-20
306
- - Fix bug in doc-to-archieml parser with lists 6717876
307
- - Update Getting started with right path 5d24a29
308
-
309
- https://github.com/texastribune/data-visuals-create/compare/1.0.0...1.0.1
310
-
311
- ## [1.0.0] - 2019-03-05
312
-
313
- ## [1.0.0-alpha] - 2019-02-27
314
-
315
- ## [0.36.0] - 2019-02-19
316
-
317
- ## [0.35.0] - 2019-01-29
318
-
319
- ## [0.34.1] - 2019-01-14
320
-
321
- ## [0.34.0] - 2019-01-11
322
-
323
- ## [0.33.0] - 2018-12-04