Skip to content

Instantly share code, notes, and snippets.

@gnosis23
Created April 16, 2017 08:08
Show Gist options
  • Save gnosis23/1e396a2745ab113aa9a1d277ee00274c to your computer and use it in GitHub Desktop.
Save gnosis23/1e396a2745ab113aa9a1d277ee00274c to your computer and use it in GitHub Desktop.
typescript boilerplate
{
"dependencies": {
"@types/jquery": "^2.0.41",
"@types/lodash": "^4.14.62",
"jquery": "^3.2.1",
"lodash": "^4.17.4",
"ts-loader": "^2.0.3",
"typescript": "^2.2.2",
"webpack": "^2.4.1"
},
"name": "setup",
"version": "1.0.0",
"main": "app.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
{
"compilerOptions": {
"module":"commonjs"
},
"files": [
"src/app.ts"
]
}
const path = require('path');
const webpack = require('webpack');
module.exports = {
context: path.resolve(__dirname, './src'),
entry: {
app: path.resolve(__dirname,'./src/app.ts')
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].bundle.js'
},
plugins: [
new webpack.optimize.UglifyJsPlugin()
],
module: {
loaders: [
{test: /\.ts$/, loader: 'ts-loader'}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment