Skip to content

Commit

Permalink
webpack: use webpack confg in Mark Text and remove vue cli
Browse files Browse the repository at this point in the history
  • Loading branch information
罗冉 committed Apr 8, 2019
1 parent 84c3d0b commit cd9418e
Show file tree
Hide file tree
Showing 9 changed files with 3,143 additions and 2,600 deletions.
20 changes: 20 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"comments": false,
"env": {
"renderer": {
"presets": [
["env", {
"modules": false,
"useBuiltIns": true,
"targets": {
"browsers": [
"Chrome >= 66"
]
}
}],
"stage-0"
]
}
},
"plugins": ["transform-runtime"]
}
1 change: 0 additions & 1 deletion .env.development

This file was deleted.

1 change: 0 additions & 1 deletion .env.production

This file was deleted.

37 changes: 37 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
impliedStrict: true
},
sourceType: 'module'
},
env: {
browser: true,
es6: true,
node: true
},
extends: [
'standard',
'eslint:recommended',
'plugin:vue/base' // 'plugin:vue/essential'
],
globals: {
__static: true
},
plugins: [
'html',
'vue'
],
rules: {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow console
'no-console': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
62 changes: 45 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,65 @@
{
"name": "xxx",
"name": "marktext-website",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve --mode development",
"build": "vue-cli-service build --mode production && cp CNAME docs/CNAME",
"lint": "vue-cli-service lint"
"dev": "cross-env NODE_ENV=development webpack-dev-server --open",
"build": "cross-env NODE_ENV=production webpack --progress --colors --config webpack.config.js && cp CNAME docs/CNAME",
"lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src"
},
"dependencies": {
"core-js": "^2.6.5",
"katex": "^0.10.1",
"vue": "^2.6.6"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.5.0",
"@vue/cli-plugin-eslint": "^3.5.0",
"@vue/cli-service": "^3.5.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-loader": "^7.1.5",
"babel-plugin-component": "^1.1.1",
"babel-plugin-istanbul": "^5.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"cross-env": "^5.2.0",
"css-loader": "^2.1.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"raw-loader": "^2.0.0",
"svg-fill-loader": "^0.0.8",
"del": "^4.1.0",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.2",
"eslint-plugin-html": "^4.0.6",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.2",
"file-loader": "^3.0.1",
"html-webpack-plugin": "^3.2.0",
"inject-loader": "^4.0.1",
"mini-css-extract-plugin": "^0.5.0",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.6.0",
"spectron": "^5.0.0",
"style-loader": "^0.23.1",
"svg-sprite-loader": "^4.1.3",
"svgo": "^1.2.1",
"svgo-loader": "^2.2.0",
"to-string-loader": "^1.1.5",
"vue-template-compiler": "^2.5.21"
"url-loader": "^1.1.2",
"vue-html-loader": "^1.2.4",
"vue-loader": "^15.7.0",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.29.6",
"webpack-bundle-analyzer": "^3.1.0",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1",
"webpack-hot-middleware": "^2.24.3",
"webpack-merge": "^4.2.1"
},
"eslintConfig": {
"root": true,
Expand All @@ -42,11 +75,6 @@
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
Expand Down
2 changes: 1 addition & 1 deletion src/components/theme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<script>
import html from './article.html'
import { addThemeStyle } from '../utils/theme.js'
import 'katex/dist/katex.min.css'
const lightThemes = [{
Expand Down Expand Up @@ -91,7 +92,6 @@ export default {
}
</script>
<style scoped>
@import url("../themes/default.css");
.theme {
width: 100vw;
height: 100vh;
Expand Down
46 changes: 0 additions & 46 deletions vue.config.js

This file was deleted.

Loading

0 comments on commit cd9418e

Please sign in to comment.