@data-visuals/create 5.0.1 → 6.2.1

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": "5.0.1",
3
+ "version": "6.2.1",
4
4
  "description": "Create graphics and features the Data Visuals way.",
5
5
  "scripts": {
6
6
  "build:docs": "doctoc README.md --github",
@@ -27,7 +27,7 @@
27
27
  "@types/node": "^11.9.4",
28
28
  "ansi-colors": "^3.2.3",
29
29
  "archieml": "^0.4.1",
30
- "assets-webpack-plugin": "^7.0.0",
30
+ "assets-webpack-plugin": "^6.1.2",
31
31
  "autoprefixer": "^9.0.2",
32
32
  "aws-sdk": "^2.372.0",
33
33
  "babel-eslint": "^10.0.1",
@@ -90,7 +90,7 @@ const getText = async (params = { key: '', page: {} }) => {
90
90
 
91
91
  const printWarnings = graphics => {
92
92
  const { tags } = config;
93
- const requiredKeys = ['description', 'credits', 'source'];
93
+ const requiredKeys = ['alt-text', 'credits', 'source'];
94
94
 
95
95
  // default tags used
96
96
  if (JSON.stringify(tags) === JSON.stringify(TAGS_PLACEHOLDER)) {
@@ -154,7 +154,7 @@ const parseGraphic = async (
154
154
  // get text from page
155
155
  const title = await getText({ key: 'title', page });
156
156
  const caption = await getText({ key: 'caption', page });
157
- const description = await getText({ key: 'description', page });
157
+ const altText = await getText({ key: 'alt-text', page });
158
158
  const note = await getText({ key: 'note', page });
159
159
  const source = await getText({ key: 'source', page });
160
160
  let credits = await getText({ key: 'credit', page });
@@ -203,7 +203,7 @@ const parseGraphic = async (
203
203
  // all graphic data
204
204
  return {
205
205
  title,
206
- description,
206
+ altText,
207
207
  bucket,
208
208
  graphicPath,
209
209
  graphicURL,
@@ -32,7 +32,9 @@ Upload of ${colors.yellow(numFiles)} file${numFiles === 1 ? '' : 's'} complete.
32
32
  Good work! The primary page of this project can be found at:
33
33
  ${colors.blue.underline(mainPath)} (This has been copied to your clipboard.)
34
34
 
35
- Did you run ${colors.yellow(`npm run data:fetch`)} before deploying to get the latest data?`);
35
+ Did you run ${colors.yellow(
36
+ `npm run data:fetch`
37
+ )} before deploying to get the latest data?`);
36
38
 
37
39
  if (projectType === 'feature') {
38
40
  console.log(`
@@ -2,6 +2,10 @@ const { google } = require('googleapis');
2
2
  const { getAuth } = require('../fetch/authorize');
3
3
  const { dataType } = require('./update-readme');
4
4
 
5
+ // for reading the manifest file
6
+ const paths = require('../../config/paths');
7
+ const fs = require('fs');
8
+
5
9
  // gets file link for first file of desired type
6
10
  function getFileLink(files, type) {
7
11
  let desiredFile = files.find(file => file.type == type);
@@ -15,61 +19,46 @@ function getFileLink(files, type) {
15
19
  } else return '';
16
20
  }
17
21
 
18
- // update log of past data visuals works with project info
19
- let updateLogSheet = async (mainPath, config) => {
20
- const auth = await getAuth();
21
-
22
- const sheets = google.sheets({
23
- version: 'v4',
24
- auth,
25
- });
26
-
27
- // id of data visuals work spreadsheet
28
- const spreadsheetId = '10mQMStMlL333X922Imy-_CY_grOotZ2ZtlmU7DShjPM';
29
- let sheetName, repoName;
30
-
31
- if (config.projectType === 'graphic') {
22
+ // fetch latest data and write new data to sheet
23
+ async function writeToSheet(
24
+ sheets,
25
+ spreadsheetId,
26
+ projectType,
27
+ projectID,
28
+ projectURL,
29
+ metadataInput
30
+ ) {
31
+ // get corresponding sheet
32
+ let sheetName;
33
+ if (projectType === 'graphic') {
32
34
  sheetName = 'Embedded';
33
- repoName = `newsapps-dailies/${config.createYear}/${config.projectName}-${config.createYear}-${config.createMonth}`;
34
35
  }
35
- if (config.projectType === 'feature') {
36
+ if (projectType === 'feature') {
36
37
  sheetName = 'Feature';
37
- repoName = `feature-${config.projectName}-${config.createYear}-${config.createMonth}`;
38
38
  }
39
39
 
40
40
  // pull the data out of the spreadsheet
41
41
  const { data } = await sheets.spreadsheets.values.get({
42
42
  spreadsheetId: spreadsheetId,
43
- range: `${sheetName}!A1:A`,
43
+ range: `${sheetName}!A:B`,
44
44
  });
45
45
 
46
46
  // safety check for values in that range
47
47
  if (data.values) {
48
- let foundId = data.values.find(value => value[0] == config.id);
49
- if (foundId) {
50
- let index = data.values.findIndex(value => value[0] == config.id);
48
+ // match by ID and graphic URL
49
+ let foundProjectIndex = data.values.findIndex(value => {
50
+ return value[0] == projectID && value[1] == projectURL;
51
+ });
52
+
53
+ if (foundProjectIndex != -1) {
51
54
  // if id exists, update it
52
55
  sheets.spreadsheets.values.update({
53
56
  spreadsheetId: spreadsheetId,
54
- range: `${sheetName}!${index + 1}:${index + 1}`, // DON'T MESS WITH THESE INDICES
57
+ range: `${sheetName}!${foundProjectIndex + 1}:${foundProjectIndex + 1}`, // DON'T MESS WITH THESE INDICES
55
58
  valueInputOption: 'USER_ENTERED',
56
59
  resource: {
57
60
  // row of values
58
- values: [
59
- [
60
- config.id,
61
- '',
62
- '',
63
- '',
64
- '',
65
- '',
66
- mainPath,
67
- repoName,
68
- getFileLink(config.files, 'sheet'),
69
- getFileLink(config.files, 'doc'),
70
- '',
71
- ],
72
- ],
61
+ values: metadataInput,
73
62
  },
74
63
  });
75
64
  } else {
@@ -81,25 +70,94 @@ let updateLogSheet = async (mainPath, config) => {
81
70
  1}`, // DON'T MESS WITH THESE INDICES
82
71
  resource: {
83
72
  // row of values
84
- values: [
85
- [
86
- config.id,
87
- '',
88
- '',
89
- '',
90
- '',
91
- '',
92
- mainPath,
93
- repoName,
94
- getFileLink(config.files, 'sheet'),
95
- getFileLink(config.files, 'doc'),
96
- '',
97
- ],
98
- ],
73
+ values: metadataInput,
99
74
  },
100
75
  });
101
76
  }
102
77
  }
78
+ }
79
+
80
+ // update log of past data visuals works with project info
81
+ let updateLogSheet = async (mainPath, config) => {
82
+ // read manifest file, which has metadata about the project
83
+ const manifest = fs.readFileSync(`${paths.appDist}/manifest.json`, 'utf8');
84
+
85
+ if (manifest) {
86
+ const manifestJSON = JSON.parse(manifest); // convert metadata to JSON object
87
+
88
+ // set up auth to connect to Google
89
+ const auth = await getAuth();
90
+ const sheets = google.sheets({
91
+ version: 'v4',
92
+ auth,
93
+ });
94
+
95
+ // id of data visuals work spreadsheet
96
+ const spreadsheetId = '1hCP5zGx8dNxk59gI9wBSFY2juJVM8OFCDY45VnNb2nI';
97
+
98
+ // loop through metadata JSON
99
+ if (manifestJSON.length == 0) {
100
+ let metadataInput = [
101
+ [
102
+ config.id,
103
+ mainPath,
104
+ '',
105
+ '',
106
+ '',
107
+ '',
108
+ '',
109
+ '',
110
+ '',
111
+ '',
112
+ '',
113
+ '',
114
+ getFileLink(config.files, 'sheet'),
115
+ getFileLink(config.files, 'doc'),
116
+ ],
117
+ ];
118
+
119
+ await writeToSheet(
120
+ sheets,
121
+ spreadsheetId,
122
+ config.projectType,
123
+ config.id,
124
+ mainPath,
125
+ metadataInput
126
+ );
127
+ } else {
128
+ for (const metadata of manifestJSON) {
129
+ let metadataInput = [
130
+ [
131
+ metadata.id,
132
+ metadata.graphicURL,
133
+ metadata.graphicPath,
134
+ metadata.title,
135
+ metadata.caption,
136
+ metadata.altText,
137
+ `${metadata.createYear}-${metadata.createMonth}`,
138
+ metadata.lastBuildTime,
139
+ metadata.note,
140
+ metadata.source,
141
+ metadata.credits.join(', '),
142
+ metadata.tags.join(', '),
143
+ getFileLink(config.files, 'sheet'),
144
+ getFileLink(config.files, 'doc'),
145
+ metadata.previews.large,
146
+ metadata.previews.small,
147
+ ],
148
+ ];
149
+
150
+ await writeToSheet(
151
+ sheets,
152
+ spreadsheetId,
153
+ config.projectType,
154
+ metadata.id,
155
+ metadata.graphicURL,
156
+ metadataInput
157
+ );
158
+ }
159
+ }
160
+ }
103
161
  };
104
162
 
105
163
  module.exports = { updateLogSheet };
@@ -19,10 +19,10 @@ let updateReadMe = async (paths, mainPath, files) => {
19
19
  // add project link
20
20
  if (readMe[startLine] != '') {
21
21
  // if link exists, update it
22
- readMe[startLine] = `[Link to your project](${mainPath})`;
22
+ readMe[startLine] = `-[Link to your project](${mainPath})`;
23
23
  } else {
24
24
  // insert project link
25
- readMe.splice(startLine, 0, `[Link to your project](${mainPath})`);
25
+ readMe.splice(startLine, 0, `-[Link to your project](${mainPath})`);
26
26
  }
27
27
 
28
28
  // add data link(s)
@@ -33,7 +33,7 @@ let updateReadMe = async (paths, mainPath, files) => {
33
33
 
34
34
  // if link exists, update it
35
35
  if (readMe[i] != '') {
36
- readMe[i] = `[Link to your ${
36
+ readMe[i] = `-[Link to your ${
37
37
  files[i - (startLine + 1)].type
38
38
  }](${dataLink})`;
39
39
  } else {
@@ -41,7 +41,7 @@ let updateReadMe = async (paths, mainPath, files) => {
41
41
  readMe.splice(
42
42
  i,
43
43
  0,
44
- `[Link to your ${files[i - (startLine + 1)].type}](${dataLink})`
44
+ `-[Link to your ${files[i - (startLine + 1)].type}](${dataLink})`
45
45
  );
46
46
  }
47
47
  }
@@ -11,8 +11,8 @@
11
11
  {# data.data --> data/data.json #}
12
12
  {% set graphicData = data.data %}
13
13
 
14
- {# graphicDesc is used by the CMS for accessibility #}
15
- {% set graphicDesc = '' %}
14
+ {# graphicAltText is used by the CMS for accessibility #}
15
+ {% set graphicAltText = context.alttext %}
16
16
 
17
17
  {% block content %}
18
18
  {# data-graphic signifies that this can be embedded in the CMS #}
@@ -15,8 +15,8 @@
15
15
  {# if this is an ai2html graphic, fill out these variables #}
16
16
  {% set graphicTitle = context.headline %}
17
17
  {% set graphicCaption = '' %}
18
- {# graphicDesc is used by the CMS for accessibility #}
19
- {% set graphicDesc = '' %}
18
+ {# graphicAltText is used by the CMS for accessibility #}
19
+ {% set graphicAltText = context.alttext %}
20
20
  {% set graphicNote = context.note %}
21
21
  {% set graphicSource = context.source %}
22
22
  {% set graphicCredit = context.credit %}
@@ -10,8 +10,8 @@
10
10
  {% if graphicTitle %}
11
11
  <meta name="tt-graphic-title" content="{{ graphicTitle }}" />
12
12
  {% endif %}
13
- {% if graphicDesc %}
14
- <meta name="tt-graphic-description" content="{{ graphicDesc }}" />
13
+ {% if graphicAltText %}
14
+ <meta name="tt-graphic-alt-text" content="{{ graphicAltText }}" />
15
15
  {% endif %}
16
16
  {% if graphicCaption %}
17
17
  <meta name="tt-graphic-caption" content="{{ graphicCaption }}" />
@@ -3,11 +3,11 @@
3
3
  Graphics intended to be used as embeds in the CMS should have specific selectors present in the HTML. The values for these selectors are parsed and output into a `manifest.json` file which is used by the graphics plugin to organize our graphics inventory.
4
4
 
5
5
 
6
- | Selector/Variable | Description | Example | Output in manifest.json |
6
+ | Selector/Variable | Alt Text | Example | Output in manifest.json |
7
7
  |--|--|--|--|
8
8
  | `[data-graphic]` | If present, the HTML of the page will be parsed for metadata and surfaced in the CMS | `<div class="app" data-graphic>` | N/A - If no `[data-graphic]` selector is found, the graphic won't output in manifest. |
9
9
  | `{{ graphicTitle }}` or `[data-title]` | The title of the graphic in the CMS. **If this is missing, the graphic will not surface in the CMS.** | `{% set graphicTitle = 'Some title' %}` or `<h1 class="graphic-title" data-title>Some title</h1>` | `title: string` |
10
- | `{{ graphicDesc }}` | The description of the graphic in the CMS. This will also be read by screenreaders in platforms like Apple News. | `{% set graphicDesc = 'This is a bar chart showing xyz' %}` | `description: string` |
10
+ | `{{ graphicAltText }}` | The alt text of the graphic in the CMS. This will also be read by screenreaders in platforms like Apple News. | `{% set graphicAltText = 'This is a bar chart showing xyz' %}` | `altText: string` |
11
11
  | `{{ graphicCaption }}` | The caption of the graphic in the CMS. The text typically below the title. | `{% set graphicCaption = 'Summarizing statement about the values in the graphic.' %}` | `caption: string` |
12
12
  | `{{ graphicNote }}` or `[data-note]` | Note or disclaimer attached to the graphic. | `{% set graphicNote = 'Important disclaimer about this graphic.' %}` or `<li data-note>Note: Important disclaimer about this graphic.</li>` | `note: string` |
13
13
  | `{{ graphicSource }}` or `[data-source]` | The source of the graphic in the CMS | `{% set graphicSource = 'TXDOT' %}` or `<li data-source>Source: TXDOT</li>` | `source: string` |
@@ -16,9 +16,9 @@ Graphics intended to be used as embeds in the CMS should have specific selectors
16
16
  ### Full example
17
17
  ```html
18
18
  {% extends 'base.html' %}
19
- {% set context = data.text %}
20
- {% set graphicDesc = 'Description of graphic' %}
21
- {% block content %}
19
+ {% set context = data.text %}
20
+ {% set graphicAltText = 'Alt text of graphic' %}
21
+ {% block content %}
22
22
  <div class="app" data-graphic>
23
23
  <h1 class="graphic-title" data-title>{{ context.headline }}</h1>
24
24
  <span data-caption>{{ prose(context.prose, context, graphicData) }}</span>
@@ -29,7 +29,7 @@ Graphics intended to be used as embeds in the CMS should have specific selectors
29
29
  <li data-credit>Credit: {{ context.credit }}</li>
30
30
  </ul>
31
31
  </div>
32
- {% endblock content %}
32
+ {% endblock content %}
33
33
  ```
34
34
  ### Full example with ai2html graphic
35
35
 
@@ -39,7 +39,7 @@ For Illustrator graphics, we typically set the title and other info in the Illus
39
39
  {% extends 'base.html' %}
40
40
  {% set context = data.text %}
41
41
  {% set graphicTitle = 'Headline from AI graphic' %}
42
- {% set graphicDesc = 'Description of graphic' %}
42
+ {% set graphicAltText = 'Alt text of graphic' %}
43
43
  {% set graphicCaption = 'Chatter from AI graphic' %}
44
44
  {% set graphicNote = 'Note from AI graphic' %}
45
45
  {% set graphicSource = 'Source from AI graphic' %}
@@ -80,7 +80,7 @@ Project config keys output in `manifest.json`
80
80
  [
81
81
  {
82
82
  "title": "Title of graphic",
83
- "description": "Description of graphic",
83
+ "altText": "Alt text of graphic",
84
84
  "bucket": "graphics.texastribune.org",
85
85
  "graphicPath": "graphics/new-test-2-2021-02/static",
86
86
  "graphicURL": "https://graphics.texastribune.org/graphics/new-test-2-2021-02/static/",
package/CHANGELOG.md DELETED
@@ -1,299 +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
- ## [5.0.1] - 2021-08-05
14
- ## Fixed
15
- - `_common_/app/styles/_functions.scss`, `_common_/app/styles/utilities/_embed.scss` - replace `/` with `math.div` to address Dart Sass warnings #94
16
-
17
- ## [5.0.0] - 2021-08-04
18
- ### Changed
19
- - `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)
20
-
21
- ## [4.0.2] - 2021-06-04
22
- ### Changed
23
- - `package.json`, `package-lock.json` - bump `np` and `doctoc` packages
24
-
25
- ## [4.0.1] - 2021-06-04
26
- ### Removed
27
- - `templates/feature/app/scripts/kickstart.js` - remove trending bar from our feature pages because it was getting in the way of other designs
28
-
29
- ## [4.0.0] - 2021-05-05
30
- ### Changed
31
- - `templates/__common__/config/scripts/build.js` - add script to update the `lastBuildTime` in `build.js`
32
- - `templates/__common__/config/tasks/graphics-meta.js` - add more keys to manifest.json output; simplify warning logs; ignore graphics with no title
33
- - `templates/__common__/config/utils.js` - add a `logMessage` function for console logging with colors
34
- - `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
35
- - `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`
36
- - `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
37
- - `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
38
- - `templates/graphic/graphics-meta.md` - document the new caption field and rules
39
-
40
- ### Added
41
- - `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
42
-
43
- ## [3.8.0] - 2021-04-20
44
- ### Changed
45
- - `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.
46
- - ` templates/graphic/app/index.html`,
47
- `templates/graphic/app/static.html`,
48
- ` templates/graphic/app/templates/base.html` - Adds all the proper template attributes to surface notes to the parsing task
49
- ` templates/graphic/graphics-meta.md` - Documents the new key
50
-
51
- ## [3.7.0] - 2021-03-16
52
- ### Changed
53
- - `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.)
54
- - `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.
55
- - `templates/graphic/README.md` - Adds default Chrome install path, required in the parse step.
56
- - `templates/graphic/app/templates/base.html` - New meta tags on graphics to be used internally.
57
- - `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.
58
-
59
- ### Added
60
- - ` templates/__common__/_.npmrc`- This tells puppeteer to skip downloading chrome each time we create a new project. Saves us some storage on our machines.
61
- - `templates/__common__/config/scripts/parse.js ` - Task runner that spins up a local server and kicks off the graphics-meta.js step.
62
- - `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.
63
-
64
- How we generate graphic metadata is also documented in `templates/graphic/graphics-meta.md`.
65
-
66
- ## [3.6.0] - 2021-01-21
67
- ### Changed
68
- - `templates/feature/app/templates/includes/ldjson.html` - change some of our attributes in our structured data schema
69
-
70
- ## [3.5.0] - 2021-01-12
71
- ### Changed
72
- - `templates/__common__/utils/deployment/update-log-sheet.js` - change ID of the Google sheet to write our projects to
73
-
74
- ## [3.4.0] - 2020-12-22
75
- ### Changed
76
- - `package.json` - bump `np` to v7.0.0
77
- - `templates/feature/app/scripts/utils/ad-loader.js` - set correct ad tags for roofline and footer ads
78
- - `templates/feature/app/styles/main-queso.scss`, `templates/feature/app/styles/main.scss` - add chart and graphic CSS by default
79
- - `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
80
- - `templates/feature/app/index.html`, `templates/feature/app/index-queso.html` - add footer option to ad to set ad tag
81
-
82
- ## [3.3.0] - 2020-11-19
83
- ### Changed
84
- - `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)
85
- - `templates/feature/app/index-queso.html` - change `{{ context.title }}` to `{{ context.headline }}`, add HTML to include publish and update dates
86
- - `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 }}`
87
- - `templates/feature/app/templates/components/simple-masthead.html`,
88
- `templates/feature/app/templates/includes/logo.html` - change 10th anniversary logo back to original TT logo
89
- - `templates/__common__/app/styles/_typography-queso.scss` - add t-subheader styling
90
-
91
- ### Added
92
- - `templates/__common__/app/templates/macros/prose-queso.html`, `templates/feature/app/templates/macros/processors-queso.html` - added prose and processors with queso styling
93
-
94
- ### Fixed
95
- - `templates/feature/app/index-queso.html`, `templates/feature/app/index.html` - add widont to headline
96
-
97
- ## [3.2.0] - 2020-09-15
98
- ### Changed
99
- - `templates/__common__/config/tasks/nunjucks.js` - added getAuthor() and getAuthorLink() to extract author name and author link for structured data schema
100
- - `templates/feature/app/templates/includes/ldjson.html` - add new structured data attributes
101
-
102
- ## [3.1.0] - 2020-09-02
103
- ### Added
104
- - `templates/feature/app/styles/components/_navbar.scss` - added masthead title to the nav bar component in the `index-queso.html` template
105
- - `templates/feature/app/templates/components/navbar.html` - added additional styling for the masthead title
106
-
107
- ### Fixed
108
- - `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.
109
- - `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.
110
-
111
- ## [3.0.0] - 2020-08-25
112
- ### Changed
113
- - `templates/feature/project.config.js` - change destination s3 bucket on deploy
114
-
115
- ### Fixed
116
- - `package-lock.json` - bump version of `np` package to resolve security vulnerability
117
-
118
- ## [2.8.1] - 2020-07-20
119
- ### Fixed
120
- - `package-lock.json` - bump lodash from 4.17.15 to 4.17.19
121
-
122
- ## [2.8.0] - 2020-07-20
123
- ### Added
124
- - `/feature/app/index-queso.html` - Starter template for queso CSS framework
125
- - `/feature/app/styles/main-queso.scss` - Starter styles for CSS framework
126
- - `/__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
127
- - `/feature/app/styles/components/_navbar.scss` - Overrides for queso navbar
128
- - `feature/app/styles/layout/_container.scss` - Additional container classes
129
- - `/feature/app/templates/components/navbar.html` - Standard navbar component (used on TT)
130
- - `/feature/app/templates/components/share.html` - Standard share component (used on TT)
131
- - `/feature/app/templates/includes/logo.html` - Standard logo include (used on TT)
132
-
133
- ### Changed
134
- - `_package.json` - Added queso dependency
135
- - `_variables.scss` - Added variables required for queso
136
- - `/feature/app/scripts/components/RelatedContent.js` and `/feature/app/scripts/components/Story.js` - Sprinkled in queso helpers (to be compatible in either starter template)
137
- - `/feature/app/styles/components/_ads.scss` - Updated teal to match TT site (it's a random darkened-teal for accessibility)
138
- - `/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.
139
- - `/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.
140
-
141
- ## [2.7.2] - 2020-07-01
142
- ### Added
143
- - `templates/feature/app/scripts/packs/graphic.js` - add useful functions to JS for graphics (functions were already available in feature JS)
144
-
145
- ### Fixed
146
- - `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
147
-
148
- ## [2.7.1] - 2020-07-01
149
- ### Added
150
- - `templates/__common__/app/styles/_typography.scss` - add styling for update date #44
151
-
152
- ### Changed
153
- - `templates/feature/app/index.html` - add HTML to handle update date and pub date #44
154
-
155
- ### Fixed
156
- - `templates/feature/app/scripts/utils/feeds.js` - switch v1 API urls to v2 API urls #6
157
- - `templates/feature/app/scripts/components/Story.js` - switch out properties to match v2 API urls #6
158
-
159
- ## [2.7.0] - 2020-07-01
160
- ### Added
161
- - `templates/__common__/config/tasks/templates.js` - add renderStringWithNunjucks() filter to process data variables pulled in from a Google Doc #46
162
- - `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
163
-
164
- ### Changed
165
- - `templates/feature/app/index.html` - set featureData variable to store data
166
- - `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
167
-
168
- ### Removed
169
- - `templates/__common__/app/templates/macros/processors.html` - remove common processors file
170
-
171
- ## [2.6.0] - 2020-05-08
172
- ### Added
173
- - `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)
174
-
175
- ### Changed
176
- - `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
177
- - `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
178
- - `templates/__common__/_package.json` - Adds purgecss as a dev dependency
179
-
180
- ## [2.5.3] - 2020-04-21
181
- ### Added
182
- - `_variables.scss` - add elections color palette
183
- - `deploy.js` - add reminder to check social media for features and fetch the latest data
184
- - `README.md` - update feature README with more publication reminders
185
-
186
- ## [2.4.3] - 2020-02-11
187
- ### Fixed
188
- - `package.json` - removed `npm run assets:pull` from the `predeploy` command #39
189
-
190
- ## [2.4.2] - 2020-01-15
191
- ### Changed
192
- - `package.json` - pull assets and push to workspace on predeploy, which is run automatically before deploy #31
193
- - `feature/app/styles/components/_related-content.scss`, `feature/app/styles/components/_ads.scss`,
194
- `processors.html` - update appearance of ads
195
- - `graphic/README.md, feature/README.md` - added project launch checklist
196
-
197
- ## [2.4.1]
198
- ### Changed
199
- - `update-log-sheet.js` - change sheet to new 2020 data visuals work sheet
200
-
201
- ## [2.4.0]
202
- ### Added
203
- - `_polls.scss`, `_variables.scss`, `_graphic.scss`, `mixins/_grid.scss` — add styles needed for poll graphics
204
- - `templates.js`, `nunjucks.js` — add helpers needed for poll graphics
205
-
206
- ## [2.3.2] - 2019-11-26
207
- ### Changed
208
- - `graphic/app/scripts/embeds/frames.js` - don't pass debounced function to resize listener, simplify code #29
209
-
210
- ## [2.3.1] - 2019-11-15
211
- ### Fixed
212
- - `deploy.js` - add property to iframe sandbox so user can click to other pages #25
213
- - `project.config.js` - change default archieML doc to be the one we actually use #26
214
- - `update-log-sheet.js` - add year to repo name for `newsapps-dailies` graphics (post reorganization of our dailies)
215
-
216
- ## [2.3.0] - 2019-10-28
217
- ### Changed
218
- - `feature/app/templates/components/simple-masthead.html` - switch out normal logo for 10th anniversary logo
219
-
220
- ## [2.2.1] - 2019-10-22
221
- ### Fixed
222
- - `__common__/utils/deployment/update-log-sheet.js` - handle cases when there are no files specified in the config file
223
-
224
- ## [2.2.0] - 2019-10-17
225
- ### Added
226
- - `__common__/app/templates/macros/processors.html` - add ad macro to processors file #16
227
- - `feature/app/scripts/packs/graphic.js` - add graphic pack for code in a feature with resize() function #22
228
-
229
- ### Changed
230
- - `feature/app/index.html` - import ad from processors file #16
231
- - `feature/app/scripts/packs/main.js` - import new graphic pack
232
- - `graphic/app/scripts/packs/graphic.js` - fixed data path
233
-
234
- ### Removed
235
- - `feature/app/templates/macros/ads.html` - remove special ad macro from feature #16
236
-
237
- ## [2.1.0] - 2019-10-17
238
- ### Changed
239
- - `_common_/utils/deployment/deploy.js` - change deploy function to update log sheet and README #20
240
- - `_common_/utils/fetch/authorize.js`- change SCOPES to include write permissions #20
241
- - `project.config.js` for graphics and features - add `createDate` and `slug` property
242
-
243
- ### Added
244
- - `_common_/utils/deployment/update-log-sheet.js` - add utility file for adding to data visuals log sheet #20
245
- - `_common_/utils/deployment/update-readme.js` - add utility file for adding links to README #20
246
-
247
- ## [2.0.0] - 2019-09-25
248
- ### Added
249
- - `graphic/app/styles/raw-plugin-styles.html` - add styles snippet that goes into the CSS content section of Raw Plugins
250
- - `graphic/app/static.html` - template for non-scripted graphics
251
- - `graphic/app/scripts/static.js` - pack for non-scripted graphics
252
-
253
- ### Changed
254
- - Switched from using Pym to `frames` library #17
255
-
256
- ### Removed
257
- - `graphic/app/scripts/embeds/pym.js`
258
-
259
- ## [1.2.0] - 2019-09-19
260
- ### Fixed
261
- - Fixed security vulnerability introduced by `lodash` #10
262
-
263
- ### Added
264
- - Added `widont` tag to graphic and feature templates #11
265
- - Added a CHANGELOG #13
266
- - Added a subheader example to the feature template #14
267
- - Added a subheader macro #14
268
- - Added styling for a subheader #14
269
-
270
- ## [1.1.1] - 2019-05-08
271
- * Change GA event tags
272
-
273
- ## [1.1.0] - 2019-04-03
274
- - Redundant ternary a828d34
275
- - Better default doc and sheet examples b8abc16
276
- - Merge branch 'master' into develop d82ebed
277
- - Make https serving an option set with an env variable 1310cdb
278
-
279
- https://github.com/texastribune/data-visuals-create/compare/1.0.1...1.1.0
280
-
281
- ## [1.0.1] - 2019-03-20
282
- - Fix bug in doc-to-archieml parser with lists 6717876
283
- - Update Getting started with right path 5d24a29
284
-
285
- https://github.com/texastribune/data-visuals-create/compare/1.0.0...1.0.1
286
-
287
- ## [1.0.0] - 2019-03-05
288
-
289
- ## [1.0.0-alpha] - 2019-02-27
290
-
291
- ## [0.36.0] - 2019-02-19
292
-
293
- ## [0.35.0] - 2019-01-29
294
-
295
- ## [0.34.1] - 2019-01-14
296
-
297
- ## [0.34.0] - 2019-01-11
298
-
299
- ## [0.33.0] - 2018-12-04