diff --git a/build.mjs b/build.mjs index 577357e..ff95310 100644 --- a/build.mjs +++ b/build.mjs @@ -1,7 +1,12 @@ import { resolve as pathResolve } from 'path'; import templates from './src/templates.js'; import { init, plugins } from '@twirl/book-builder'; -import { readFileSync, writeFileSync } from 'fs'; +import { readFileSync, writeFileSync, readdirSync, unlinkSync } from 'fs'; + +if (process.argv[2] == '--clean') { + clean(); + process.exit(0); +} const l10n = { en: JSON.parse(readFileSync('./src/en/l10n.json', 'utf-8')), @@ -97,3 +102,12 @@ langsToBuild.forEach((lang) => { }); }); }); + +function clean() { + const tmpDir = pathResolve('.', '.tmp'); + const files = readdirSync(tmpDir); + for (const fileName of files) { + const file = pathResolve(tmpDir, fileName); + unlinkSync(file); + } +} diff --git a/docs/API.en.epub b/docs/API.en.epub index 52b1a22..43a888c 100644 Binary files a/docs/API.en.epub and b/docs/API.en.epub differ diff --git a/docs/API.en.html b/docs/API.en.html index 23f0ae4..3b52288 100644 --- a/docs/API.en.html +++ b/docs/API.en.html @@ -2,11 +2,11 @@ Sergey Konstantinov. The API - + - + @@ -577,7 +577,7 @@ ul.references li p a.back-anchor {
  • -
    +

    @@ -586,8 +586,8 @@ ul.references li p a.back-anchor {

    Sergey Konstantinov. The API.
    yatwirl@gmail.com · linkedin.com/in/twirl · patreon.com/yatwirl

    -

    API-first development is one of the hottest technical topics nowadays since many companies started to realize that API serves as a multiplicator to their opportunities—but it also amplifies the design mistakes as well.

    -

    This book is written to share the expertise and describe the best practices in designing and developing APIs. It comprises six sections dedicated to:

    +

    API-first development is one of the hottest technical topics nowadays since many companies have started to realize that APIs serves as a multiplier to their opportunities — but it amplifies the design mistakes as well.

    +

    This book is written to share expertise and describe best practices in designing and developing APIs. It comprises six sections dedicated to the following topics:

    Share: · · ·

    +
    -

    API-first development is one of the hottest technical topics nowadays since many companies started to realize that API serves as a multiplicator to their opportunities—but it also amplifies the design mistakes as well.

    -

    This book is written to share the expertise and describe the best practices in designing and developing APIs. It comprises six sections dedicated to:

    +

    API-first development is one of the hottest technical topics nowadays since many companies have started to realize that APIs serves as a multiplier to their opportunities — but it amplifies the design mistakes as well.

    +

    This book is written to share expertise and describe best practices in designing and developing APIs. It comprises six sections dedicated to the following topics:

    • — The API design
    • — API patterns
    • — Backward compatibility
    • @@ -79,7 +79,7 @@
  • -

    [Work in Progress] Section II. The API Patterns

    +

    Section II. The API Patterns

    • Chapter 15. On Design Patterns in the API Context
    • Chapter 16. Authenticating Partners and Authorizing API Calls
    • @@ -159,9 +159,9 @@
      -

      Sergey Konstantinov has been working with APIs for more than a decade. He started his career as a software engineer in the Maps API division at Yandex and eventually became the head of the service, being responsible for both technical architecture and product management.

      -

      During this tenure, Sergey got a unique experience in building world-class APIs with a daily audience of tens of millions, planning roadmaps for such a service, and giving numerous public speeches. He also worked for a year and a half as a member of the W3C Technical Architecture Group.

      -

      After nine years in Maps, Sergey switched to technical-lead roles in other departments and companies, leading integration efforts and being responsible for the technical architecture of entire business units. Today, Sergey lives in Tallinn, Estonia, and works as a staff software engineer at Bolt.

      +

      Sergey Konstantinov has been working with APIs for over a decade. He began his career as a software engineer in the Maps API division at Yandex and eventually became the head of the service. In this role, he was responsible for both technical architecture and product management.

      +

      During this tenure, Sergey gained unique experience in building world-class APIs with a daily audience of tens of millions, planning roadmaps for such a service, and delivering numerous public speeches. Additionaly, he served as a member of the W3C Technical Architecture Group for a year and a half.

      +

      After being nine years in Maps, Sergey transitioned to technical lead roles in other departments and companies. In these positions, he led integration efforts and was responsible for the technical architecture of entire business units. Currently, Sergey resides in Tallinn, Estonia, and works as a staff software engineer at Bolt.

      Книгу «API» можно читать по-русски.

      diff --git a/docs/index.ru.html b/docs/index.ru.html index 7729b92..a223faf 100644 --- a/docs/index.ru.html +++ b/docs/index.ru.html @@ -79,7 +79,7 @@
  • -

    [В разработке] Раздел II. Паттерны дизайна API

    +

    Раздел II. Паттерны дизайна API

    • Глава 15. О паттернах проектирования в контексте API
    • Глава 16. Аутентификация партнёров и авторизация вызовов API
    • diff --git a/package.json b/package.json index 87238f6..8871c6c 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,6 @@ "scripts": { "build": "node build.mjs", "build-v1": "node build-v1.mjs", - "build:watch": "nodemon -e md,js,mjs,css,json --exec npm run build ru html" + "build-clean": "node build.mjs --clean" } } diff --git a/src/en/l10n.json b/src/en/l10n.json index 039af4a..e4863f5 100644 --- a/src/en/l10n.json +++ b/src/en/l10n.json @@ -3,7 +3,7 @@ "author": "Sergey Konstantinov", "chapter": "Chapter", "toc": "Table of Contents", - "description": "API-first development is one of the hottest technical topics nowadays since many companies started to realize that API serves as a multiplicator to their opportunities—but it also amplifies the design mistakes as well. This book is written to share the expertise and describe the best practices in designing and developing APIs. It comprises six sections dedicated to: the API design, API patterns, maintaining backward compatibility, HTTP API & REST, SDK and UI libraries, API product management.", + "description": "API-first development is one of the hottest technical topics nowadays since many companies have started to realize that APIs serves as a multiplier to their opportunities — but it amplifies the design mistakes as well. This book is written to share expertise and describe best practices in designing and developing APIs. It comprises six sections dedicated to the following topics: the API design, API patterns, maintaining backward compatibility, HTTP API & REST, SDK and UI libraries, API product management.", "publisher": "Sergey Konstantinov", "copyright": "© Sergey Konstantinov, 2023", "locale": "en_US", @@ -11,9 +11,9 @@ "aboutMe": { "title": "About the Author", "content": [ - "

      Sergey Konstantinov has been working with APIs for more than a decade. He started his career as a software engineer in the Maps API division at Yandex and eventually became the head of the service, being responsible for both technical architecture and product management.

      ", - "

      During this tenure, Sergey got a unique experience in building world-class APIs with a daily audience of tens of millions, planning roadmaps for such a service, and giving numerous public speeches. He also worked for a year and a half as a member of the W3C Technical Architecture Group.

      ", - "

      After nine years in Maps, Sergey switched to technical-lead roles in other departments and companies, leading integration efforts and being responsible for the technical architecture of entire business units. Today, Sergey lives in Tallinn, Estonia, and works as a staff software engineer at Bolt.

      " + "

      Sergey Konstantinov has been working with APIs for over a decade. He began his career as a software engineer in the Maps API division at Yandex and eventually became the head of the service. In this role, he was responsible for both technical architecture and product management.

      ", + "

      During this tenure, Sergey gained unique experience in building world-class APIs with a daily audience of tens of millions, planning roadmaps for such a service, and delivering numerous public speeches. Additionaly, he served as a member of the W3C Technical Architecture Group for a year and a half.

      ", + "

      After being nine years in Maps, Sergey transitioned to technical lead roles in other departments and companies. In these positions, he led integration efforts and was responsible for the technical architecture of entire business units. Currently, Sergey resides in Tallinn, Estonia, and works as a staff software engineer at Bolt.

      " ], "imageCredit": "Photo by Denis Hananein" }, @@ -72,8 +72,8 @@ "title": "The API", "pageTitle": "Front Page", "contents": [ - "

      API-first development is one of the hottest technical topics nowadays since many companies started to realize that API serves as a multiplicator to their opportunities—but it also amplifies the design mistakes as well.

      ", - "

      This book is written to share the expertise and describe the best practices in designing and developing APIs. It comprises six sections dedicated to:

      ", + "

      API-first development is one of the hottest technical topics nowadays since many companies have started to realize that APIs serves as a multiplier to their opportunities — but it amplifies the design mistakes as well.

      ", + "

      This book is written to share expertise and describe best practices in designing and developing APIs. It comprises six sections dedicated to the following topics:

      ", "
      • The API design
      • ", "
      • API patterns
      • ", "
      • Backward compatibility
      • ", @@ -94,8 +94,8 @@ "supportThisWork": "Support this work on", "support": ["patreon", "kindle"], "content": [ - "

        API-first development is one of the hottest technical topics nowadays since many companies started to realize that API serves as a multiplicator to their opportunities—but it also amplifies the design mistakes as well.

        ", - "

        This book is written to share the expertise and describe the best practices in designing and developing APIs. It comprises six sections dedicated to:

        ", + "

        API-first development is one of the hottest technical topics nowadays since many companies have started to realize that APIs serves as a multiplier to their opportunities — but it amplifies the design mistakes as well.

        ", + "

        This book is written to share expertise and describe best practices in designing and developing APIs. It comprises six sections dedicated to the following topics:

        ", "
        • — The API design
        • ", "
        • — API patterns
        • ", "
        • — Backward compatibility
        • ",