Skip to content

Commit

Permalink
feat(data): create all affiliation files (#60)
Browse files Browse the repository at this point in the history
* feat(data): create all affiliation files

* chore(data): all affiliates from a-d

* chore(data): update and add organizing to a-d

* chore(data): update f-l

* chore(data): update m-n

* chore(test): add test script

* chore(data): correct data format

* build(test): add test file

* chore(data): o-w files

* chore(config): ignore text file

* chore(test): add new titles

* fix(cli): update save directory

* build(config): set build data script

* chore(data): update local data file

* chore(config): add local bin to ci

* chore(config): use full path

* chore(config): use correct path
  • Loading branch information
PaleBluDot authored Jul 1, 2024
1 parent f106f37 commit edd8d0c
Show file tree
Hide file tree
Showing 68 changed files with 7,860 additions and 78 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ jobs:
- name: 🏗 Build
run: npm run build --if-present

- name: 🚨 Format
run: npm run format
- name: 🧩 Format
run: npm run format --if-present

- name: 🚨 Test
run: npm run test:ci --if-present

- name: 🚀 Release Dry Run
uses: cycjimmy/semantic-release-action@v3
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ jobs:
- name: 🏗 Build
run: npm run build --if-present

- name: 🚨 Format
run: npm run format
- name: 🧩 Format
run: npm run format --if-present

- name: 🚨 Test
run: npm run test:ci --if-present

- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules/
src/**/**/xx.js
src/test/xx.test.js
bin/commands/testCommand.mjs
test.json

# build artifacts
build/
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Ignore artifacts:
dist/data/dataLoader.min.json
src/templates/Playground/data-loader.html
src/templates/Playground/data-loader.html
test/*
2 changes: 1 addition & 1 deletion bin/commands/createDataLoader.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from "path";
import getCombinedData from "../lib/combineAffiliation.mjs";
import sailthruVariables from "../lib/sailthruVariables.mjs";

export default function createLoaderFile(location = "build/data") {
export default function createLoaderFile(location = "dist/data") {
getCombinedData().then((data) => {
const minifiedJson = "{data = " + JSON.stringify(data) + "}";
const distPath = path.join(location, "dataLoader.min.json");
Expand Down
10 changes: 10 additions & 0 deletions bin/lib/sailthruVariables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ const sailthruVariables = `
{legal_title = data[affiliation]['signatures']['legal']['title']}
{legal_pronouns = data[affiliation]['signatures']['legal']['pronouns']}
{legal_headshot = data[affiliation]['signatures']['legal']['headshot']}
{org_name = data[affiliation]['signatures']['org']['name']}
{org_title = data[affiliation]['signatures']['org']['title']}
{org_pronouns = data[affiliation]['signatures']['org']['pronouns']}
{org_headshot = data[affiliation]['signatures']['org']['headshot']}
{org_name = data[affiliation]['signatures']['org']['name']}
{org_title = data[affiliation]['signatures']['org']['title']}
{org_pronouns = data[affiliation]['signatures']['org']['pronouns']}
{org_headshot = data[affiliation]['signatures']['org']['headshot']}
`;

export default sailthruVariables;
12 changes: 10 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
"lint": "npm run pa11y",
"format": "npx prettier --write dist/**/*",
"commit": "git cz",
"test": "jest --verbose",
"test": "npx jest --watchAll",
"test:ci": "npx jest",
"qa": "npm-run-all clean --parallel lint test",
"build": "npm run clean && cross-env ELEVENTY_ENV=prod eleventy"
"build": "npm run clean && cross-env ELEVENTY_ENV=prod eleventy && ./bin/cli.mjs create"
},
"config": {
"commitizen": {
Expand All @@ -60,6 +61,7 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.0.5",
"@aclu-national/email-builder": "file:./email-builder",
"clean-css-cli": "^5.3.3",
"commander": "^12.0.0",
"commitizen": "^4.2.4",
Expand All @@ -81,7 +83,7 @@
"url": "git+https://github.com/aclu-national/email-builder.git"
},
"bugs": {
"url": "https://github.com/aclu-national/email-builder/issues"
"url": "https://github.com/aclu-national/email-build`er/issues"
},
"homepage": "https://github.com/aclu-national/email-builder#readme"
}
45 changes: 33 additions & 12 deletions src/_data/affiliations/ak.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const data = {
address1: "1057 W. Fireweed Lane, Suite 207",
address2: "Anchorage, AK 99052",
affiliation_name: "ACLU of Alaska",
donation_url: "https://action.aclu.org/give/alaska-join-renew-today?initms_aff=ak&initms_chan=eml&utm_medium=eml&initms=22XXXX_affcampaign_footerdonate_gradead_sail&utm_source=sail&utm_campaign=affcampaign&utm_content=22XXXX_civilliberties_footerdonate_gradead&af={sb_query_string_encrypted}&ms_aff=ak&ms_chan=eml&ms=22XXXX_affcampaign_footerdonate_gradead_sail",
donation_url: "https://action.aclu.org/give/alaska-join-renew-today?initms_aff=ak&initms_chan=eml&utm_medium=eml&initms=24XXXX_affcampaign_footerdonate_gradead_sail&utm_source=sail&utm_campaign=affcampaign&utm_content=24XXXX_civilliberties_footerdonate_gradead&af={sb_query_string_encrypted}&ms_aff=ak&ms_chan=eml&ms=24XXXX_affcampaign_footerdonate_gradead_sail",
facebook_url: "https://www.facebook.com/ACLUofAlaska",
instagram_url: "https://www.instagram.com/acluofalaska",
logo_url: "https://media.sailthru.com/64d/1k4/4/d/5e947c159341b.png",
Expand All @@ -12,36 +12,57 @@ const data = {
advo: {
headshot: "",
name: "Michael Garvey",
pronouns: "",
pronouns: "He, him, his",
title: "Advocacy Director",
},
comms: {
headshot: "",
name: "Megan Barker",
pronouns: "She, her, hers",
title: "Communications Director",
},
custom1: {
headshot: "https://media.sailthru.com/64d/1k4/4/s/5ea873c8f3d44.jpg",
name: "Megan Edge",
pronouns: "She, her, hers",
title: "Communications Director",
title: "Prison Project Director",
},
custom2: {
headshot: "",
name: "Pavel Sanchez",
pronouns: "",
title: "",
},
custom3: {
headshot: "",
name: "",
pronouns: "",
title: "",
},
custom1: { headshot: "", name: "", pronouns: "", title: "" },
custom2: { headshot: "", name: "Pavel Sanchez", pronouns: "", title: "" },
custom3: { headshot: "", name: "", pronouns: "", title: "" },
dev: {
headshot: "https://media.sailthru.com/64d/1k4/4/s/5ea873c4a1b08.jpg",
name: "Laura Herman",
pronouns: "She, her, hers",
title: "Director of Philanthropy",
},
ed: {
headshot: "https://media.sailthru.com/64d/1k4/3/2/5e5d757771747.jpg",
name: "Joshua Decker",
pronouns: "He, him, his",
headshot: "",
name: "Mara Kimmel",
pronouns: "She, her, hers",
title: "Executive Director",
},
legal: {
headshot: "https://media.sailthru.com/64d/1k4/4/s/5ea873be7af4e.jpg",
name: "Stephen Koteff",
pronouns: "",
headshot: "",
name: "Ruth Botstein",
pronouns: "She, her, hers",
title: "Legal Director",
},
org: {
headshot: "",
name: "",
pronouns: "",
title: "Organizing Director",
},
},
twitter_url: "https://twitter.com/ACLUofAlaska",
website_url: "https://www.acluak.org",
Expand Down
71 changes: 71 additions & 0 deletions src/_data/affiliations/al.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
const data = {
address1: "P.O. Box 6179",
address2: "Montgomery, AL 36106",
affiliation_name: "ACLU of Alabama",
donation_url: "https://action.aclu.org/give/alabama-join-renew-today?initms_aff=al&initms_chan=eml&utm_medium=eml&initms=24XXXX_affcampaign_footerdonate_gradead_sail&utm_source=sail&utm_campaign=affcampaign&utm_content=24XXXX_civilliberties_footerdonate_gradead&af={sb_query_string_encrypted}&gs={sb_gift_string_encrypted}&ms_aff=al&ms_chan=eml&ms=24XXXX_affcampaign_footerdonate_gradead_sail",
facebook_url: "https://facebook.com/ACLUofAlabama",
instagram_url: "https://www.instagram.com/acluofalabama",
logo_url: "https://media.sailthru.com/64d/1k4/4/d/5e947c155ea26.png",
logo_width: "150",
logo_width: "150",
signatures: {
advo: {
headshot: "",
name: "",
pronouns: "",
title: "Advocacy Director",
},
comms: {
title: "Director of Communications",
name: "Jose Vasquez",
pronouns: "",
headshot: "",
},
custom1: {
headshot: "",
name: "",
pronouns: "",
title: "",
},
custom2: {
headshot: "",
name: "",
pronouns: "",
title: "",
},
custom3: {
headshot: "",
name: "",
pronouns: "",
title: "",
},
dev: {
headshot: "",
name: "",
pronouns: "",
title: "Development Director",
},
ed: {
headshot: "https://media.sailthru.com/64d/1k6/c/f/639b7a2fa76ca.jpg",
name: "JaTaune Bosby Gilchrist",
pronouns: "She, her, hers",
title: "Executive Director",
},
legal: {
headshot: "",
name: "",
pronouns: "",
title: "Legal Director",
},
org: {
headshot: "",
name: "",
pronouns: "",
title: "Organizing Director",
},
},
twitter_url: "https://twitter.com/aclualabama",
website_url: "https://aclualabama.org",
};

module.exports = data;
70 changes: 70 additions & 0 deletions src/_data/affiliations/ar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
const data = {
address1: "904 West 2nd Street",
address2: "Little Rock, AR 72201",
affiliation_name: "ACLU of Arkansas",
donation_url: "https://action.aclu.org/give/arkansas-join-renew-today?initms_aff=ar&initms_chan=eml&utm_medium=eml&initms=24XXXX_affcampaign_footerdonate_gradead_sail&utm_source=sail&utm_campaign=affcampaign&utm_content=24XXXX_civilliberties_footerdonate_gradead&af={sb_query_string_encrypted}&ms_aff=ar&ms_chan=eml&ms=24XXXX_affcampaign_footerdonate_gradead_sail",
facebook_url: "https://www.facebook.com/ACLUArkansas",
instagram_url: "https://www.instagram.com/acluofarkansas/",
logo_url: "https://media.sailthru.com/64d/1k8/2/9/65c67d6786f7c.png",
logo_width: "200",
signatures: {
advo: {
headshot: "",
name: "",
pronouns: "",
title: "Advocacy Director",
},
comms: {
headshot: "",
name: "",
pronouns: "",
title: "Communications Director",
},
custom1: {
headshot: "",
name: "",
pronouns: "",
title: "",
},
custom2: {
headshot: "",
name: "",
pronouns: "",
title: "",
},
custom3: {
headshot: "",
name: "",
pronouns: "",
title: "",
},
dev: {
headshot: "",
name: "",
pronouns: "",
title: "Development Director",
},
ed: {
headshot: "https://media.sailthru.com/64d/1k3/b/8/5dc58b034237f.jpg",
name: "Holly Dickson",
pronouns: "She, her, hers",
title: "Executive Director",
},
legal: {
headshot: "",
name: "",
pronouns: "",
title: "Legal Director",
},
org: {
headshot: "",
name: "",
pronouns: "",
title: "Organizing Director",
},
},
twitter_url: "https://twitter.com/ArkansasACLU",
website_url: "https://www.acluarkansas.org",
};

module.exports = data;
Loading

0 comments on commit edd8d0c

Please sign in to comment.