<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Javascript on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/javascript/</link>
    <description>Recent content in Javascript on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Fri, 04 Jun 2021 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Writing a React Component Test with Jest and Testing Library</title>
      <link>https://www.hascode.com/writing-a-react-component-test-with-jest-and-testing-library/</link>
      <pubDate>Fri, 04 Jun 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-a-react-component-test-with-jest-and-testing-library/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;render a React component in a test&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;mock HTTP/REST calls to the backend&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;verify results&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;achieve the above using typescript, jest and testing-library&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_application_under_test&#34;&gt;Application under Test&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our application’s shortened &lt;code&gt;package.json&lt;/code&gt;, generated by &lt;a href=&#34;https://create-react-app.dev/docs/getting-started/&#34;&gt;create-react-app&lt;/a&gt;, adding dependencies for …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;jest&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;testing-library&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;typescript&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;react&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;dom implementations (jest-dom/react-dom)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;axios (for the HTTP/REST call)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;package.json&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;{
  [..]
  &amp;#34;dependencies&amp;#34;: {
    &amp;#34;@testing-library/jest-dom&amp;#34;: &amp;#34;^5.11.4&amp;#34;,
    &amp;#34;@testing-library/react&amp;#34;: &amp;#34;^11.1.0&amp;#34;,
    &amp;#34;@testing-library/user-event&amp;#34;: &amp;#34;^12.1.10&amp;#34;,
    &amp;#34;@types/jest&amp;#34;: &amp;#34;^26.0.15&amp;#34;,
    &amp;#34;@types/node&amp;#34;: &amp;#34;^12.0.0&amp;#34;,
    &amp;#34;@types/react&amp;#34;: &amp;#34;^17.0.0&amp;#34;,
    &amp;#34;@types/react-dom&amp;#34;: &amp;#34;^17.0.0&amp;#34;,
    &amp;#34;react&amp;#34;: &amp;#34;^17.0.2&amp;#34;,
    &amp;#34;react-dom&amp;#34;: &amp;#34;^17.0.2&amp;#34;,
    &amp;#34;react-scripts&amp;#34;: &amp;#34;4.0.3&amp;#34;,
    &amp;#34;typescript&amp;#34;: &amp;#34;^4.1.2&amp;#34;,
    &amp;#34;web-vitals&amp;#34;: &amp;#34;^1.0.1&amp;#34;,
    &amp;#34;axios&amp;#34;: &amp;#34;^0.19.0&amp;#34;
  },
  [..]
  &amp;#34;eslintConfig&amp;#34;: {
    &amp;#34;extends&amp;#34;: [
      &amp;#34;react-app&amp;#34;,
      &amp;#34;react-app/jest&amp;#34;
    ]
  },
  [..]
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>AWS Snippets</title>
      <link>https://www.hascode.com/aws-snippets/</link>
      <pubDate>Thu, 01 Mar 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/aws-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_aws_command_line_interface&#34;&gt;AWS Command Line Interface&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_installation&#34;&gt;Installation&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;$ curl &amp;#34;https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.0.30.zip&amp;#34; -o &amp;#34;awscliv2.zip&amp;#34;
unzip awscliv2.zip
sudo ./aws/install&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html&#34;&gt;AWS Documentation&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_rds&#34;&gt;RDS&lt;/h3&gt;
&lt;div class=&#34;sect3&#34;&gt;
&lt;h4 id=&#34;_export_database_configuration&#34;&gt;Export Database Configuration&lt;/h4&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Export instance configuration&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;aws rds describe-db-instances --db-instance-identifier arn:aws:rds:eu-central-1:123456789:db:hascode-prd-db --no-paginate&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Export parameter group configuration&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;aws rds describe-db-parameters --db-parameter-group-name PARAM_GROUP_NAME &amp;gt;&amp;gt; param_group_conf.json&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Export option group configuration&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;aws rds describe-option-groups --option-group-name OPT_GROUP_NAME &amp;gt;&amp;gt; option_group_conf.json&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_generate_signed_urls_with_linux_tools&#34;&gt;Generate Signed URLs with Linux Tools&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. for accessing a website behind a CloudFront distribution using a &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-canned-policy.html&#34;&gt;canned policy&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Write the policy file&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing BDD-Style Webservice Tests with Karate and Java</title>
      <link>https://www.hascode.com/writing-bdd-style-webservice-tests-with-karate-and-java/</link>
      <pubDate>Thu, 06 Apr 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-bdd-style-webservice-tests-with-karate-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is a new testing framework out there called Karate that is build on top of the popular Cucumber framework.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Karate makes it easy to script interactions with out web-services under test and verify the results. In addition it offers us a lot of useful features like parallelization, script/feature re-use, data-tables, JsonPath and XPath support, gherkin syntax, switchable staging-configurations and many others.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’ll be writing different scenarios and features for a real-world RESTful web-service to demonstrate some of its features.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Quick Mobile Application Prototyping with Ionic Creator</title>
      <link>https://www.hascode.com/quick-mobile-application-prototyping-with-ionic-creator/</link>
      <pubDate>Tue, 17 Nov 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/quick-mobile-application-prototyping-with-ionic-creator/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to the field of hybrid mobile application development, Ionic and its tool-stack is often an attractive choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now there is Ionic Creator to speed up the development process offering an in-browser editor to create user interfaces via drag and drop and supporting basic templates for mobile applications like tabbed layouts etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition, a project created with this tool may be downloaded and started with easy and that’s what I’d like to show in the following short example.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Deferred Objects and Promises with Java 8 and JDeferred</title>
      <link>https://www.hascode.com/using-deferred-objects-and-promises-with-java-8-and-jdeferred/</link>
      <pubDate>Sun, 27 Sep 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-deferred-objects-and-promises-with-java-8-and-jdeferred/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Promises may help us when dealing with asynchronous code and we need to merge, pipe or track the progress and the results of single parts of computation in our applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate a small library, JDeferred that helps us for this specific use case.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;jdeferred-example-running-in-eclipse-ide-1024x754.png&#34; alt=&#34;jdeferred example running in eclipse ide 1024x754&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. JDeferred examples running in Eclipse IDE.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven here, we simply need to add one dependency for &lt;em&gt;jdeferred-core&lt;/em&gt; to our &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating and Providing HipChat Integrations with Atlassian Connect, Nodejs and Express</title>
      <link>https://www.hascode.com/creating-and-providing-hipchat-integrations-with-atlassian-connect-nodejs-and-express/</link>
      <pubDate>Tue, 18 Aug 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-and-providing-hipchat-integrations-with-atlassian-connect-nodejs-and-express/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;HipChat is Atlassian’s alternative to Slack and its solution to team collaboration chats. Atlassian Connect offers developer tools to bootstrap applications, connect to Atlassian’s cloud products with easy and in combination with HipChat’s REST APIs allows us to write integrations for such a chat server in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to show how to write an integration within a few steps using Atlassian Connect, Node.js and Express and how to connect the integration to a HipChat server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a hybrid mobile Application with Ionic, Cordova and AngularJS</title>
      <link>https://www.hascode.com/creating-a-hybrid-mobile-application-with-ionic-cordova-and-angularjs/</link>
      <pubDate>Sun, 03 May 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-hybrid-mobile-application-with-ionic-cordova-and-angularjs/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Nowadays in the realm of hybrid mobile application development there is a variety of available frameworks worth having a look at.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate the development life-cycle for a complete mobile application using Ionic, Cordova and AngularJS (and others) covering every step from the initial project setup, creating Angular Controllers, Directives, adding Cordova Plug-Ins, running and testing the application in the browser and emulator up to finally running the application on an Android device and assembling files for a release.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Running JavaScript Tests with Maven, Jasmine and PhantomJS</title>
      <link>https://www.hascode.com/running-javascript-tests-with-maven-jasmine-and-phantomjs/</link>
      <pubDate>Sun, 04 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/running-javascript-tests-with-maven-jasmine-and-phantomjs/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes in a project there is the need to run tests for your client-side code, written in JavaScript from a Maven build.&lt;br/&gt;
