Skip to content

Commit f118b11

Browse files
Merge pull request #158 from valor-software/feat-add-to-articles-list
feat(articles): add new article to articles(blog) list
2 parents 53d23c1 + ba2f39f commit f118b11

18 files changed

Lines changed: 163 additions & 15 deletions

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

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const Asciidoctor = require('asciidoctor');
99
const asciidoctor = Asciidoctor();
1010
const articlesList = new Set();
1111
const articleOrder = new Set();
12+
const cleanArticleListTitle = new Set();
1213
const articlesFolderPath = path.resolve(process.cwd(), 'assets/articles');
1314

1415
(async () => {
@@ -26,9 +27,7 @@ const articlesFolderPath = path.resolve(process.cwd(), 'assets/articles');
2627
convertDocAttributes.push('toc');
2728
}
2829
const htmlContent = await asciidoctor.convert(content, {attributes: convertDocAttributes});
29-
if (!fs.existsSync(`apps/valor-software-site/src/assets/articles/${dirName}`)) {
30-
await fs.mkdir(`apps/valor-software-site/src/assets/articles/${dirName}`).catch(() => {return;});
31-
}
30+
await functionCreateFolderIfNotExist(dirName);
3231

3332
await fs.writeFile(`apps/valor-software-site/src/assets/articles/${dirName}/${dirName}.html`, htmlContent, 'utf-8');
3433
}
@@ -41,17 +40,13 @@ const articlesFolderPath = path.resolve(process.cwd(), 'assets/articles');
4140
order: jsonData.order,
4241
title: jsonData.title
4342
});
44-
if (!fs.existsSync(`apps/valor-software-site/src/assets/articles/${dirName}`)) {
45-
await fs.mkdir(`apps/valor-software-site/src/assets/articles/${dirName}`).catch(() => {return;});
46-
}
43+
await functionCreateFolderIfNotExist(dirName);
4744

4845
await fs.copyFile(`${articlesFolderPath}/${folder.name}/${file.name}`, `apps/valor-software-site/src/assets/articles/${dirName}/${dirName}.json`);
4946
}
5047

5148
if (extension !== 'adoc' && extension !== 'html' && extension !== 'json') {
52-
if (!fs.existsSync(`apps/valor-software-site/src/assets/articles/${dirName}`)) {
53-
await fs.mkdir(`apps/valor-software-site/src/assets/articles/${dirName}`).catch(() => {return;});
54-
}
49+
await functionCreateFolderIfNotExist(dirName);
5550

5651
await fs.copyFile(`${articlesFolderPath}/${folder.name}/${file.name}`, `apps/valor-software-site/src/assets/articles/${dirName}/${file.name}`);
5752
}
@@ -71,6 +66,10 @@ const articlesFolderPath = path.resolve(process.cwd(), 'assets/articles');
7166
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
7267
// @ts-ignore
7368
titleList.add(article.title);
69+
70+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
71+
// @ts-ignore
72+
cleanArticleListTitle.add(titleRefactoring(article.title));
7473
});
7574
await Promise.all(artList);
7675
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -81,4 +80,27 @@ const articlesFolderPath = path.resolve(process.cwd(), 'assets/articles');
8180
const titleText = [...titleList].map(JSON.stringify).reduce((prev, next) => `${prev}, ${next}`);
8281
const arrContent = `export const articlesRefactoringTitlesList = [${text}];\nexport const articlesList = [${titleText}];\nconst orderNumberForNextArticle = ${artList.length + 1};`;
8382
fs.writeFileSync(`apps/valor-software-site/src/assets/articles/articlesList.ts`, arrContent, 'utf-8');
83+
84+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
85+
// @ts-ignore
86+
const cleanTitle = [...cleanArticleListTitle].map(JSON.stringify).reduce((prev, next) => `${prev}, ${next}`);
87+
const cleanArticleContent = `export const articlesRefactoringTitlesList = [${cleanTitle}];\nexport const articlesList = [${titleText}];\nconst orderNumberForNextArticle = ${artList.length + 1};`;
88+
fs.writeFileSync(`assets/articles/articlesList.ts`, cleanArticleContent, 'utf-8');
89+
8490
})();
91+
92+
function titleRefactoring(title: string): string {
93+
let res = title.replace(/[^a-zA-Z 0-9'-]/gm, "-");
94+
res = res.replace(/[\s*]/gm, "-");
95+
res = res.replace(/()--*/gm, "-");
96+
res = res.replace(/'/gm, "");
97+
res = res.replace(/\/-/gm, "");
98+
res = res.replace(/-*$/gm, "");
99+
return res.toLowerCase();
100+
}
101+
102+
async function functionCreateFolderIfNotExist(dirName: string) {
103+
if (!fs.existsSync(`apps/valor-software-site/src/assets/articles/${dirName}`)) {
104+
await fs.mkdir(`apps/valor-software-site/src/assets/articles/${dirName}`).catch(() => { return; });
105+
}
106+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
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"];
2-
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 = 42;
1+
export const articlesRefactoringTitlesList = ["0042-next-js-module-federation-and-module-federation-ssr-plugins-are-being-open-sourced", "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"];
2+
export const articlesList = ["Next.js Module Federation and Module Federation SSR plugins are being open-sourced", "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 = 43;
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
= Next.js Module Federation and Module Federation SSR plugins are being open-sourced
2+
3+
Seattle, Wa., Sep 6, 2022, https://github.com/scriptedalchemy[Zackary Jackson^], co-creator of https://webpack.js.org/concepts/module-federation/[Webpack Module Federation^], co-author of https://module-federation.myshopify.com/products/practical-module-federation[Practical Module Federation^], and Webpack Core Team member and https://www.linkedin.com/in/zackary-jackson-81845a35/[Principal Engineer at Lululemon^], together with Valor Software as https://valor-software.com/articles/announcing-strategic-partnership-with-zack-jackson-the-module-federation-inventor[exclusive partners^] for Module Federation have open-sourced two plugins as one new Module Federation Package.
4+
5+
image::Next_MF.jpeg[]
6+
7+
Next.js Module Federation brought, for the first time, client-side rendering to federated modules on Next.js. This package was previously available for $40 (USD) on https://app.privjs.com/buy/packageDetail?pkg=@module-federation/nextjs-mf[PrivJS^] with over 92k downloads.
8+
9+
Next.js Module Federation SSR brought server-side rendering, which is significantly more complex, in addition to client-side rendering of federated modules to Next.js. This package was previously available for $100 (USD) on https://app.privjs.com/buy/packageDetail?pkg=@module-federation/nextjs-ssr[PrivJS^] with over 2.5k downloads.
10+
11+
The organizations and individuals who purchased licenses for these packages helped further Zack’s efforts and proved that there is a tangible need for these packages in the community. Their financial support was essential to the incubation of both plugins. Now, with the support of Valor Software as the official partners for the Module Federation organization, Zack is now able to open source.
12+
13+
Under the recommendation and with the assistance of https://github.com/valorkin[Dmitriy Shekhovtsov^] both packages have been moved to be co-located in a Nx workspace along with their sample applications. Additionally, they have been converted to TypeScript for ease of maintenance and open source contribution. +
14+
15+
_“The seed for this decision to open source these two plugins started pretty early in with my conversations with Valor Software, after a few months and additional talks with the leaders at organizations consuming the plugins I agreed that for the greater good of Module Federation, and the development community, the decision to open source is the right one. The main reason why these were closed source and commercial was out of necessity to fund the development of the ecosystem - as the ecosystem has grown and more corporate partners have adopted the technology, I am no longer dependent on the revenue to fund development.”_
16+
17+
There are a very large number of organizations who have already pushed Module Federation to production or are in the process of adopting Module Federation. Organizations wishing to get assistance with their project can use the following https://calendly.com/d/d5d-mch-nby/module-federation-15-min?month=2022-09[calendly link] to schedule a free intro call with Zack Jackson and Valor Software.
18+
19+
For organizations that are still wishing to financially support Module Federation we will be creating an Open Collective page. We appreciate any contributions as they will help us to accelerate the project as a whole.
20+
21+
== About Valor Software: +
22+
Founded in 2013 by https://www.linkedin.com/in/valorkin/[Dmitriy Shekhovtsov^] (Dima) as a MEAN stack software development firm, https://valor-software.com/[Valor^] has evolved into a globally renowned software development and consulting firm with over 130 individuals working on Full Stack development with a primary focus on all things TypeScript from 5 continents.
23+
24+
Media Contact: +
25+
sales@valor-software.com

0 commit comments

Comments
 (0)