The Cause / Land of Password, Wink and Nod / I’ll Be Seeing You
Season 1
Episodes 1 - 3
Editor’s Rating
5 stars
*****
Photo: Rob Youngson/FX
In 2001, former Irish Republican Army member Anthony “Mackers” McIntyre sat down with several ex-paramilitaries in an effort to gather testimony about the Troubles in Northern Ireland into an oral history. The undertaking, which was HQ’d at Boston College, was called the Belfast Project. Perhaps the only thing the IRA was as serious about as a free, united Ireland was the imperative to never, ever disclose the operational details of the army. “Touting,” as they called it, or ratting, was a crime punishable by death. So in order to assure the safety of the participants, the Belfast Project tapes were top secret and confidential. The plan was to release them only after the person talking had died.
Mackers’s interviews provide the narrative scaffolding for FX-Hulu’s new adaptation of Patrick Radden Keefe’s 2018 book, Say Nothing, which investigated the stories that emerged from those tapes and what they revealed about some of the most important events of the Troubles. During that period, which spanned the early 1970s to the mid-1990s, the IRA went to war with the British. The fighting took place mostly in Belfast, a city segregated by religious sectors. West Belfast was Catholic; East Belfast was Protestant. In the western part of the city was a housing complex called Divis Flats, where the widow Jean McConville lived with her ten children and where she was abducted from one December night in 1972, never to be seen again.
The story of McConville’s kidnapping opens Keefe’s book; it’s an illustration of how the violence that seized Belfast in the 1970s affected everyone, not just those involved in the armed struggle. The show begins there, too, but not before we’ve heard the voice of Dolours Price, the IRA’s glamorous firecracker and the show’s main character and narrator. Sitting down with Mackers, a smug smile on her face, Dolours agrees to tell “the whole sordid story.”
If some kids feel pressured by their parents to be doctors and lawyers, the pressure in the Price household is to join the IRA. Although Dolours briefly considers a career in university studying art, the order of her priorities soon shifts to political liberation. Albert Price, her father, was an active IRA member, and her mother, Chrissie, was a valued member of the Cumann na mBan, the army’s Women’s Council. Aunt Bridie, who lived with the family, was a living reminder of what the Prices were ready to give for the cause: She lost her eyes and her hands in a bombing.
When Dolours and her sister, Marian, show interest in Dr. Martin Luther King’s pacifism, Albert is disappointed. They argue about the best path to independence the way other families might argue about grades. But everything changes for the Price sisters when they attend a peaceful march that turns out to be an ambush. With the help of the local police, Catholic marchers are ensnared under the Burntollet Bridge by attacking opponents. The rocks come raining down from all sides. Dolours steps valiantly in front of her sister and gets clubbed repeatedly on the torso and on the head. It’s the realization that her adversaries are moved by pure hate that radicalizes her — talking won’t do. They’ll have to fight.
Although her ideals change, Dolours brings her no-nonsense wit to the armed struggle; from the jump, the Price sisters are uninterested in being “one of the Cumann girls, breastfeeding the men all night.” They want to be in it with the boys, who get to throw Molotov cocktails and take down telephone poles, even when they don’t really know which lines lead to Catholic phones and which to the barracks. The new IRA leadership, still guided by the old guard, is led by the ambitious young Gerry Adams, whom they’ve known since childhood. Gerry is taken to yelling instructions into a megaphone like a theater director while his right-hand man, Brendan “the Dark” Hughes, carries them out. It’s Gerry whom the girls have to persuade in order to be let into the army, and he’s partial to them. Under different circumstances, this foursome would’ve made for a lively friend group; as it is, their banter is relegated to dark rooms and secret meetings. At no point do Marian and Dolours feel intimidated into submission — they speak their minds.
In fact, the tone of their early work for the IRA is one of glee. They plan and execute an unauthorized bank robbery — a ballsy move for a couple of novices — and win back Gerry’s and Brendan’s favor by coming up with more ideas for operations. As a team, they complement each other: Dolours is outspoken and charismatic, while Marian is reserved and fearless. The dynamic between Gerry and Brendan mirrors the sisters’; what Gerry has in bookish sensibility, Brendan makes up for in street smarts. It’s tempting to get lost in their charming banter, but while Say Nothing indulges in mythmaking, it never lets you forget the stakes of the fight.
To make up for the hubris of their bank robbery, the Price girls come up with a plan to bail out Jimmy Doyle — their friend and a valued member of Brendan’s highly active D Company — from British custody. Jimmy was beaten so badly that he had to get surgery for a burst appendix; the girls’ idea is to break him out of the hospital. It’s a close call, but they make it — faced with the necessity to shoot the British soldiers on guard, Dolours hesitates. It’s Marian who opens fire. “It’s always the quiet ones,” the boys joke. It rattles Dolours to think that she is the kind of soldier who chokes, but a tender Brendan reassures her. “I don’t trust the ones who don’t hesitate,” he says before telling her about an occasion when he didn’t have the heart to shoot a British soldier — looking into his face, he realized the man looked just like his brother.
In West Belfast, the civilian population had the IRA’s back. “It all came down to one thing,” Brendan says in his Belfast Project tape: “loyalty.” Residents of Divis Flats help the lads in whatever way they can — after the hospital job, Brendan unloads the used weapons to a familiar face in the building, who in turn asks the just-arrived Jean McConville to store the bag; her own apartment is routinely searched. Not wanting to get involved, Jean refuses to cooperate, which explains where we know the woman’s face from: She was with the group of men who took Jean from her apartment in the pilot’s opening sequence.
This network of support made it much harder for the Brits to get a hold of the IRA and how it worked. Brendan and Gerry ran laps around the British Army — they didn’t even know what the boys looked like. Meanwhile, the IRA had spies inside the Palace Barracks, the British Army’s HQ. General Frank Kitson, an expert on what he insists on calling “insurgencies” — even his little daughter knows that to call it a war would dignify the terrorists — comes to Belfast to advise the Brits on the war. He puts perceptive officers in plain clothes to run recon at a wake, the rare occasion for which most members of a secretive, overly cautious paramilitary organization gather under one roof.
Catching Brendan proves a harder task than the efficient, clean abduction of his fellow soldier Seamus Wright, who is unceremoniously taken right outside the wake. Brendan is shrewd — he knows to suspect even the ice-cream van that drives by on a day he describes as “fucking Baltic.” Running from the Brits, Brendan can count on every door in the neighborhood to be open for him, granting him shortcuts through the city. The series cleverly illustrates his escape route by showing the chase in bird’s-eye view: West Belfast is Brendan’s playground. Eventually, he barrels through the window of a home where he can automatically locate the chest containing a rifle. The Brits scatter after a brief shoot-out; their objective wasn’t to catch Brendan necessarily but to identify him, a nuance of which he is painfully aware. When Gerry comes to his aid with a doctor — he severed an artery on his arm when he jumped through the glass — they conclude that someone must have talked; how else could the Brits have so suddenly discovered his identity?
For the IRA, talking was unpardonable. In 1972, which in Dolours’s estimation was “the most violent year,” a time when “the goal was to kill as many soldiers and policemen as possible,” the code of silence surrounding the army’s activities was of paramount importance to keep operations functioning. While the Price sisters smuggle explosives across the border and develop a rapport with the gentle giant Joe Lynskey, Gerry and Brendan scheme to find the mole in their midst. Not long after Brendan’s scare, Gerry is found by the British in his marital bed. During interrogation, he begins to develop the strategy of denial that would define his political persona decades from then — his tactic is simply to deny that he is Gerry Adams at all. Instead, he maintains that he is a civilian named Joe McGuigan, essentially driving the Brits into hysterics. But Gerry’s eventual release doesn’t have anything to do with his approach. The IRA’s leadership, an enraged Kitson discovers, has agreed to meet with the British Home secretary for peace negotiations on the condition Gerry comes along.
As they wait out the talks in London, the IRA calls a cease-fire, which is welcomed with open arms by a frightened and exhausted population. The McConville children even get to play outside. Although Gerry is the “Big Lad” leading the revolution on the ground, the old guard — including chief of staff Seán Mac Stíofáin — is still the one calling the shots. At the meeting, the veterans foreclose any possibility of a peace deal by demanding nothing less than “the removal of British troops from occupied Ireland immediately” and a public apology from the British government in three days’ time. The Brits don’t concede, and the shooting resumes.
Worried that one of the kids will get caught in the cross fire, Jean has her family sleep on mattresses on the floor. In the hallway, someone cries for help — hesitant at first, Jean is moved by the sight of a wounded British soldier and gives him a pillow to put under his head, though her eldest daughter, Helen, begs her not to. The same woman from before, who is starting to seem suspiciously like she’s watching Jean, witnesses her kind act. The next morning, when Jean steps out of her apartment, she sees that someone has scrawled the words BRIT LOVER in red paint across her door.
In the middle of all this action, it’s almost easy to forget that the Price sisters — as well as Gerry and Brendan, who are only a couple of years older than them — are just kids, barely 18. They come of age in the army, and the common lessons of young adulthood are coupled with the hard lessons of war. The same Dolours who cheekily flirts with a British soldier in order to smuggle 200 pounds of explosives across the border (and prides herself in the tactic) later has to drive her friend Joe Lynskey to his own execution. In a wildly miscalculated bid for the attention of the woman he loved, Joe had a subordinate shoot her husband — a fellow soldier — on the doorstep of his own house. This type of maneuvering is also a lesson for Dolours: Violence, no matter how righteously wielded, quickly becomes a slippery slope.
The internal politics of the army already had Gerry and Brendan on alert, and news of Joe’s betrayal opens the path to a stricter policy. Gerry forms a new secret unit, called the Unknowns, and recruits both Price sisters to report to a man named Pat, who in turn reports to Gerry. Dolours’s first assignment is to drive Joe across the border. It doesn’t make anything easier that Joe knows exactly what is going to happen and takes his fate on the chin; when Dolours steps out of the car to call Marian, worried she can’t go through with it, Joe waits for her to return rather than try to escape. The whole sequence is unbearably sad; Dolours cries openly, and Joe comforts her as best he can. The wounds left by this kind of responsibility will later harden into resentment for Dolours and lead her to tell Mackers point-blank that though she’d been taught since she was a kid that to “join the IRA was the noblest thing you could do,” it turned out to be “all lies.”
Among other portrayals of the Troubles in recent audiovisual memory, the tone of Say Nothing is unique. While something like Derry Girlsaimed to find the humor in civilian life amid the conflict and a film like Hunger took a more somber approach to its realities, Say Nothing falls somewhere in between: It blends character-driven drama with political thriller while still managing to be pretty funny — “good craic,” as Brendan or Dolours might put it. I worried at first that too much TV magic played up Dolours’s cheeky feistiness into an easily legible character; fans of Keefe’s book will remember that her life was anything but simple. By the time we get to the Joe Lynskey sequence, though, it seemed clear to me that the show was interested in much more than the action-packed, salacious surface of her IRA involvement. The adaptation shares one of its objectives with Keefe’s book: to understand the characters not just as perpetrators or victims but as real people.
By submitting your email, you agree to our
Terms and Privacy Notice
and to receive email correspondence from us. This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
Already a subscriber?
Already a subscriber?
`;
// integrate Sub(x) scripts and elements
if (hostname !== 'subs.nymag.com') { // do not integrate on this subdomain
document.head.appendChild(trackingScript);
document.body.insertAdjacentHTML('beforeend', subXAnimationElements);
}
There was an error processing the request. Please try again later."}).catch(e=>console.error("Error verifying email: ",e)))(r.querySelector(".content"),o.bannerCTAVerification)})):(l.remove(),s.remove()),o.dismissable||n.remove(),o.useAlertIcon||a.remove(),r.classList.add("show"),n.addEventListener("click",()=>{u(),r.classList.remove("show")})}else r.remove()}});
}, {"1":1,"6":6,"12":12,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(3),auth=require(12),signInButton=dom.find(".user-signin"),signOutButton=dom.find(".user-signout"),globalNav=dom.find('[class^="global-nav"]'),body=dom.find("body"),dropdownItems=dom.findAll(".dropdown-wrap"),gtm=require(1),appendLandingPageParams=require(136),pageUri=require(124).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";function closeDropdowns(e){let n=globalNav.querySelectorAll(".dropdown.open");dropdownItems.forEach(function(t){let o=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||o.classList.remove("open")})}function gtmSendReport(e,n,t){let o={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(o.eventLabel=n.href),gtm.reportNow(o)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const o=t.split("?"),i=new URLSearchParams(o[1]);for(let e of n.entries())i.set(e[0],e[1]);t=`${o[0]}?${i.toString()}`,e.href=t}else e.href=`${t}?${n.toString()}`}}function init(e){const n=e.querySelectorAll(".to-landing-page");window.addEventListener("auth:init",()=>{signInButton.addEventListener("click",function(e){e.preventDefault(),auth.showEmbeddedLoginFlow("top navigation")}),signOutButton.addEventListener("click",function(e){e.preventDefault(),gtmSendReport("Sign Out",e.target,"user-info-link"),auth.logout()}),auth.isAuthenticated()&&e.classList.add("signed-in"),auth.isSubscriber()&&e.classList.add("subscribed"),e.querySelectorAll(".user-link").forEach(e=>{e.classList.add("active")}),subscriptionPromoLinks.forEach(e=>{updateElementTargetUrlsIfQueryStrings(e)}),appendLandingPageParams(n)})}dropdownItems.forEach(function(e){e.addEventListener("click",function(){e.querySelector(".dropdown").classList.toggle("open")})}),body.addEventListener("click",closeDropdowns),document.addEventListener("keydown",closeDropdowns),globalNav.addEventListener("click",function(e){let n=e.target;n.classList.contains("global-nav-track")&>mSendReport(n.text,n,"global-nav-link")}),module.exports=init;
}, {"1":1,"3":3,"12":12,"124":124,"136":136}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(408),Fingerprint2=require(407),DS=require(406),Eventify=require(246);function registerGlobals(){window.DS=DS,window.Eventify=Eventify,window.Fingerprint2=Fingerprint2,DS.value("Eventify",Eventify),DS.value("Fingerprint2",Fingerprint2),DS.value("$document",window.document),DS.value("$window",window)}function mountDollarSliceComponents(){DS.service("components",["$document","$module",function(e,n){var o=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),r=Object.keys(o);function t(e){return o=>{try{n.get(e,o)}catch(e){logMountError(o,e)}}}_each(r,n=>{var o=e.querySelectorAll('[data-uri*="/_components/'+n+'/"]'),r=e.querySelectorAll('[data-uri$="/_components/'+n+'"]');_each(o,t(n)),_each(r,t(n))}),this.components=r}]),DS.get("components")}function logMountError(e,n){const o=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error("Error attaching controller to "+o,n)}registerGlobals(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{mountDollarSliceComponents()}):mountDollarSliceComponents();
}, {"221":221,"246":246,"406":406,"407":407,"408":408}];
window.modules["ads.legacy"] = [function(require,module,exports){"use strict";const _map=require(118),_forEach=require(107),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(408),_debounce=require(182),_sortBy=require(205),page=require(124),visit=require(114);DS.service("adService",["Eventify","$cid","$document","$window",function(e,t,a,i){var o,n,s,r,d,c,u,l,g={},p=this,h=[],f=visit.getQueryParamsObject(["utm_campaign"]),m=document.querySelector('script[data-type="ad-a9"]'),b=[],w=!1,v=[],y=document.querySelector('script[data-name="ad-doubleverify"]');document.querySelector('script[data-name="concert-ads"]')||(i.NYM={},i.NYM.analytics={},i.NYM.analytics.adStartTime=i.performance.now(),i.googletag=i.googletag||{},i.googletag.cmd=i.googletag.cmd||[],u=i.googletag,(m||y)&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()})),m&&(l=i.setInterval(function(){void 0!==window.apstag&&void 0!==window.apstag.timeout&&(i.clearInterval(l),window.apstag.cleared=!0,l=null)},10),setTimeout(function(){l&&(i.clearInterval(l),i.googletag.pubads().refresh(),window.apstag||console.log("MESSAGE: Timeout for A9 load exceeded, aborting"))},500)),y&&(b.push(new Promise(function(e){w?e():v.push(e)})),c=i.setTimeout(T,2500)),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?u.defineSlot(o.name,o.sizes,o.id).addService(u.pubads()):u.defineOutOfPageSlot(o.name,o.id).addService(u.pubads())).setTargeting("adid",o.id),f.hasOwnProperty("utm_campaign")&&t.setTargeting("utmcamp",f.utm_campaign),a=p.getAdCount(o.label),t.setTargeting("label",o.label+"_"+o.site+"-"+a),u.display(o.id),u.pubads().addEventListener("slotOnload",function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),n=_(o),Promise.all(b).then(function(){n?window.apstag&&window.apstag.cleared?window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([t],{changeCorrelator:!1})})}):y&&u.pubads().refresh([t],{changeCorrelator:!1}):u.pubads().refresh([t],{changeCorrelator:!1})}),e.slot=t,e)},n=function(e){var a,i,o,n=t(),s=e.getAttribute("data-name"),r=e.getAttribute("data-sizes"),d=e.getAttribute("data-label"),c=e.getAttribute("data-site");n=e.id,r&&r.length?(r=r.split(","),a=[],_map(r,function(e){e=e.split("x"),i=parseInt(e[0]),o=parseInt(e[1]),a.push([i,o])})):(e.classList.add("oop"),a=!1),this.data={id:n,name:s,sizes:a,loaded:!1,label:d,site:c},g[n]=this},r=function(e){u.cmd.push(function(){var t=o(e);g[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=_(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},u.cmd.push(function(){var e,t,o,n=page.getMeta("article:tag"),s=page.getMeta("author"),r=i.location.href,d=(e=a.head.querySelector(".head-gtm"),t=a.body.querySelector(".gtm"),e&&"top"===e.getAttribute("data-gtm")?"gtmtop":t&&"bottom"===t.getAttribute("data-gtm")?"gtmbottom":"");o=[],_forEach([n,s,d],function(e){_forEach(e.split(","),function(e){(e=e.trim().toLowerCase().replace(/\s/g,"-").replace(/\'|\’/g,"")).length&&o.push(e)})}),u.pubads().setTargeting("kw",o),u.pubads().setTargeting("entry_group",o),r=r.slice(r.lastIndexOf("/")+1),u.pubads().setTargeting("pn",r),u.companionAds().setRefreshUnfilledSlots(!0),u.pubads().enableAsyncRendering(),u.enableServices()}),this.load=r,this.create=function(e){return new n(e)},this.refresh=function(e){var t;_isString(e)?(t=this.getById(e),s(t)):s(e)},this.remove=function(e){var t=e.data.id;a.getElementById(t).innerHTML=""},this.getAdCount=function(e){var t,a=0,i=Object.keys(g);return _each(i,function(i){(t=g[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return g[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,"homepageTakeover/TopLeaderboard":1},t=_sortBy(h,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),y&&window.PQ.cmd.push(()=>{try{window.PQ.loadSignals(["ids","bsc","vlp"],T)}catch(e){T(),console.error(`There has been an error loading Double Verify signals: ${e}`)}}),h=[]},10),this.addToPageLoadQueue=function(e){h.push(e),d()});function _(e){var t,a=e.sizes;return a=_intersectionWith(a,[[970,250],[970,90],[728,90],[300,600],[300,250],[320,100],[320,50]],_isEqual),e.sizes&&e.sizes.length&&(t={slotID:e.id,sizes:a,slotName:e.label}),t}function T(){i.clearTimeout(c),w=!0,_forEach(v,function(e){e()})}}]);
}, {"107":107,"114":114,"118":118,"124":124,"182":182,"205":205,"268":268,"274":274,"408":408,"409":409}];
window.modules["cid.legacy"] = [function(require,module,exports){"use strict";DS.service("$cid",function(){var r=Math.floor(100*Math.random());return function(){return"cid-"+ ++r}});
}, {}];
window.modules["client.legacy"] = [function(require,module,exports){"use strict";require("cid.legacy"),require("ads.legacy"),require("facebook.legacy"),require("aaa-module-mounting.legacy");
}, {"cid.legacy":"cid.legacy","aaa-module-mounting.legacy":"aaa-module-mounting.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.legacy"}];
window.modules["facebook.legacy"] = [function(require,module,exports){"use strict";DS.service("facebook",[function(){this.fb=function(i){window.FB&&window.FB[i].apply(this,Array.prototype.slice.call(arguments,1))}}]);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o typeof key === 'string' && key.match(/\.legacy$/)).forEach(key => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules).filter(key => typeof key === 'string' && key.match(/\.client$/)).forEach(key => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the `` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = '';
}
// note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]