One reason might be that Maven manages a complex build life-cycle in your project and you need a close integration for your JavaScript tests, another one might be that you’re in an environment where it is complicated to install and manage additional software like an integration- or build-server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Chat Application using Java EE 7, Websockets and GlassFish 4</title>
      <link>https://www.hascode.com/creating-a-chat-application-using-java-ee-7-websockets-and-glassfish-4/</link>
      <pubDate>Tue, 13 Aug 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-chat-application-using-java-ee-7-websockets-and-glassfish-4/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java EE 7 is out now and so I was curious to play around with the new specifications and APIs from in this technology stack.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I didn’t hesitate to add yet another websocket-chat tutorial to the existing ones on the internet in favour of gathering some experience with this technology and a possible integration using a GlassFish 4 server, the new Java API for JSON Processing for data serialization combined with custom websocket encoders/decoders and finally adding some Bootstrap and jQuery on the client side.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>HTML5 Server Send Events using Node.js or Jetty</title>
      <link>https://www.hascode.com/html5-server-send-events-using-node.js-or-jetty/</link>
      <pubDate>Sun, 21 Oct 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/html5-server-send-events-using-node.js-or-jetty/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The HTML5 working draft describes different techniques to push information from a server to the client and the one described in this tutorial are Server-Send Events (SSE).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Server-Send-Events eliminates the need to poll a server periodically for information using AJAX and is really easy to implement because of the simple specification and the fact that nearly all modern browsers already implement this specification.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_client_side&#34;&gt;The Client Side&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Registering for Server Send Events (SSE) is quite easy .. simply create a new &lt;em&gt;EventSource&lt;/em&gt; object that is bound to the URL where the events are propagated.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Video Manipulation using HTML 5 and Javascript</title>
      <link>https://www.hascode.com/video-manipulation-using-html-5-and-javascript/</link>
      <pubDate>Sun, 05 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/video-manipulation-using-html-5-and-javascript/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Some funny stuff can be done using HTML 5, canvas elements and the video events API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following example we’re using these techniques to apply graphic effects to a video embedded in a HTML page..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_goal&#34;&gt;The Goal&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Please take a look at the following &lt;a href=&#34;http://www.youtube.com/v/ng9bWUgj0UQ&#34;&gt;screencast on YouTube&lt;/a&gt; to get an idea of what the final example looks like or just take a look at the &lt;a href=&#34;http://app.hascode.com/html5-video-manipulation/index.html&#34;&gt;demo page&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As you can see a video is rendered and a clone is displayed with a strange swirl effect applied.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Compiling CoffeeScript with Maven</title>
      <link>https://www.hascode.com/compiling-coffeescript-with-maven/</link>
      <pubDate>Fri, 18 May 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/compiling-coffeescript-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;CoffeeScript is a neat language that is transcompiled into JavaScript but is more predictable and allows to write the same code with 1/3 fewer lines and of course with a (imho) nicer syntax.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;CoffeeScript is nice but a vivid integration into our application build lifecycle with Maven is better and that is what the following example is all about.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_dependencies&#34;&gt;Maven Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though there are some alternatives, we’re using &lt;strong&gt;brew&lt;/strong&gt; here so please add the following dependency to your Maven project:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JavaScript Snippets</title>
      <link>https://www.hascode.com/javascript-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/javascript-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_nodejs_module&#34;&gt;Creating a Nodejs Module&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_1_create_a_package_json_using_npm_init&#34;&gt;1) Create a package.json using npm init&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;$ npm init&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This utility will walk you through creating a &lt;code&gt;package.json&lt;/code&gt; file.
It only covers the most common items, and tries to guess sane defaults.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;See &lt;code&gt;npm help json&lt;/code&gt; for definitive documentation on these fields
and exactly what they do.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use &lt;code&gt;npm install &amp;lt;pkg&amp;gt; --save&lt;/code&gt; afterwards to install a package and
save it as a dependency in the package.json file.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
