-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
evio
committed
Aug 5, 2016
1 parent
89bc222
commit 03ed466
Showing
10 changed files
with
168 additions
and
11 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,35 @@ | ||
/** | ||
* Created by evio on 16/8/5. | ||
*/ | ||
'use strict'; | ||
|
||
export const Params = [ | ||
'data', | ||
'computed', | ||
'methods', | ||
'watch', | ||
'directives', | ||
'elementDirectives', | ||
'filters', | ||
'components', | ||
'transitions', | ||
'partials', | ||
'events', 'mixins', | ||
'extends', | ||
'props', | ||
'propsData' | ||
]; | ||
|
||
export const Events = [ | ||
'init', | ||
'created', | ||
'beforeCompile', | ||
'compiled', | ||
'ready', | ||
'attached', | ||
'detached', | ||
'beforeDestroy', | ||
'destroyed' | ||
]; | ||
|
||
export const Inits = []; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,31 @@ | ||
/** | ||
* Created by evio on 16/8/5. | ||
*/ | ||
'use strict'; | ||
|
||
import vuex from 'vuex'; | ||
|
||
export const Vuex = vuex; | ||
|
||
export const install = function(Engine, Vue){ | ||
Engine.addParam('store'); | ||
Engine.addParam('vuex'); | ||
|
||
Engine.addInit(function(database){ | ||
if ( database.vuex ){ | ||
if ( Object.keys(database.vuex).length === 0 ){ | ||
delete database.vuex; | ||
} | ||
} | ||
}); | ||
|
||
Engine.addInit(function(database){ | ||
if ( database.store ){ | ||
if ( !database.store._getterCacheId ){ | ||
delete database.store; | ||
} | ||
} | ||
}); | ||
|
||
Vue.use(Vuex); | ||
}; |
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,11 @@ | ||
{ | ||
"name": "miox-vuex", | ||
"version": "0.0.1", | ||
"description": "miox vue vux", | ||
"author": "沈赟杰", | ||
"license": "MIT", | ||
"main": "build.js", | ||
"scripts": { | ||
"pub": "npm publish" | ||
} | ||
} |
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,50 @@ | ||
/** | ||
* Created by evio on 16/7/20. | ||
*/ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const AutoPrefixer = require('autoprefixer'); | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
const result = {}; | ||
result.plugins = []; | ||
|
||
result.plugins.push(new ExtractTextPlugin('build.css')); | ||
/** | ||
* 配置启动文件地址 | ||
* @type {*|Promise.<*>} | ||
*/ | ||
result.entry = path.resolve(__dirname, './index.js'); | ||
|
||
/** | ||
* 配置输出文件地址和输出文件模式 | ||
* @type {{path: (*|Promise.<*>), filename: string, libraryTarget: string}} | ||
*/ | ||
result.output = { | ||
path: __dirname, | ||
filename: 'build.js', | ||
library: 'MioxVuex', | ||
libraryTarget: 'umd' | ||
}; | ||
|
||
result.module = {}; | ||
|
||
/** | ||
* 配置loaders | ||
* @type {*[]} | ||
*/ | ||
result.module.loaders = [ | ||
{ test: /\.js$/, exclude: /node_modules/, loader: "babel" }, | ||
{ test: /\.css$/, loader: ExtractTextPlugin.extract("style", "css!postcss") }, | ||
{ test: /\.scss$/, loader: ExtractTextPlugin.extract("style", "css!postcss!sass") } | ||
]; | ||
|
||
/** | ||
* autoprefix | ||
* @returns {*[]} | ||
*/ | ||
result.postcss = () => { | ||
return [ AutoPrefixer({browsers: ['last 20 versions']}) ]; | ||
}; | ||
|
||
module.exports = result; |
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