chore(omiv): remove useless code
This commit is contained in:
parent
cb1ebfb2f5
commit
10fb1a5958
|
@ -2,8 +2,6 @@
|
|||
|
||||
> A Vue.js project with vue 2.0, vue-router and vuex starter kit for server side rendering.
|
||||
|
||||
[![Build Status](https://travis-ci.org/doabit/vue-ssr-starter-kit.svg?branch=master)](https://travis-ci.org/doabit/vue-ssr-starter-kit)
|
||||
|
||||
## Node Version Requirement
|
||||
|
||||
```bash
|
||||
|
@ -26,10 +24,6 @@ npm run build
|
|||
npm start
|
||||
```
|
||||
|
||||
## Reference resources
|
||||
|
||||
[vue-hackernews-2.0](https://github.com/vuejs/vue-hackernews-2.0)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"description": "A Vue.js project with vue 2.0, vue-router and Omiv for server side rendering.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/doabit/vue-ssr-starter-kit.git"
|
||||
"url": "git+https://github.com/Tencent/omi/tree/master/packages/vue-omiv-ssr-starter"
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
|
@ -15,12 +15,12 @@
|
|||
"server-side",
|
||||
"boilerplate"
|
||||
],
|
||||
"author": "doabit <doinsist@gmail.com>",
|
||||
"author": "yiliang <1144323068@qq.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/doabit/vue-ssr-starter-kit/issues"
|
||||
"url": "https://github.com/Tencent/omi/issues"
|
||||
},
|
||||
"homepage": "https://github.com/doabit/vue-ssr-starter-kit#readme",
|
||||
"homepage": "https://github.com/Tencent/omi/tree/master/packages/vue-omiv-ssr-starter#readme",
|
||||
"scripts": {
|
||||
"dev": "node server",
|
||||
"start": "cross-env NODE_ENV=production node server",
|
||||
|
@ -35,51 +35,23 @@
|
|||
"cross-env": "^3.1.4",
|
||||
"express": "^4.16.3",
|
||||
"lru-cache": "^4.1.3",
|
||||
"serialize-javascript": "^1.5.0",
|
||||
"serve-favicon": "^2.5.0",
|
||||
"vue": "^2.5.17",
|
||||
"vue-router": "^2.8.1",
|
||||
"vue-server-renderer": "^2.5.17",
|
||||
"vuex": "^2.5.0",
|
||||
"vuex-router-sync": "^4.3.2",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-dev-server": "^3.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^7.1.0",
|
||||
"babel-loader": "^6.0.0",
|
||||
"babel-preset-es2015": "^6.13.2",
|
||||
"babel-preset-stage-2": "^6.13.0",
|
||||
"chai": "^3.5.0",
|
||||
"css-loader": "^1.0.0",
|
||||
"debug": "^2.6.9",
|
||||
"eslint": "^4.18.2",
|
||||
"eslint-config-standard": "^6.0.0-beta.2",
|
||||
"eslint-friendly-formatter": "^2.0.6",
|
||||
"eslint-loader": "^1.5.0",
|
||||
"eslint-plugin-html": "^6.0.0",
|
||||
"eslint-plugin-promise": "^3.8.0",
|
||||
"eslint-plugin-standard": "^2.0.0",
|
||||
"extract-text-webpack-plugin": "^2.0.0-beta.3",
|
||||
"file-loader": "^0.8.4",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"karma": "^3.0.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-phantomjs-launcher": "^1.0.4",
|
||||
"karma-sinon-chai": "^1.3.4",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-spec-reporter": "0.0.26",
|
||||
"karma-webpack": "^3.0.5",
|
||||
"lodash": "^4.17.13",
|
||||
"mocha": "^5.2.0",
|
||||
"omiv": "^1.0.4",
|
||||
"phantomjs-prebuilt": "^2.1.16",
|
||||
"rimraf": "^2.6.2",
|
||||
"sinon": "^1.17.5",
|
||||
"sinon-chai": "^2.14.0",
|
||||
"stylus": "^0.54.5",
|
||||
"stylus-loader": "^2.4.0",
|
||||
"omiv": "^1.0.5",
|
||||
"sw-precache-webpack-plugin": "^0.9.1",
|
||||
"vue-loader": "^10.0.0",
|
||||
"vue-ssr-webpack-plugin": "^1.0.2",
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import Vue from "vue";
|
||||
import App from "./App.vue";
|
||||
import Omiv, { render } from "../../omiv/src/omiv";
|
||||
// import Omiv, { render } from "omiv";
|
||||
import Omiv, { render } from "omiv";
|
||||
import createStore from "./store";
|
||||
import createRouter from "./router";
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import { createApp } from "./app";
|
|||
|
||||
const { app, router, store } = createApp();
|
||||
|
||||
// TODO: omiv 缺少一个 replaceStore
|
||||
if (window.__INITIAL_STATE__) {
|
||||
store.replaceState(window.__INITIAL_STATE__);
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"env": {
|
||||
"mocha": true
|
||||
},
|
||||
"globals": {
|
||||
"expect": true,
|
||||
"sinon": true
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
// require all test files (files that ends with .spec.js)
|
||||
var testsContext = require.context('./specs', true, /\.spec$/)
|
||||
testsContext.keys().forEach(testsContext)
|
|
@ -1,29 +0,0 @@
|
|||
const baseConfig = require('../../build/webpack.base.config')
|
||||
const webpack = require('webpack')
|
||||
const webpackConfig = Object.assign({}, baseConfig, {
|
||||
devtool: '#inline-source-map',
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': '"test"'
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
// no need for app entry during tests
|
||||
delete webpackConfig.entry
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
browsers: ['PhantomJS'],
|
||||
frameworks: ['mocha', 'sinon-chai'],
|
||||
reporters: ['spec'],
|
||||
files: ['./index.js'],
|
||||
preprocessors: {
|
||||
'./index.js': ['webpack', 'sourcemap']
|
||||
},
|
||||
webpack: webpackConfig,
|
||||
webpackMiddleware: {
|
||||
noInfo: true
|
||||
}
|
||||
})
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
import Vue from 'vue'
|
||||
import Home from 'components/Home'
|
||||
|
||||
describe('Home.vue', () => {
|
||||
it('should render correct home contents', () => {
|
||||
const vm = new Vue(Home).$mount()
|
||||
expect(vm.$el.textContent).to.contain('Home')
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue