Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove roadhog plugin #167

Merged
merged 3 commits into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"import",
{
"libraryName": "antd",
"libraryDirectory": "es",
"style": true
}
],
"@babel/plugin-proposal-class-properties",
[
"@babel/plugin-transform-runtime",
{
"corejs": 2
}
],
"dva-hmr",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-json-strings",
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
],
"env": {
"production": {
"plugins": [
"transform-remove-console",
"@babel/plugin-syntax-dynamic-import"
]
}
}
}
27 changes: 27 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"extends": "stylelint-config-standard",
"rules": {
"selector-pseudo-class-no-unknown": null,
"shorthand-property-no-redundant-values": null,
"at-rule-empty-line-before": null,
"at-rule-name-space-after": null,
"comment-empty-line-before": null,
"declaration-bang-space-before": null,
"declaration-empty-line-before": null,
"function-comma-newline-after": null,
"function-name-case": null,
"function-parentheses-newline-inside": null,
"function-max-empty-lines": null,
"function-whitespace-after": null,
"number-leading-zero": null,
"number-no-trailing-zeros": null,
"rule-empty-line-before": null,
"selector-combinator-space-after": null,
"selector-list-comma-newline-after": null,
"selector-pseudo-element-colon-notation": null,
"unit-no-unknown": null,
"no-descending-specificity": null,
"value-list-max-empty-lines": null,
"selector-type-no-unknown": null
}
}
28 changes: 0 additions & 28 deletions .webpackrc.js

This file was deleted.

15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
FROM luissalgadofreire/nginx-node:8.x
MAINTAINER logan@rancher.com
FROM nginx
RUN apt-get update -y && \
apt-get install -y curl \
libcurl3 \
libcurl3-dev \
ngrep \
gnupg

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
RUN apt-get install -y build-essential

CMD [ "node" ]

COPY package.json /tmp/package.json
RUN cd /tmp && npm install
Expand Down
104 changes: 82 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "roadhog dev",
"build": "roadhog build",
"dev": "webpack-dev-server --config=webpack.config.development.js --mode development",
"build": "cross-env NODE_ENV=production webpack --config=webpack.config.production.js --mode production",
"lint": "eslint --ext .js src",
"precommit": "npm run lint"
},
"dependencies": {
"antd": "3.16.1",
"axios": "^0.16.0",
"babel-runtime": "^6.9.2",
"@babel/runtime-corejs2": "^7.0.0",
"antd": "3.19.4",
"axios": "^0.19.0",
"classnames": "^2.2.5",
"cron-parser": "^2.11.0",
"dva": "^2.4.1",
Expand All @@ -36,25 +36,85 @@
"semver": "^5.6.0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/polyfill": "^7.0.0-beta.36",
"babel-eslint": "^7.2.3",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@webassemblyjs/ast": "^1.3.1",
"@webassemblyjs/wasm-edit": "^1.3.1",
"acorn": "^6.1.1",
"add-asset-html-webpack-plugin": "^3.1.3",
"address": "^1.0.3",
"babel-eslint": "^8.2.3",
"babel-loader": "^8.0.0",
"babel-plugin-dva-hmr": "^0.4.1",
"babel-plugin-import": "^1.2.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-import": "^1.7.0",
"babel-plugin-transform-remove-console": "^6.9.2",
"body-parser": "^1.18.3",
"clean-webpack-plugin": "^0.1.19",
"copy-webpack-plugin": "^4.5.1",
"cross-env": "^5.1.1",
"cross-port-killer": "^1.0.1",
"css-loader": "^2.1.1",
"cssnano": "^4.1.10",
"es5-imcompatible-versions": "^0.1.34",
"eslint": "^4.19.1",
"eslint-config-react-app": "^2.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^21.22.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.12.4",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-compat": "^2.2.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"estraverse": "^4.2.0",
"expect": "^1.20.2",
"husky": "^0.12.0",
"file-loader": "^1.1.11",
"friendly-errors-webpack-plugin": "^1.7.0",
"happypack": "^5.0.0-beta.4",
"html-webpack-plugin": "^3.2.0",
"husky": "^1.0.0-rc.4",
"keymaster": "^1.6.2",
"redbox-react": "^1.3.2",
"roadhog": "2.5.0-beta.4",
"string-replace-loader": "^2.1.1"
}
"less": "^3.0.4",
"less-loader": "^4.1.0",
"mini-css-extract-plugin": "^0.4.0",
"mockjs": "^1.0.1-beta3",
"open-browser-webpack-plugin": "0.0.5",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"pre-commit": "^1.2.2",
"pro-download": "^1.0.1",
"progress-bar-webpack-plugin": "^1.12.1",
"redbox-react": "^1.5.0",
"redux-devtools": "^3.4.1",
"redux-devtools-dock-monitor": "^1.1.3",
"redux-devtools-log-monitor": "^1.4.0",
"regenerator-runtime": "^0.11.1",
"sass-loader": "^7.0.1",
"serve-index": "^1.9.1",
"string-replace-loader": "^2.1.1",
"style-loader": "^0.21.0",
"type-is": "^1.6.15",
"uglifyjs-webpack-plugin": "^1.2.5",
"url-loader": "^1.0.1",
"webpack": "^4.33.0",
"webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.4",
"webpack-manifest-plugin": "^2.0.4"
},
"pre-commit": [
"precommit"
]
}
5 changes: 5 additions & 0 deletions src/assets/styles/antd-customize/generic.less
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@
}
}

.ant-btn-primary {
background-color: @color-primary ;
border-color: @color-primary ;
}

.ant-pagination-item {
margin-bottom: 8px;
}
Expand Down
2 changes: 0 additions & 2 deletions src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="/index.css" />
<!--[if lte IE 10]>
<script
src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,media-match/2.0.2/media.match.min.js"></script>
Expand All @@ -14,7 +13,6 @@

<body>
<div id="root"></div>
<script src="/index.js"></script>
</body>

</html>
18 changes: 16 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import './publicPath'
import appmodel from './models/app'
import host from './models/host'
import volume from './models/volume'
import setting from './models/setting'
import eventlog from './models/eventlog'
import engineimage from './models/engineimage'
import backup from './models/backup'
import snapshot from './models/snapshot'

// import assets
import './assets/iconfont/iconfont.eot'
Expand All @@ -14,8 +22,14 @@ import app from './main'
import routerConfig from './router'

// 2. Model
app.model(require('./models/app').default)
app.model(require('./models/snapshot').default('snapshotModal'))
app.model(appmodel)
app.model(snapshot('snapshotModal'))
app.model(host)
app.model(setting)
app.model(eventlog)
app.model(engineimage)
app.model(backup)
app.model(volume)

// 3. Router
app.router(routerConfig)
Expand Down
Loading