Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.vscode
Controllers Removed some comments Dec 27, 2016
Properties
Views
content/js
wwwroot
.gitignore
Dockerfile
License.md
Program.cs
README.md
Startup.cs
package.json
project.json
tsconfig.json
web.config
webpack.config.js

README.md

webpack-ts

This repository contains the webpack-ts code.

This is a .NET Core MVC application which has some npm dependencies (see Dependencies section below). As such anyone wanting to build and run this application will need to install the dependencies before running it.

webpack-ts layout and basic description

webpack-ts is an MVC application with TypeScript and webpack support built in. The source layout matches that of a standard .NET Core MVC application, with a small number of exceptions:

  1. content/js
  2. wwwroot/app
  3. package.json
  4. tsconfg.json
  5. webpack.config.js

The content/js directory contains a selection of TypeScript files, which will be transpiled by the webpack plugin awesome-typescript-loader.

The wwwroot/app directory will contain all bundles that are created by webpack (after any transpilation from TypeScript has taken place).

The package.json file is an npm configuration file, which tells npm which packages to install in order to build and run this application.

The tsconfig.json file is a TypeScript configuration file. This is used by the awesome-typescript-loader plugin to transpile any TypeScript files to JavaScript before bundling them with webpack.

The webpack.config.js file is a webpack configuration file. This describes the entry points, outputs and plugins that webpack must use to bundle our JavaScript.

Building and Running webpack-ts

  1. Download and install all of the npm packages

    npm install

  2. Restore all required .NET Core packages:

    dotnet restore

  3. Transpile all TypeScript and build all JavaScript bundles:

    webpack

  4. Build and run the application:

    dotnet run

Licence

This project uses the MIT licence, please see the license.md file for more details.