Skip to content

Serabe/typescript-fundamentals

Repository files navigation

This is the example project used for the Mike.Works TypeScript Fundamentals course.

What are the pieces?

Please make sure you have the following software installed before arriving at the workshop or beginning the course.

General Packages

Please make sure you have the following general software installed

Required Library Version Range Notes
βœ” Node.js >= 8.0 nvm is highly recommended for managing multiple node versions on a single machine
βœ” Visual Studio Code >= 1.14 We'll be using several specific features of the VS Code editor. We can't force you to use it, but you'll miss out if you don't!
βœ” Yarn >= 0.24 An alternative to npm (if you are using nvm: brew install yarn --without-node, else use brew install yarn)

VS Code Extensions

Additionally, to take advantage of syntax hilighting, static code analysis and other editor features, you'll want to install the latest version of the following VS Code extensions

Required Extension Notes
βœ” sass-indented Syntax highlighting and code completion support for Sass stylesheets
βœ” tslint Static code analysis for JavaScript and TypeScript files
βœ” jest Syntax highlighting for Jest snapshot testing and in-editor test pass/fail statuses
βœ” Debugger for Chrome Allows us to attach to Chrome for debugging
vscode-icons Better file and folder icons

Global Node.js Packages

Make sure you have these npm packages installed globally. This can be done by running

npm install -g <package-name>
Required Library Version Range
βœ” typescript ^2.5.0
βœ” tslint ^5.7.0
βœ” ts-node ^3.3.0

Project setup

First, clone this project from Github

git clone https://github.com/mike-north/typescript-fundamentals tscript
cd tscript

Finally, while in the top-level folder of this project, download the and install this project's dependencies by running

yarn

To start the app, run

npm test accounts 

and you should see some failing tests waiting for you

How to use it

Start the Development Server

npm start <exercise-name>

Build Development Assets in the /dist folder

This will be an un-minified version of an exercise, and will include some webpack-specific tooling, intended only for development use

npm run build:dev <exercise-name>

Build Production Assets in the /dist folder

This will be an an optimized version of the exercise

npm run build:dist <exercise-name>

The Exercise Folder

Exercises are standalone mini-projects with the following folder structure.

index.html   # HTML served for exercise
./src        # Scripts (ts, js, tsx and jsx)
./styles     # Styles
   βŒ™ app.scss       #  (optional) Entry point for styles
./tests      # Tests
   βŒ™ myfile.test.ts # Tests must have *.test.js or *.test.ts

License

While the general license for this project is the BSD 3-clause, the exercises themselves are proprietary and are licensed on a per-individual basis, usually as a result of purchasing a ticket to a public workshop, or being a participant in a private training.

Here are some guidelines for things that are OK and NOT OK, based on our understanding of how these licenses work:

OK

  • Using everything in this project other than the exercises (or accompanying tests) to build a project used for your own free or commercial training material
  • Copying code from build scripts, configuration files, tests and development harnesses that are not part of the exercises specifically, for your own projects
  • As an owner of an individual license, using code from tests, exercises, or exercise solutions for your own non-training-related project.

NOT OK (without express written consent)

  • Using this project, or any subset of exercises contained within this project to run your own workshops
  • Writing a book that uses the code for these exercises
  • Recording a screencast that contains one or more of this project's exercises

Copyright

Β© 2017 Mike.Works, All Rights Reserved

This material may not be used for workshops, training, or any other form of instructing or teaching developers, without express written consent

About

πŸ‘¨β€πŸ« Mike's TypeScript Fundamentals Course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 77.2%
  • JavaScript 14.6%
  • HTML 3.9%
  • CSS 3.7%
  • Shell 0.6%