Created
April 16, 2017 08:08
-
-
Save gnosis23/1e396a2745ab113aa9a1d277ee00274c to your computer and use it in GitHub Desktop.
typescript boilerplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": "" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"module":"commonjs" | |
}, | |
"files": [ | |
"src/app.ts" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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