Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cristijora committed Apr 15, 2017
0 parents commit 011774f
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 0 deletions.
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "vue-tab-wizard",
"version": "1.0.0",
"description": "A vue based tab wizard",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cristijora/vue-tab-wizard.git"
},
"keywords": [
"vue"
],
"author": "Cristi Jora",
"license": "ISC",
"bugs": {
"url": "https://github.com/cristijora/vue-tab-wizard/issues"
},
"homepage": "https://github.com/cristijora/vue-tab-wizard#readme",
"devDependencies": {
"vue": "^2.2.6"
}
}
74 changes: 74 additions & 0 deletions webpack.build.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
var webpack = require("webpack");
var version = require("./package.json").version;
var banner = "/**\n" + " * vue-form-generator v" + version + "\n" + " * https://github.com/icebob/vue-form-generator\n" + " * Released under the MIT License.\n" + " */\n";
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var StatsPlugin = require("stats-webpack-plugin");

var loaders = [
{
"test": /\.js?$/,
"exclude": /node_modules/,
"loader": "babel"
},
{
"test": /\.vue?$/,
"loader": "vue"
}
];
var cssFileName;
if (process.env.FULL_BUNDLE) {
cssFileName = "vfg.css";
} else {
cssFileName = "vfg-core.css";
}

module.exports = [
{
entry: "./src/index.js",
output: {
path: "./dist",
filename: "vfg.js",
library: "VueFormGenerator",
libraryTarget: "umd"
},

plugins: [
new webpack.DefinePlugin({
"process.env" : {
NODE_ENV : JSON.stringify("production")
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.DedupePlugin(),
new webpack.BannerPlugin(banner, {
raw: true
}),
new ExtractTextPlugin(cssFileName, { allChunks: true }),
new StatsPlugin("../stats.json", {
chunkModules: true
//exclude: [/node_modules[\\\/]react/]
})
],

module: {
loaders
},

vue: {
loaders: {
css: ExtractTextPlugin.extract("css"),
postcss: ExtractTextPlugin.extract("css"),
sass: ExtractTextPlugin.extract("css!sass"),
}
},

resolve: {
packageAlias: "browser"
}
}

];
67 changes: 67 additions & 0 deletions webpack.dev.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
var path = require("path");
var webpack = require("webpack");
var projectRoot = path.resolve(__dirname, '../');

var loaders = [
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.js$/,
loader: 'babel',
include: projectRoot,
exclude: /node_modules/
},
{
test: /\.json$/,
loader: 'json'
},
{
test: /\.(woff2?|svg)$/,
loader: "url"
//loader: "url?limit=10000"
},
{
test: /\.(ttf|eot)$/,
loader: "url"
}
];

module.exports = {
devtool: "source-map",

entry: {
full: path.resolve("dev", "full", "main.js"),
mselect: path.resolve("dev", "multiselect", "main.js")
},

output: {
path: path.resolve("dev"),
filename: "[name].js",
publicPath: "/"
},

plugins: [
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("development"),
FULL_BUNDLE: true
}
}),
],

module: {
loaders
},

resolve: {
packageAlias: "browser"
},

vue: {
autoprefixer: {
browsers: ["last 2 versions"]
}
}
};

0 comments on commit 011774f

Please sign in to comment.