summaryrefslogtreecommitdiff
path: root/www/lib/ionic-native-transitions/webpack.config.dist.js
blob: f8352d60a3f4022f20352d5ec14c2e62c97e4809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var path = require('path'),
    libPath = path.join(__dirname, 'lib'),
    distPath = path.join(__dirname, 'dist'),
    webpack = require("webpack"),
    pkg = require('./package.json'),
    fs = require('fs'),
    copyright = fs.readFileSync('./copyright.txt', 'utf8'),
    HtmlWebpackPlugin = require('html-webpack-plugin');

copyright = copyright.replace('{pkg.name}', pkg.name)
    .replace('{pkg.description}', pkg.description)
    .replace('{pkg.version}', pkg.version)
    .replace('{pkg.author}', pkg.author)
    .replace('{pkg.homepage}', pkg.homepage)
    .replace('{pkg.license}', pkg.license);

module.exports = {
    entry: path.join(libPath, 'index.js'),
    output: {
        path: distPath,
        library: 'ionicNativeTransitions',
        libraryTarget: "umd",
        umdNamedDefine: true,
        filename: 'ionic-native-transitions.js'
    },
    module: {
        loaders: [{
            test: /\.js$/,
            exclude: /(node_modules|bower_components)/,
            loader: "ng-annotate?add=true!babel"
        }]
    },
    plugins: [
        new webpack.BannerPlugin(copyright)
    ]
};