How to make Jenkins build NodeJS, Ruby, and Maven on Docker

How To Make Jenkins Build #NodeJS, #Ruby, And #Maven On #Docker  #reactjs #devops

  • Jenkins can speed up repetitive tasks that robots are much better performing and Docker simplifies spinning up VM’s for your application in a very simple and repeatable way.
  • What I’m going to cover here is how to setup your Jenkins server in a Docker container and how to fix some of the limits of the Jenkins official image.
  • While it is nice of Jenkins to offer an official docker image, you’ll quickly run into a few issues if you are doing anything even slightly other than compiling plain Java.
  • For instance, Maven, the popular dependency management tool for Java, is not included in the Docker container.
  • You’ve learned to create a Jenkins Docker-container that’s ready to run jobs for Java, Ruby and NodeJS projects.

Setup your Jenkins server in a Docker container and fix some of the limits of the official image I discovered so you can get up and building faster.
Continue reading “How to make Jenkins build NodeJS, Ruby, and Maven on Docker”

Some tips for getting started with React – DailyJS – Medium

Some tips for getting started with #React – DailyJS – Medium  #ReactJs

  • I initially spent an equal amount of time looking at Angular, Aurelia, React and Vue… but eventually settled on React.This isn’t to say that I think that React is “better” just that it was the best fit for my specific requirements.I’m a great believer in using the right tool for the job, you may have the best hammer in the world — but you shouldn’t try to use it to screw something together.React is a mature library so many best practices have been established, however I found that I didn’t fall into them immediately and had to learn them the hard way.If you’re a newcomer to React (and bear in mind that I’m no expert) you may find this advice useful…Start with “create-react-app”When I started out in the world of Node.js / npm based development I began by building a development environment from scratch.Whilst this was a valuable learning exercise I later found that not only did the “create-react-app” project provide a great starting point but the awesome comments throughout the “react-scripts” project (that you can browse in your node_modules folder or gain access to through ejecting) were incredibly informative.You might find that you don’t keep using it in the long term, but as a playground for getting up and running with React to learn it I don’t think it can be beaten.Keep reading the Official DocumentationThere are loads of great articles, tutorials and blogs out there but I’ve found myself repeatedly going back to the official docs.
  • Fortunately the error messages in React are exceptionally good and lead me straight back to the right page in the documentation that explained and solved the problem.Set state with a function, not an objectI’ve seen this recently in blogs and tweets.
  • Although it’s not caused me any problems I’m learning my lesson from the previous example and will update my code now to avoid issues in the future.Pick the right editorI’d been a Sublime Text user for years and still absolutely love it.
  • I still use Sublime Text for other JavaScript projects (just as I use Eclipse for Java projects) but Visual Studio works for me… as I wrote earlier, always pick the right tool for the job.Learn the Life CycleI’ve found that when creating React components I need to think differently about how to approach problems and that understanding the component life-cycle really helps find the solutions.One really valuable tip I’ve found is to make sure that if a component needs to derive state from props then you need to process those props in both the constructor and componentWillReceiveProps (especially when the component is going to be receiving new properties from its ancestors) as this has caught me out on more than one occasion.I would certainly recommend working through problems more than once (and a good set of unit tests can really help here) as switching my way of thinking from an object-oriented approach to a functional composition approach can be quite challenging at first.
  • I don’t expect them to be revelatory to anyone with a great deal of React experience but it was valuable to me to think about and log what I’ve learned over the past few months.If you have any feedback or suggestions for other good practices then please let me know!

I’ve been developing web applications for many years but until recently was constrained to developing on (and for) a Java stack that had to support old versions of Internet Explorer. This left me…
Continue reading “Some tips for getting started with React – DailyJS – Medium”

elm-calendar-react-storybook/app at master · kalutheo/elm-calendar-react-storybook · GitHub

#ReactJS storybook and #elmlang. Okay that's interesting :) 

  • The project was bootstrapped with Create Elm App .
  • elm-app package install < package-name >
  • To use JavaScript packages from npm, you’ll need to add a package.json , install the dependencies and you’re ready to go.
  • Use it for installing Elm packages from
  • Runs the app in the development mode.

elm-calendar-react-storybook – Simple demo of how ReactStoryBook can be used with an Elm App
Continue reading “elm-calendar-react-storybook/app at master · kalutheo/elm-calendar-react-storybook · GitHub”

Page object for testing React.js components – Medium

  • Let’s add one more test on handling submit.
  • Our test code encourages to do everything through Page object.
  • Page object wrapper gives you nice API to interact with your component, so test code will be more expressive and neat.
  • I also work a lot on developer infrastructure, especially in terms of testing.
  • We don’t test the whole web page, only one component, but we can think that our component is actually a little page, that we are going to interact with.

Today I will tell you a little trick how to make your test code a bit fancier and easier to maintain. The PageObject pattern is quite…
Continue reading “Page object for testing React.js components – Medium”

Testing your React components with Jest snapshots

Test your react components with Jest snapshots:  by @thibaut_cheymol #reactjs #JavaScript

  • Test your react components with Jest snapshots
  • describe ( ‘ Our first snapshot test ‘ , () => { it ( ‘ Should compare the component with a snapshot ‘ , () => { const component = ‘
    Hello Jest

    ‘ expect ( component ) .

  • As we already have unit tests set up, we are going to test our first component right now.
  • Component snapshot tests are unit tests, so they are really fast, but they test your component behaviour.
  • import React , { Component } from ‘ react ‘ ; import ‘ ..

Test ReactJS and React Native components with Jest snapshots
Continue reading “Testing your React components with Jest snapshots”