Reading time ~1 minute

I purused the package.json file and tried to learn a little about the application’s configuration and what modules are being imported.

After the name, description, and version number of the application came a big json block for scripts. These scripts are shortcuts to run various commands for compiling, starting the server, running tests, etc. Something I learned was the ‘concurrently’ command. This allows multiple commands to run concurrently. For example, the ‘start’ command includes concurrently "tsc -w" "lite-server" which starts the server and watches for files that change so they can be recompiled.

The next major block was for dependencies. It included the ‘@angular/' construct to include Angular 2 which is different then running 'npm install angular2 --save' which I've seen everywhere else. Installing angular2 only gets you to beta 17 whereas with @angular/ you can get rc 1. I don't know if you will always have to configure package.json or if there will be a way to 'npm install' the latest angular2 or @angular/. Additional dependencies include systemjs for module loading, es6-shim for JavaScript compatibility, reflect-metadata for adding metadata to a class, rxjs for handling of asynchronous and event-based programming, zone.js for creating context for asynchronous operations, angular2-in-memory-web-api for simulating data, and bootstrap for the front-end framework.

Finally are the devdependencies; the modules used for development. They include the previously mentioned concurrently, lite-server for a lightweight web server, typescript the TypeScript programming language the project uses, typings for managing TypeScript definition, canonical-path for easier multi-platform path management , http-server for a more robust web server, tslint for checking TypeScript syntax, lodash a JavaScript library for arrays, strings, etc., jasmine-core for BDD, karma for getting tests to run in the browser, karma-chrome-launcher for helping karma launch the Chrome browser, karma-cli to allow Karma to be used from the command line, karma-htmlfile-reporter adds a Karma plugin that exports test results as a styled HTML file, karma-jasmine an Karma plugin that enables it to run Jasmine tests , protractor for end-to-end testing, and rimraf for easily deleting directories.

I think going through that was worthwhile. Typically, I would have just copied the package.json from somewhere and just used it until I ran into a problem. Taking a more thorough approach is something I want to do right now and it gives me a sense that I’m making steady progress.

Perils of a Family-First Software Developer

I've just survived a RIF, my skills and tool set are built around technologies that were modern 10 years ago, my interviewing skills have...… Continue reading

AWS CodeStar and TypeScript - Part 3

Published on May 28, 2017

AWS CodeStar and TypeScript - Part 2

Published on May 17, 2017