Skip to content

Commit aa723fc

Browse files
Merge pull request #127 from valor-software/fix-article-toc-tag
fix(article): only add toc to files with ":toc:" tag
2 parents 142f750 + 59ccf48 commit aa723fc

17 files changed

Lines changed: 757 additions & 32 deletions

File tree

apps/adoc-article-app/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const articlesFolderPath = path.resolve(process.cwd(), 'assets/articles');
2020
const extension = path.extname(file.name).split('.')[1];
2121
if ( extension === 'adoc') {
2222
const content = await fs.readFile(`${articlesFolderPath}/${folder.name}/${file.name}`, 'utf8');
23-
const convertDocAttributes = ['toc',`imagesdir=assets/articles/${dirName}`];
23+
const convertDocAttributes = [`imagesdir=assets/articles/${dirName}`];
2424
const tocInDoc = content.includes(':toc:');
2525
if (tocInDoc) {
2626
convertDocAttributes.push('toc');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const articlesRefactoringTitlesList = ["0041-nx-next-js-e-module-federation", "0040-nx-next-js-and-module-federation", "0039-debugging-ngrx-in-nativescript-with-redux-devtools", "0038-announcing-strategic-partnership-with-zack-jackson-the-module-federation-inventor", "0037-implementing-websockets-plugin-for-nativescript-using-react-native", "0036-tagtide-library-make-your-html-editor-friendly-and-more", "0035-diving-into-seeking-issue-with-mp3-files", "0034-performance-testing-via-artillery-io", "0033-arc-a-new-weapon-against-accessibility-bugs", "0032-setting-up-your-project-on-gcp-fast-using-terraform-and-kubernetes", "0031-ngx-bootstrap-v7-0-0-is-officially-released", "0030-how-to-deploy-firebase-preview-channels-on-travis-ci", "0029-scully-helped-us-reach-a-99-lighthouse-score-for-a-b2c-platform", "0028-designing-aggregator-app-from-a-to-z-part-2", "0027-designing-aggregator-app-from-a-to-z-part-1", "0026-multi-highlighting-for-draftjs", "0025-new-year-new-valor-new-you", "0024-incorporating-user-research-on-live-projects-part-4", "0023-incorporating-user-research-on-live-projects-part-3", "0022-incorporating-user-research-on-live-projects-part-2", "0021-incorporating-user-research-on-live-projects-part-1", "0020-why-you-might-want-to-switch-to-time-and-material-from-fixed-price", "0019-cross-site-scripting-xss-a-qa-engineers-guide", "0018-career-path-for-a-flat-structured-company", "0017-json-web-token-authorization-with-access-and-refresh-tokens-in-angular-application-with-node-js-server", "0016-testing-ios-app-vulnerabilities-with-jailbreaking-part-1", "0015-benefits-of-agile-to-business-and-team", "0014-valor-software-named-top-development-company-in-ukraine-by-clutch", "0013-testing-with-protractor-how-to-fix-synchronization-issues", "0012-hacktoberfest-2019-is-coming-and-ngx-bootstrap-strives-for-your-attention", "0011-the-4-biggest-lessons-we-learned-while-building-a-startup-product-as-an-outsource-company", "0010-angular-and-seo-structured-data-for-rich-snippets", "0009-ngx-bootstrap-angular-ivy-is-here", "0008-webflow-custom-code-snippets-you-would-use-episode-1", "0007-testing-canvas-could-be-easier", "0006-case-study-of-applitools-or-not-only-cypress-cross-browser-testing", "0005-figma-as-a-presentation-tool-unifying-templates", "0004-cypress-testing-running-tests-in-parallel", "0003-quality-assured-what-it-really-takes-to-test-open-source-libraries", "0002-figma-vs-sketch-text-alignment-comparison", "0001-como-o-scully-nos-ajudou-a-atingir-99-pontos-no-lighthouse-para-uma-plataforma-b2c"];
22
export const articlesList = ["Nx, Next.js, e Module Federation", "Nx, Next.js, and Module Federation", "Debugging NgRx in NativeScript with Redux DevTools", "Announcing strategic partnership with Zack Jackson, the Module Federation inventor", "Implementing WebSockets plugin for NativeScript using React Native", "TagTide library: make your HTML editor-friendly and more", "Diving into seeking issue with MP3 files", "Performance Testing via Artillery.io", "ARC – a new weapon against accessibility bugs", "Setting up your project on GCP fast using Terraform and Kubernetes", "ngx-bootstrap v7.0.0 is officially released!", "How to deploy Firebase Preview Channels on Travis CI", "Scully Helped us Reach a 99 Lighthouse Score for a B2C Platform", "Designing Aggregator App from A to Z – Part 2", "Designing Aggregator App from A to Z — Part 1", "Multi-highlighting for DraftJS", "New year, new Valor, new you", "Incorporating user research on live projects — Part 4", "Incorporating user research on live projects — Part 3", "Incorporating user research on live projects — Part 2", "Incorporating user research on live projects — Part 1", "Why you might want to switch to Time and Material from Fixed Price", "Cross-Site Scripting (XSS): a QA Engineer's Guide", "Career Path for a Flat-structured company", "JSON Web Token Authorization with Access and Refresh Tokens in Angular Application with Node.js Server", "Testing iOS App Vulnerabilities with Jailbreaking. Part 1.", "Benefits of Agile to Business and Team", "Valor Software Named Top Development Company in Ukraine by Clutch", "Testing with Protractor: how to fix synchronization issues", "Hacktoberfest 2019 is coming, and ngx-bootstrap strives for your attention!", "The 4 biggest lessons we learned while building a startup product as an outsource company", "Angular and SEO: Structured Data for Rich Snippets", "ngx-bootstrap: Angular Ivy is here", "Webflow custom code snippets you would use. Episode 1", "Testing Canvas could be easier", "Case study of Applitools or not only Cypress cross-browser testing", "Figma as a presentation tool: Unifying templates", "Cypress testing: Running tests in parallel", "Quality Assured: What It Really Takes To Test Open Source Libraries", "Figma Vs Sketch: Text alignment comparison", "Como o Scully nos ajudou a atingir 99 pontos no Lighthouse para uma plataforma B2C"];
3-
const orderNumberForNextArticle = 41;
3+
const orderNumberForNextArticle = 42;

apps/valor-software-site/src/assets/articles/nx-next-js-and-module-federation/nx-next-js-and-module-federation.html

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<div id="toc" class="toc">
22
<div id="toctitle">Table of Contents</div>
3-
<ul class="sectlevel1">
4-
<li><a href="#_nx_next_js_and_module_federation">Nx, Next.js, and Module Federation</a>
53
<ul class="sectlevel2">
6-
<li><a href="#_table_of_contents">Table of Contents</a></li>
74
<li><a href="#_micro_frontends">Micro Frontends</a></li>
85
<li><a href="#_nx_and_monorepos">Nx and monorepos</a></li>
96
<li><a href="#_next_js">Next.js</a></li>
@@ -22,15 +19,6 @@
2219
<li><a href="#_private_dependencies_with_vercel">Private dependencies with Vercel</a></li>
2320
<li><a href="#_references">References</a></li>
2421
</ul>
25-
</li>
26-
</ul>
27-
</div>
28-
<div class="sect1">
29-
<h2 id="_nx_next_js_and_module_federation">Nx, Next.js, and Module Federation</h2>
30-
<div class="sectionbody">
31-
<div class="sect2">
32-
<h3 id="_table_of_contents">Table of Contents</h3>
33-
3422
</div>
3523
<div class="sect2">
3624
<h3 id="_micro_frontends">Micro Frontends</h3>
@@ -143,7 +131,7 @@ <h3 id="_next_js_module_federation">Next.js + Module Federation</h3>
143131
<p>Unfortunately, implementing and using the Module Federation features of Webpack with Next.js is not that easy, as you would need to deeply understand how both tools work to be able to create a solution that facilitates the integration between the two. Fortunately, there is already a solution and has several features including support for SSR (server-side rendering), these tools are called <a href="https://app.privjs.com/package?pkg=@module-federation/nextjs-mf" target="_blank" rel="noopener">nextjs-mf</a> and <a href="https://app.privjs.com/package?pkg=@module-federation/nextjs-ssr" target="_blank" rel="noopener">nextjs-ssr</a> and together we are going to explore a proof-of-concept application that I created to show you the power of these tools together.</p>
144132
</div>
145133
<div class="paragraph">
146-
<p>*⚠️ Attention: for the application to work with Module Federation features you need to have access to the <a href="https://app.privjs.com/package?pkg=@module-federation/nextjs-mf" target="_blank" rel="noopener">nextjs-mf</a> or <a href="https://app.privjs.com/package?pkg=@module-federation/nextjs-ssr" target="_blank" rel="noopener">nextjs-ssr</a> plugin which currently requires a paid license!</p>
134+
<p>⚠️ Attention: for the application to work with Module Federation features you need to have access to the <a href="https://app.privjs.com/package?pkg=@module-federation/nextjs-mf" target="_blank" rel="noopener">nextjs-mf</a> or <a href="https://app.privjs.com/package?pkg=@module-federation/nextjs-ssr" target="_blank" rel="noopener">nextjs-ssr</a> plugin which currently requires a paid license!</p>
147135
</div>
148136
</div>
149137
<div class="sect2">
@@ -210,7 +198,7 @@ <h3 id="_starting_the_project">Starting the project</h3>
210198
</div>
211199
</div>
212200
<div class="paragraph">
213-
<p>Note that our application in Next.js is inside the "apps" folder, this folder will contain all the other applications you are going to create, we can also see other configuration files of our workspace. It is important to note that there is only one "node_modules" folder in the entire project, this happens because all dependencies will be in one place, at the root of the repository.</p>
201+
<p>ℹ️ Note that our application in Next.js is inside the "apps" folder, this folder will contain all the other applications you are going to create, we can also see other configuration files of our workspace. It is important to note that there is only one "node_modules" folder in the entire project, this happens because all dependencies will be in one place, at the root of the repository.</p>
214202
</div>
215203
</div>
216204
<div class="sect2">
@@ -226,10 +214,8 @@ <h3 id="_generating_new_pages">Generating new pages</h3>
226214
<pre>nx g @nrwl/next:page home --project=store</pre>
227215
</div>
228216
</div>
229-
<div class="listingblock">
230-
<div class="content">
231-
<pre>ℹ️ Note that we use the --project flag to indicate to the generator in which project the new page should be created.</pre>
232-
</div>
217+
<div class="paragraph">
218+
<p>ℹ️ Note that we use the --project flag to indicate to the generator in which project the new page should be created.</p>
233219
</div>
234220
<div class="paragraph">
235221
<p>This will generate a page called "home" which will be located at</p>
@@ -274,10 +260,8 @@ <h3 id="_running_in_the_development_environment">Running in the development envi
274260
<pre>nx serve store</pre>
275261
</div>
276262
</div>
277-
<div class="listingblock">
278-
<div class="content">
279-
<pre>ℹ️ serve is an https://nx.dev/packages/next#executors[executor^] command</pre>
280-
</div>
263+
<div class="paragraph">
264+
<p>ℹ️ serve is an <a href="https://nx.dev/packages/next#executors" target="_blank" rel="noopener">executor</a> command</p>
281265
</div>
282266
<div class="paragraph">
283267
<p>Also, we can run all applications at the same time using:</p>
@@ -287,10 +271,8 @@ <h3 id="_running_in_the_development_environment">Running in the development envi
287271
<pre>nx run-many --target=serve --all</pre>
288272
</div>
289273
</div>
290-
<div class="listingblock">
291-
<div class="content">
292-
<pre>ℹ️ Note that we use the --target flag to indicate to nx which executor we want to run on all projects.</pre>
293-
</div>
274+
<div class="paragraph">
275+
<p>ℹ️ Note that we use the --target flag to indicate to nx which executor we want to run on all projects.</p>
294276
</div>
295277
</div>
296278
<div class="sect2">
@@ -736,6 +718,4 @@ <h3 id="_references">References</h3>
736718
</li>
737719
</ul>
738720
</div>
739-
</div>
740-
</div>
741721
</div>
78.5 KB
Loading
344 KB
Loading
67.1 KB
Loading
79.8 KB
Loading
50.1 KB
Loading
26 KB
Loading
5.53 KB
Loading

0 commit comments

Comments
 (0)