diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..bdb0cabc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f8d83f47 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/node_modules +/test/specs.js +.DS_Store \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..d5ea1cea --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +build +docs +bower.json diff --git a/build/webpack.build.config.js b/build/webpack.build.config.js new file mode 100644 index 00000000..bb46243b --- /dev/null +++ b/build/webpack.build.config.js @@ -0,0 +1,36 @@ +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"; + +module.exports = [ + +{ + entry: "./src/index", + output: { + path: "./dist", + filename: "vue-form-generator.js", + library: "VueFormGenerator", + libraryTarget: "umd" + }, + plugins: [ + new webpack.BannerPlugin(banner, { + raw: true + })] +}, + +{ + entry: "./src/index", + output: { + path: "./dist", + filename: "vue-form-generator.js", + library: "VueFormGenerator", + libraryTarget: "umd" + }, + plugins: [ + new webpack.optimize.UglifyJsPlugin, + new webpack.BannerPlugin(banner, { + raw: true + })] +} + +]; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000..15ca5023 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "vue-form-generator", + "version": "0.1.0", + "description": "A schema-based form generator component for Vue.js", + "main": "src/index.js", + "scripts": { + "build": "webpack --config build/webpack.build.config.js", + "test": "webpack --config test/webpack.config.js" + }, + "keywords": [ + "vue", + "vuejs", + "form", + "generator", + "schema", + "json" + ], + "author": "Icebob", + "license": "MIT", + "devDependencies": { + "vue": "^1.0.21", + "webpack": "1.13.0" + } +}