Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 011774f

Browse files
author
cristijora
committed
Initial commit
0 parents  commit 011774f

File tree

3 files changed

+166
-0
lines changed

3 files changed

+166
-0
lines changed

package.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "vue-tab-wizard",
3+
"version": "1.0.0",
4+
"description": "A vue based tab wizard",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/cristijora/vue-tab-wizard.git"
12+
},
13+
"keywords": [
14+
"vue"
15+
],
16+
"author": "Cristi Jora",
17+
"license": "ISC",
18+
"bugs": {
19+
"url": "https://github.com/cristijora/vue-tab-wizard/issues"
20+
},
21+
"homepage": "https://github.com/cristijora/vue-tab-wizard#readme",
22+
"devDependencies": {
23+
"vue": "^2.2.6"
24+
}
25+
}

webpack.build.config.js

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
var webpack = require("webpack");
2+
var version = require("./package.json").version;
3+
var banner = "/**\n" + " * vue-form-generator v" + version + "\n" + " * https://github.com/icebob/vue-form-generator\n" + " * Released under the MIT License.\n" + " */\n";
4+
var ExtractTextPlugin = require("extract-text-webpack-plugin");
5+
var StatsPlugin = require("stats-webpack-plugin");
6+
7+
var loaders = [
8+
{
9+
"test": /\.js?$/,
10+
"exclude": /node_modules/,
11+
"loader": "babel"
12+
},
13+
{
14+
"test": /\.vue?$/,
15+
"loader": "vue"
16+
}
17+
];
18+
var cssFileName;
19+
if (process.env.FULL_BUNDLE) {
20+
cssFileName = "vfg.css";
21+
} else {
22+
cssFileName = "vfg-core.css";
23+
}
24+
25+
module.exports = [
26+
{
27+
entry: "./src/index.js",
28+
output: {
29+
path: "./dist",
30+
filename: "vfg.js",
31+
library: "VueFormGenerator",
32+
libraryTarget: "umd"
33+
},
34+
35+
plugins: [
36+
new webpack.DefinePlugin({
37+
"process.env" : {
38+
NODE_ENV : JSON.stringify("production")
39+
}
40+
}),
41+
new webpack.optimize.UglifyJsPlugin({
42+
compress: {
43+
warnings: false
44+
}
45+
}),
46+
new webpack.optimize.DedupePlugin(),
47+
new webpack.BannerPlugin(banner, {
48+
raw: true
49+
}),
50+
new ExtractTextPlugin(cssFileName, { allChunks: true }),
51+
new StatsPlugin("../stats.json", {
52+
chunkModules: true
53+
//exclude: [/node_modules[\\\/]react/]
54+
})
55+
],
56+
57+
module: {
58+
loaders
59+
},
60+
61+
vue: {
62+
loaders: {
63+
css: ExtractTextPlugin.extract("css"),
64+
postcss: ExtractTextPlugin.extract("css"),
65+
sass: ExtractTextPlugin.extract("css!sass"),
66+
}
67+
},
68+
69+
resolve: {
70+
packageAlias: "browser"
71+
}
72+
}
73+
74+
];

webpack.dev.config.js

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
var path = require("path");
2+
var webpack = require("webpack");
3+
var projectRoot = path.resolve(__dirname, '../');
4+
5+
var loaders = [
6+
{
7+
test: /\.vue$/,
8+
loader: 'vue'
9+
},
10+
{
11+
test: /\.js$/,
12+
loader: 'babel',
13+
include: projectRoot,
14+
exclude: /node_modules/
15+
},
16+
{
17+
test: /\.json$/,
18+
loader: 'json'
19+
},
20+
{
21+
test: /\.(woff2?|svg)$/,
22+
loader: "url"
23+
//loader: "url?limit=10000"
24+
},
25+
{
26+
test: /\.(ttf|eot)$/,
27+
loader: "url"
28+
}
29+
];
30+
31+
module.exports = {
32+
devtool: "source-map",
33+
34+
entry: {
35+
full: path.resolve("dev", "full", "main.js"),
36+
mselect: path.resolve("dev", "multiselect", "main.js")
37+
},
38+
39+
output: {
40+
path: path.resolve("dev"),
41+
filename: "[name].js",
42+
publicPath: "/"
43+
},
44+
45+
plugins: [
46+
new webpack.DefinePlugin({
47+
"process.env": {
48+
NODE_ENV: JSON.stringify("development"),
49+
FULL_BUNDLE: true
50+
}
51+
}),
52+
],
53+
54+
module: {
55+
loaders
56+
},
57+
58+
resolve: {
59+
packageAlias: "browser"
60+
},
61+
62+
vue: {
63+
autoprefixer: {
64+
browsers: ["last 2 versions"]
65+
}
66+
}
67+
};

0 commit comments

Comments
 (0)