-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added promts for lodash, axios and ui librarys and conditionals for them
- Loading branch information
1 parent
9592b48
commit 3aa744b
Showing
8 changed files
with
126 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
{ | ||
"presets": [ | ||
["env", { "modules": false }] | ||
], | ||
], | ||
"plugins": [ | ||
{{#lodash}} | ||
"lodash", | ||
{{/lodash}} | ||
{{#if_eq uiLibrary "element"}} | ||
["component", [ | ||
{ | ||
"libraryName": "element-ui", | ||
"styleLibraryName": "theme-default" | ||
} | ||
]] | ||
{{/if_eq}} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
{{#unit}} | ||
test/unit/coverage | ||
{{/unit}} | ||
|
||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,65 @@ | ||
{ | ||
"name": "vue-starter", | ||
"description": "A Vue.js starter kit that lets you focus on more programming and less configruation.", | ||
"name": "{{ name }}", | ||
"description": "{{ description }}", | ||
"version": "1.0.0", | ||
"author": "Rohit Rai <[email protected]>", | ||
"author": "{{ author }}", | ||
"private": true, | ||
"scripts": { | ||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", | ||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules --display-error-details", | ||
{{#unit}} | ||
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run", | ||
"test": "npm run unit", | ||
{{/unit}} | ||
{{#lint}} | ||
"lint": "eslint --ext .js,.vue src test/unit/specs" | ||
{{/lint}} | ||
}, | ||
"dependencies": { | ||
"vue": "^2.4.2", | ||
{{#router}} | ||
"vue-router": "^2.7.0" | ||
{{/router}} | ||
}, | ||
"devDependencies": { | ||
{{#axios}} | ||
"axios": "^0.16.2", | ||
{{/axios}} | ||
"babel-core": "^6.25.0", | ||
{{#lint}} | ||
"babel-eslint": "^7.2.3", | ||
{{/lint}} | ||
"babel-loader": "^7.1.1", | ||
"babel-plugin-component": "^0.10.0", | ||
"babel-plugin-lodash": "^3.2.11", | ||
"babel-preset-env": "^1.6.0", | ||
"compression-webpack-plugin": "^1.0.0", | ||
"copy-webpack-plugin": "^4.0.1", | ||
"cross-env": "^5.0.5", | ||
"css-loader": "^0.28.4", | ||
"element-ui": "^1.4.2", | ||
{{#lint}} | ||
"eslint": "^4.4.1", | ||
"eslint-config-airbnb-base": "^11.3.1", | ||
"eslint-friendly-formatter": "^3.0.0", | ||
"eslint-import-resolver-webpack": "^0.8.3", | ||
"eslint-loader": "^1.9.0", | ||
"eslint-friendly-formatter": "^3.0.0", | ||
"eslint-plugin-html": "^3.2.0", | ||
{{#if_eq lintConfig "airbnb"}} | ||
"eslint-config-airbnb-base": "^11.3.1", | ||
"eslint-import-resolver-webpack": "^0.8.3", | ||
"eslint-plugin-import": "^2.7.0", | ||
{{/if_eq}} | ||
{{/lint}} | ||
"extract-text-webpack-plugin": "^3.0.0", | ||
"file-loader": "^0.11.2", | ||
{{#ui}} | ||
{{#if_eq uiLibrary "foundation"}} | ||
"element-ui": "^1.4.2", | ||
{{/if_eq}} | ||
{{#if_eq uiLibrary "element"}} | ||
"foundation-sites": "^6.4.2", | ||
"babel-plugin-component": "^0.10.0", | ||
{{/if_eq}} | ||
{{/ui}} | ||
"friendly-errors-webpack-plugin": "^1.6.1", | ||
"html-webpack-plugin": "^2.30.1", | ||
{{#unit}} | ||
"karma": "^1.4.1", | ||
"karma-coverage": "^1.1.1", | ||
"karma-mocha": "^1.3.0", | ||
|
@@ -57,8 +77,12 @@ | |
"inject-loader": "^3.0.0", | ||
"babel-plugin-istanbul": "^4.1.1", | ||
"phantomjs-prebuilt": "^2.1.14", | ||
{{/unit}} | ||
{{#lodash}} | ||
"lodash": "^4.17.4", | ||
"babel-plugin-lodash": "^3.2.11", | ||
"lodash-webpack-plugin": "^0.11.4", | ||
{{/lodash}} | ||
"node-sass": "^4.5.3", | ||
"optimize-css-assets-webpack-plugin": "^3.0.0", | ||
"sass-loader": "^6.0.6", | ||
|
@@ -70,5 +94,14 @@ | |
"webpack-bundle-analyzer": "^2.9.0", | ||
"webpack-dev-server": "^2.7.1", | ||
"webpack-merge": "^4.1.0" | ||
} | ||
}, | ||
"engines": { | ||
"node": ">= 4.0.0", | ||
"npm": ">= 3.0.0" | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not ie <= 8" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
{{#if_eq build "standalone"}} | ||
// The Vue build version to load with the `import` command | ||
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | ||
{{/if_eq}} | ||
import Vue from 'vue'; | ||
import App from './App'; | ||
{{#router}} | ||
import router from './router'; | ||
{{/router}} | ||
|
||
Vue.config.productionTip = false; | ||
|
||
/* eslint-disable no-new */ | ||
new Vue({ | ||
el: '#app', | ||
{{#router}} | ||
router, | ||
{{/router}} | ||
{{#if_eq build "runtime"}} | ||
render: h => h(App); | ||
{{/if_eq}} | ||
{{#if_eq build "standalone"}} | ||
template: '<App/>', | ||
components: { | ||
App, | ||
}, | ||
{{/if_eq}} | ||
}); |