mirror of
https://github.com/tenrok/vue-form-wizard.git
synced 2026-06-24 11:00:33 +03:00
Initial commit
This commit is contained in:
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
@@ -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"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user