Giter Site home page Giter Site logo

webpack_typescript_mocha_vscode_docker_example's Introduction

Webpack TypeScript Mocha VSCode and Docker Example

An example project which shows how to...

  • Use Webpack to create a distribution bundle
  • Write TypeScript and tanspile it into JavaScript
  • Use Mocha to write tests
  • Set breakpoints and debug on VSCode (or command line)
  • All within a Docker development environment for reproducibilty

TODOs:

  • remove -no-bin-links and custom volume creations - i.e. use Windows OS to host the file system so others can run easily
  • try to reduce the dependency list in package.json
  • try to change the Docker root image to alpine or the like so it is much smaller and much faster

Build Image

To add new System dependencies:

docker-compose build

To install all dependencies on a new system

npm install -no-bin-links

Build Source

docker-compose run build
#docker-compose run bash
#npm run build
##npx webpack

Test

docker-compose run test
#docker-compose run bash
#npm run test
##TESTBUILD=true npx webpack
##npx mocha test-dist/main.js

Run Dev service like VSCode does, but from command-line

docker-compose -f docker-compose.yaml -f .devcontainer/docker-compose.yml run dev

Ultraclean Build

rm -rf dist node_modules package-lock.json
npm install -no-bin-links

webpack_typescript_mocha_vscode_docker_example's People

Contributors

econtriver-training avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.