{"id":18144,"date":"2024-04-18T14:04:17","date_gmt":"2024-04-18T21:04:17","guid":{"rendered":"https:\/\/ioflood.com\/blog\/?p=18144"},"modified":"2024-04-18T14:04:17","modified_gmt":"2024-04-18T21:04:17","slug":"npm-build","status":"publish","type":"post","link":"https:\/\/ioflood.com\/blog\/npm-build\/","title":{"rendered":"Creating NPM Build Scripts | Node.js Developer&#8217;s Guide"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/ioflood.com\/blog\/wp-content\/uploads\/2024\/04\/Graphic-of-a-construction-site-with-digital-building-blocks-and-a-blueprint-representing-the-npm-build-command-300x300.jpg\" alt=\"Graphic of a construction site with digital building blocks and a blueprint representing the npm build command\" width=\"300\" height=\"300\" title=\"\"><\/figure>\n<\/div>\n<p>While working on Node.js servers At IOFLOOD, I&#8217;ve had to go through the tedious process of writing build scripts by hand. Over time I have been able implement optimized and automated build procedures as a common practice. To assist others facing similar challenges, I&#8217;ve crafted this comprehensive guide on npm build scripts! By delving into this guide, you&#8217;ll be able to handle tasks like compiling source code and optimizing assets with ease.<\/p>\n<p><strong>This guide will take you through the journey of mastering npm build<\/strong>, from understanding its basic usage to exploring advanced features and best practices. Whether you&#8217;re a beginner looking to automate your build process or an experienced developer aiming to optimize your workflow, this guide has something for everyone.<\/p>\n<p>Let&#8217;s simplify project building together!<\/p>\n<h2>TL;DR: What is an npm Build Script?<\/h2>\n<blockquote><p>\n  <code>npm build<\/code> runs a script defined in your project&#8217;s <code>package.json<\/code> file. You can create a <code>package.json<\/code> file by running <code>npm init<\/code>. You can trigger your scripts with the command, <code>npm run build<\/code>. Build scripts are typically used for compiling code or generating build artifacts.\n<\/p><\/blockquote>\n<p>Here&#8217;s a quick example of a build script:<\/p>\n<pre><code class=\"language-json line-numbers\">\"scripts\": {\n  \"build\": \"tsc &amp;&amp; webpack\"\n}\n\n# Output:\n# Successfully compiled TypeScript files and bundled assets with Webpack.\n<\/code><\/pre>\n<p>Running <code>npm run build<\/code> executes the defined command, compiling TypeScript files and bundling assets with Webpack.<\/p>\n<p>In this example, we&#8217;ve defined a <code>build<\/code> script in the <code>package.json<\/code> that uses TypeScript compiler (<code>tsc<\/code>) and Webpack for bundling. When you run <code>npm run build<\/code>, it triggers the compilation of TypeScript files into JavaScript and then bundles them along with other assets using Webpack, preparing your project for production deployment.<\/p>\n<blockquote><p>\n  Eager to master npm build and streamline your development process? Keep reading for a comprehensive guide on npm build&#8217;s capabilities and best practices.\n<\/p><\/blockquote>\n<h2>Automating Builds with npm<\/h2>\n<p>When you&#8217;re starting your journey in Node.js development, one of the first tools you&#8217;ll encounter is npm, the Node Package Manager. It&#8217;s not just for installing packages; it can also automate your build process, making your development workflow more efficient and reliable.<\/p>\n<h3>Creating a Simple Build Script<\/h3>\n<p>A build script in your <code>package.json<\/code> file tells npm how to compile and prepare your project for production. Let&#8217;s create a basic script that compiles Sass files into CSS, making your styles ready for the web.<\/p>\n<p>First, ensure you have a <code>package.json<\/code> in your project. If not, create one by running <code>npm init<\/code> and follow the prompts. Next, install the necessary package for compiling Sass:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install node-sass --save-dev\n<\/code><\/pre>\n<p>Now, add the following build script in your <code>package.json<\/code>:<\/p>\n<pre><code class=\"language-json line-numbers\">\"scripts\": {\n  \"build-css\": \"node-sass --output-style compressed -o dist\/css src\/sass\"\n}\n<\/code><\/pre>\n<p>To execute this script, run:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm run build-css\n\n# Output:\n# Compiled and compressed CSS in 'dist\/css' directory.\n<\/code><\/pre>\n<p>This command compiles your Sass files located in <code>src\/sass<\/code> into compressed CSS files in the <code>dist\/css<\/code> directory. By automating this process, you save time and reduce the chance for errors, ensuring that your styles are consistently prepared for production.<\/p>\n<h3>The Power of npm Scripts<\/h3>\n<p>The beauty of npm scripts is their simplicity and flexibility. With just a few lines in your <code>package.json<\/code>, you can automate a wide range of development tasks, from compiling code to deploying projects. This example is just the beginning. As you become more comfortable with npm, you&#8217;ll discover its full potential in streamlining your development workflow.<\/p>\n<h2>Elevating Your Build Process<\/h2>\n<p>As you become more comfortable with npm and its capabilities, it&#8217;s time to explore how you can leverage npm scripts for more complex build scenarios. This involves diving into advanced script configurations, parallel execution, and integrating npm with other powerful tools like Babel and Webpack.<\/p>\n<h3>Parallel Execution with npm<\/h3>\n<p>One way to speed up your build process is by running tasks in parallel. npm does not have built-in support for parallel execution, but you can achieve this by using the <code>npm-run-all<\/code> package.<\/p>\n<p>First, install <code>npm-run-all<\/code>:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install npm-run-all --save-dev\n<\/code><\/pre>\n<p>Then, suppose you have separate scripts for building CSS and JavaScript. You can modify your <code>package.json<\/code> to run these tasks in parallel:<\/p>\n<pre><code class=\"language-json line-numbers\">\"scripts\": {\n  \"build-css\": \"node-sass src\/styles -o dist\/styles\",\n  \"build-js\": \"webpack --config webpack.config.js\",\n  \"build\": \"npm-run-all --parallel build-css build-js\"\n}\n<\/code><\/pre>\n<p>Running <code>npm run build<\/code> will now execute both the <code>build-css<\/code> and <code>build-js<\/code> scripts at the same time, significantly reducing your build time.<\/p>\n<h3>Environment-Specific Builds<\/h3>\n<p>Tailoring your build process to different environments (e.g., development, testing, production) can enhance your workflow. Here&#8217;s how you can set up environment-specific builds using npm scripts.<\/p>\n<p>First, install <code>cross-env<\/code> to easily set environment variables across platforms:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install cross-env --save-dev\n<\/code><\/pre>\n<p>Then, adjust your <code>package.json<\/code> to include environment-specific build commands:<\/p>\n<pre><code class=\"language-json line-numbers\">\"scripts\": {\n  \"build:dev\": \"cross-env NODE_ENV=development webpack --config webpack.config.dev.js\",\n  \"build:prod\": \"cross-env NODE_ENV=production webpack --config webpack.config.prod.js\"\n}\n<\/code><\/pre>\n<p>By running <code>npm run build:dev<\/code> or <code>npm run build:prod<\/code>, you can ensure that your project is built using the appropriate settings for the target environment.<\/p>\n<h3>Integrating with Babel and Webpack<\/h3>\n<p>For projects that require transpiling ES6 or beyond, integrating Babel with your npm build process is essential. Similarly, Webpack can be used to bundle your modules and assets. Here&#8217;s a simplified setup:<\/p>\n<p>First, ensure you have Babel and Webpack installed:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install babel-loader webpack --save-dev\n<\/code><\/pre>\n<p>Then, in your <code>webpack.config.js<\/code>, include the Babel loader:<\/p>\n<pre><code class=\"language-javascript line-numbers\">module: {\n  rules: [\n    {\n      test: \/\\.js$\/,\n      exclude: \/node_modules\/,\n      use: {\n        loader: 'babel-loader',\n        options: {\n          presets: ['@babel\/preset-env']\n        }\n      }\n    }\n  ]\n}\n<\/code><\/pre>\n<p>This configuration tells Webpack to use Babel for transpiling JavaScript files, ensuring your code is compatible across browsers. By integrating these tools into your npm build process, you can handle a wide range of development tasks, from transpiling and bundling to minifying and optimizing your code.<\/p>\n<h2>Exploring Beyond npm Build<\/h2>\n<p>While <code>npm build<\/code> is a powerful tool in the Node.js ecosystem, there are scenarios where alternative tools and scripts might better suit your project&#8217;s needs. Let&#8217;s explore some of these alternatives, such as Gulp and Grunt, and understand how they can complement or replace your npm build process.<\/p>\n<h3>Gulp: Streamlined Workflows<\/h3>\n<p>Gulp is a popular task runner that uses Node.js streams for fast builds. It allows you to code your tasks in JavaScript, providing a high level of customization.<\/p>\n<p>Here&#8217;s a basic example of a Gulp task to minify JavaScript files:<\/p>\n<pre><code class=\"language-javascript line-numbers\">const gulp = require('gulp');\nconst uglify = require('gulp-uglify');\nconst rename = require('gulp-rename');\n\ngulp.task('minify-js', function () {\n  return gulp.src('src\/js\/**\/*.js')\n    .pipe(uglify())\n    .pipe(rename({ extname: '.min.js' }))\n    .pipe(gulp.dest('dist\/js'));\n});\n\n# Output:\n# Minified and renamed JS files in 'dist\/js'.\n<\/code><\/pre>\n<p>This Gulp task searches for JavaScript files in <code>src\/js<\/code>, minifies them using <code>gulp-uglify<\/code>, renames the output files to include <code>.min.js<\/code>, and saves them in <code>dist\/js<\/code>. Gulp&#8217;s use of streams ensures this process is both fast and efficient.<\/p>\n<h3>Grunt: Configuration Over Code<\/h3>\n<p>Grunt is another task runner that emphasizes configuration over code. It uses a JSON-like file to define and manage tasks. This can make Grunt easier to grasp for those less familiar with programming.<\/p>\n<p>Here&#8217;s how you could set up a Grunt task to lint JavaScript files:<\/p>\n<pre><code class=\"language-javascript line-numbers\">module.exports = function(grunt) {\n  grunt.initConfig({\n    jshint: {\n      files: ['src\/**\/*.js'],\n      options: {\n        esversion: 6\n      }\n    }\n  });\n\n  grunt.loadNpmTasks('grunt-contrib-jshint');\n  grunt.registerTask('default', ['jshint']);\n};\n\n# Output:\n# Linted JS files, with potential issues logged.\n<\/code><\/pre>\n<p>This configuration lints all JavaScript files in the <code>src<\/code> directory, ensuring they adhere to the specified standards. It&#8217;s a simple yet powerful way to maintain code quality.<\/p>\n<h3>Choosing the Right Tool<\/h3>\n<p>Both Gulp and Grunt offer unique advantages and can be powerful alternatives or complements to npm scripts. The choice between them depends on your project&#8217;s specific needs and your comfort level with JavaScript coding versus configuration. In some cases, combining npm scripts with these tools can provide the best of both worlds, leveraging the simplicity of npm with the power and flexibility of Gulp or Grunt.<\/p>\n<h2>Navigating npm Build Issues<\/h2>\n<p>Even the most seasoned developers encounter bumps along the way when dealing with build scripts. Understanding how to troubleshoot common problems with <code>npm build<\/code> can save you time and frustration. Let&#8217;s dive into some typical issues and how to resolve them.<\/p>\n<h3>Dealing with Script Failures<\/h3>\n<p>Script failures are a common headache. Often, they stem from missing dependencies or syntax errors in your build scripts. Here&#8217;s how you can diagnose a failing script:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm run build\n\n# Output:\n# Error: Cannot find module 'some-module'\n<\/code><\/pre>\n<p>In this example, the build fails because a required module is missing. The solution is straightforward: install the missing module using npm.<\/p>\n<pre><code class=\"language-bash line-numbers\">npm install some-module --save-dev\n<\/code><\/pre>\n<p>After installing the missing dependency, running your build script should no longer throw the error. This example underscores the importance of ensuring all required modules are installed before executing your build scripts.<\/p>\n<h3>Solving Dependency Problems<\/h3>\n<p>Dependency issues can also manifest as version conflicts or corrupted package installations. If you&#8217;re encountering strange errors and suspect a dependency issue, try clearing npm&#8217;s cache and reinstalling your packages:<\/p>\n<pre><code class=\"language-bash line-numbers\">npm cache verify\nnpm install\n<\/code><\/pre>\n<p>This process will verify the cache&#8217;s integrity and reinstall all project dependencies, potentially resolving any conflicts or corruptions.<\/p>\n<h3>Overcoming Performance Bottlenecks<\/h3>\n<p>As projects grow, build times can increase, leading to productivity bottlenecks. One way to address this is by optimizing your build scripts. For instance, consider using the <code>--parallel<\/code> flag with <code>npm-run-all<\/code> to run multiple tasks simultaneously, as shown in the Advanced Use section.<\/p>\n<p>Another approach is to minimize the work done by each build. For example, you can use incremental builds with tools like Webpack to only rebuild parts of your application that have changed since the last build:<\/p>\n<pre><code class=\"language-javascript line-numbers\">module.exports = {\n  watch: true,\n  \/\/ Other Webpack configuration...\n};\n\n# Output:\n# Webpack now rebuilds only changed modules.\n<\/code><\/pre>\n<p>This Webpack configuration enables the <code>watch<\/code> mode, which monitors your files for changes and only rebuilds the necessary parts, significantly reducing build times for large projects.<\/p>\n<h3>Best Practices for Scalable Builds<\/h3>\n<p>To maintain scalable and efficient build scripts, adhere to the following best practices:<\/p>\n<ul>\n<li><strong>Modularize your build scripts<\/strong> to keep them manageable as your project grows.<\/li>\n<li><strong>Use environment variables<\/strong> to customize builds for different environments without changing the script.<\/li>\n<li><strong>Regularly update dependencies<\/strong> to leverage performance improvements and bug fixes.<\/li>\n<\/ul>\n<p>By anticipating common issues and employing best practices, you can ensure your npm build process is both robust and efficient, paving the way for smooth and successful project development.<\/p>\n<h2>The Bedrock of npm Build<\/h2>\n<p>In the vast landscape of web development, understanding the foundation upon which tools like <code>npm build<\/code> stand is crucial. This section delves into the essentials of build processes, the pivotal role of npm in the JavaScript ecosystem, and how <code>npm build<\/code> seamlessly integrates into the fabric of software development.<\/p>\n<h3>Why Build Scripts Matter<\/h3>\n<p>At its core, a build process involves compiling source code into a format that can be executed by a computer. In the context of web development, this often means transforming new JavaScript syntax and features into versions compatible with a wider range of browsers, minifying code to reduce file sizes, and bundling various modules together.<\/p>\n<pre><code class=\"language-bash line-numbers\">npm run build\n\n# Output:\n# Bundled and optimized project files.\n<\/code><\/pre>\n<p>In this example, <code>npm run build<\/code> might be a command that triggers a series of tasks such as transpilation, minification, and bundling. The output indicates a successful transformation of the project files into an optimized version ready for production. This process is vital for enhancing performance, ensuring compatibility, and improving the overall user experience.<\/p>\n<h3>npm&#8217;s Role in JavaScript Development<\/h3>\n<p>npm, or Node Package Manager, is more than just a tool for installing packages. It&#8217;s a cornerstone of the JavaScript community, providing a vast repository of libraries and tools, and a powerful script runner that can automate almost any task in your development workflow.<\/p>\n<pre><code class=\"language-json line-numbers\">\"scripts\": {\n  \"build\": \"webpack --mode production\"\n}\n<\/code><\/pre>\n<p>Here, the <code>build<\/code> script in <code>package.json<\/code> uses Webpack to bundle JavaScript modules for production. This is a glimpse into how npm scripts can simplify complex tasks into single commands, making your development process more efficient.<\/p>\n<h3>Integrating npm Build into Software Development<\/h3>\n<p><code>npm build<\/code> isn&#8217;t just a standalone command; it&#8217;s part of a larger ecosystem that includes continuous integration\/continuous deployment (CI\/CD) pipelines, automated testing, and more. It fits into the broader picture by providing a standardized way to execute build tasks, ensuring that software is consistently compiled and tested across different environments and stages of development.<\/p>\n<p>Understanding these fundamentals not only enriches your knowledge but also empowers you to leverage <code>npm build<\/code> and related tools to their fullest potential, streamlining your development process and elevating the quality of your projects.<\/p>\n<h2>Expanding npm Build&#8217;s Horizons<\/h2>\n<p>As developers, understanding the tools at our disposal only marks the beginning of our journey. <code>npm build<\/code> is a powerful ally in the realm of Node.js development, but its true potential is unlocked when integrated with broader development practices such as Continuous Integration\/Continuous Deployment (CI\/CD) pipelines, automated testing, and sophisticated deployment strategies.<\/p>\n<h3>CI\/CD Pipelines and npm<\/h3>\n<p>Continuous Integration and Continuous Deployment (CI\/CD) pipelines are crucial for modern software development practices. They ensure that your code is automatically tested and deployed, making the entire software development lifecycle smoother and more efficient.<\/p>\n<p>Integrating <code>npm build<\/code> into your CI\/CD pipeline can be as simple as adding a step in your pipeline configuration that executes the build script:<\/p>\n<pre><code class=\"language-yaml line-numbers\">steps:\n  - label: 'Build'\n    command: 'npm run build'\n\n# Output:\n# Successful execution indicates your project is built and ready for the next pipeline stage.\n<\/code><\/pre>\n<p>In this example, the CI\/CD pipeline executes <code>npm run build<\/code> as part of its steps, ensuring that the code is compiled and bundled according to the project&#8217;s requirements before moving on to testing or deployment. This automation reduces manual errors and ensures consistent builds across environments.<\/p>\n<h3>Automated Testing with npm<\/h3>\n<p>Automated testing is another critical aspect of modern web development. <code>npm build<\/code> can be configured to not only compile your code but also to run tests automatically.<\/p>\n<p>For instance, integrating Mocha or Jest for testing your Node.js applications can be achieved with npm scripts:<\/p>\n<pre><code class=\"language-json line-numbers\">\"scripts\": {\n  \"test\": \"mocha || jest\"\n}\n<\/code><\/pre>\n<p>Running <code>npm test<\/code> after your build process ensures that your code meets the quality standards before it&#8217;s deployed, reinforcing the reliability of your application.<\/p>\n<h3>Deployment Strategies<\/h3>\n<p>Deployment is the final step in getting your application to your users. npm can play a role here too, by scripting deployment tasks that can range from simple server restarts to complex multi-stage deployment processes.<\/p>\n<pre><code class=\"language-bash line-numbers\">npm run deploy\n\n# Output:\n# Application successfully deployed to production environment.\n<\/code><\/pre>\n<p>This command might internally handle various tasks such as pushing the build artifacts to a server, restarting services, or even rolling back in case of errors, making the deployment process seamless and automated.<\/p>\n<h3>Further Resources for Mastering npm Build<\/h3>\n<p>To deepen your understanding and mastery of <code>npm build<\/code> and its ecosystem, consider exploring the following resources:<\/p>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/nodejs.org\/en\/docs\/\" target=\"_blank\" rel=\"noopener\">Node.js Official Documentation<\/a>: A comprehensive guide to Node.js, including npm.<\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/webpack.js.org\/guides\/\" target=\"_blank\" rel=\"noopener\">Webpack Official Guide<\/a>: Learn about module bundling and how it integrates with npm scripts.<\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/docs.github.com\/en\/actions\" target=\"_blank\" rel=\"noopener\">CI\/CD with GitHub Actions<\/a>: Discover how to automate your build and deployment processes using GitHub Actions.<\/li>\n<\/ul>\n<p>These resources provide valuable insights and practical knowledge to further enhance your development workflows, making you proficient in not just npm build, but in the broader aspects of web development and deployment strategies.<\/p>\n<h2>Wrapping Up: Mastering npm Build<\/h2>\n<p>In our comprehensive journey, we\u2019ve demystified the <code>npm build<\/code> command, a cornerstone in the Node.js and JavaScript development realms. This exploration has equipped you with the knowledge to leverage npm build for compiling and preparing your projects for production, akin to a master chef meticulously prepping ingredients for a gourmet dish.<\/p>\n<p>We began with the basics, learning how to define and execute a simple build script in your project&#8217;s <code>package.json<\/code>. This foundational skill paves the way for automating your build process, making your development workflow both efficient and scalable.<\/p>\n<p>Venturing further, we delved into advanced configurations and techniques. From parallel execution to environment-specific builds, we explored how to optimize your build process for complex projects. Integrating with tools like Babel and Webpack, we unlocked the potential for a highly customized and powerful build setup.<\/p>\n<p>Beyond the confines of npm build, we investigated alternative tools and scripts that can enhance or replace your npm build process. Understanding the strengths and use cases of Gulp, Grunt, and other build systems empowers you to choose the right tool for your project\u2019s needs.<\/p>\n<table>\n<thead>\n<tr>\n<th>Tool<\/th>\n<th>Use Case<\/th>\n<th>Flexibility<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>npm build<\/td>\n<td>Compiling and bundling<\/td>\n<td>High<\/td>\n<\/tr>\n<tr>\n<td>Gulp<\/td>\n<td>Task running with streams<\/td>\n<td>Very High<\/td>\n<\/tr>\n<tr>\n<td>Grunt<\/td>\n<td>Configuration-based task running<\/td>\n<td>High<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As we wrap up, remember that mastering npm build and its alternatives is more than just about executing commands. It\u2019s about crafting a build process that\u2019s efficient, scalable, and tailored to your project&#8217;s unique requirements. The knowledge and skills you\u2019ve gained are a solid foundation, but the landscape of web development is ever-evolving. Continue to explore, experiment, and enhance your build processes with new tools and practices.<\/p>\n<p>With a well-configured build process, you\u2019re not just preparing code for production. You\u2019re crafting an environment where creativity and efficiency flourish, ensuring your projects stand out in the modern web development landscape. Happy building!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working on Node.js servers At IOFLOOD, I&#8217;ve had to go through the tedious process of writing build scripts by hand. Over time I have been able implement optimized and automated build procedures as a common practice. To assist others facing similar challenges, I&#8217;ve crafted this comprehensive guide on npm build scripts! By delving into [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":19092,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125,155,121],"tags":[],"class_list":["post-18144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-node-js","category-programming-coding","cat-125-id","cat-155-id","cat-121-id","has_thumb"],"_links":{"self":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/18144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/comments?post=18144"}],"version-history":[{"count":7,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/18144\/revisions"}],"predecessor-version":[{"id":19159,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/18144\/revisions\/19159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media\/19092"}],"wp:attachment":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media?parent=18144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/categories?post=18144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/tags?post=18144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}