chore(xo-web): adapt to monorepo

This commit is contained in:
Julien Fontanet 2018-02-07 10:39:32 +01:00
parent 563ff38c25
commit d7bb457fd0
18 changed files with 4944 additions and 10335 deletions

View File

@ -1,9 +1,10 @@
module.exports = {
'extends': [
'standard',
],
'parser': 'babel-eslint',
'rules': {
extends: ['standard', 'standard-jsx'],
globals: {
__DEV__: true,
},
parser: 'babel-eslint',
rules: {
'comma-dangle': ['error', 'always-multiline'],
'no-var': 'error',
'node/no-extraneous-import': 'error',

3
.gitignore vendored
View File

@ -13,6 +13,9 @@
/packages/xo-server/src/xapi/mixins/index.js
/packages/xo-server/src/xo-mixins/index.js
/packages/xo-web/src/common/intl/locales/index.js
/packages/xo-web/src/common/themes/index.js
npm-debug.log
npm-debug.log.*
pnpm-debug.log

View File

@ -4,9 +4,11 @@
"babel-eslint": "^8.1.2",
"eslint": "^4.14.0",
"eslint-config-standard": "^11.0.0-beta.0",
"eslint-config-standard-jsx": "^4.0.2",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-standard": "^3.0.1",
"exec-promise": "^0.7.0",
"flow-bin": "^0.64.0",

View File

@ -1,65 +0,0 @@
# http://EditorConfig.org
#
# Julien Fontanet's configuration
# https://gist.github.com/julien-f/8096213
# Top-most EditorConfig file.
root = true
# Common config.
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespaces = true
# CoffeeScript
#
# https://github.com/polarmobile/coffeescript-style-guide/blob/master/README.md
[*.{,lit}coffee]
indent_size = 2
indent_style = space
# Markdown
[*.{md,mdwn,mdown,markdown}]
indent_size = 4
indent_style = space
# Package.json
#
# This indentation style is the one used by npm.
[/package.json]
indent_size = 2
indent_style = space
# Jade
[*.jade]
indent_size = 2
indent_style = space
# JavaScript
#
# Two spaces seems to be the standard most common style, at least in
# Node.js (http://nodeguide.com/style.html#tabs-vs-spaces).
[*.js]
indent_size = 2
indent_style = space
# Less
[*.less]
indent_size = 2
indent_style = space
# Sass
#
# Style used for http://libsass.com
[*.s[ac]ss]
indent_size = 2
indent_style = space
# YAML
#
# Only spaces are allowed.
[*.yaml]
indent_size = 2
indent_style = space

View File

@ -1,12 +0,0 @@
module.exports = {
extends: ['standard', 'standard-jsx'],
globals: {
__DEV__: true,
},
parser: 'babel-eslint',
rules: {
'comma-dangle': ['error', 'always-multiline'],
'no-var': 'error',
'prefer-const': 'error',
},
}

View File

@ -1,9 +0,0 @@
/dist/
/node_modules/
/src/common/intl/locales/index.js
/src/common/themes/index.js
npm-debug.log
npm-debug.log.*
pnpm-debug.log
pnpm-debug.log.*

View File

@ -1,11 +0,0 @@
language: node_js
node_js:
- '6'
#- '4' # npm 3's flat tree is needed because some packages do not
# declare their deps correctly (e.g. chartist-plugin-tooltip)
cache: yarn
# Use containers.
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# Xen Orchestra Web [![Chat with us](https://storage.crisp.im/plugins/images/936925df-f37b-4ba8-bab0-70cd2edcb0be/badge.svg)](https://go.crisp.im/chat/embed/?website_id=-JzqzzwddSV7bKGtEyAQ) [![Build Status](https://travis-ci.org/vatesfr/xo-web.png?branch=master)](https://travis-ci.org/vatesfr/xo-web)
# Xen Orchestra Web [![Chat with us](https://storage.crisp.im/plugins/images/936925df-f37b-4ba8-bab0-70cd2edcb0be/badge.svg)](https://go.crisp.im/chat/embed/?website_id=-JzqzzwddSV7bKGtEyAQ) [![Build Status](https://travis-ci.org/vatesfr/xen-orchestra.png?branch=master)](https://travis-ci.org/vatesfr/xen-orchestra)
![](http://i.imgur.com/tRffA5y.png)
@ -53,7 +53,7 @@ if (process.env.XOA_PLAN > 3) {
## How to report a bug?
If you are certain the bug is exclusively related to XO-Web, you may use the [bugtracker of this repository](https://github.com/vatesfr/xo-web/issues).
If you are certain the bug is exclusively related to XO-Web, you may use the [bugtracker of this repository](https://github.com/vatesfr/xen-orchestra/issues).
Otherwise, please consider using the [bugtracker of the general repository](https://github.com/vatesfr/xo/issues).

View File

@ -280,11 +280,11 @@ gulp.task(function copyAssets () {
return pipe(
src(['assets/**/*', 'favicon.*']),
src('fontawesome-webfont.*', {
base: __dirname + '/node_modules/font-awesome/fonts', // eslint-disable-line no-path-concat
base: __dirname + '/../../node_modules/font-awesome/fonts', // eslint-disable-line no-path-concat
passthrough: true,
}),
src(['!*.css', 'font-mfizz.*'], {
base: __dirname + '/node_modules/font-mfizz/dist', // eslint-disable-line no-path-concat
base: __dirname + '/../../node_modules/font-mfizz/dist', // eslint-disable-line no-path-concat
passthrough: true,
}),
dest()

View File

@ -10,11 +10,11 @@
"xen-orchestra",
"web"
],
"homepage": "https://github.com/vatesfr/xo-web",
"bugs": "https://github.com/vatesfr/xo-web/issues",
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/packages/xo-web",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xo-web"
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"author": {
"name": "Julien Fontanet",
@ -27,15 +27,13 @@
"dist/"
],
"engines": {
"node": ">=4",
"npm": ">=3"
"node": ">=6"
},
"devDependencies": {
"@nraynaud/novnc": "0.6.1",
"ansi_up": "^2.0.2",
"asap": "^2.0.6",
"babel-core": "^6.26.0",
"babel-eslint": "^8.1.2",
"babel-plugin-dev": "^1.0.0",
"babel-plugin-lodash": "^3.2.11",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
@ -62,18 +60,9 @@
"cookies-js": "^1.2.2",
"d3": "^4.12.2",
"debounce-input-decorator": "^0.1.0",
"dependency-check": "^3.0.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-15": "^1.0.5",
"enzyme-to-json": "^3.3.0",
"eslint": "^4.14.0",
"eslint-config-standard": "^10.2.1",
"eslint-config-standard-jsx": "^4.0.2",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-standard": "^3.0.1",
"event-to-promise": "^0.8.0",
"font-awesome": "^4.7.0",
"font-mfizz": "^2.4.1",
@ -91,15 +80,12 @@
"gulp-uglify": "^3.0.0",
"gulp-watch": "^5.0.0",
"human-format": "^0.10.0",
"husky": "^0.14.3",
"immutable": "^3.8.2",
"index-modules": "^0.3.0",
"is-ip": "^2.0.0",
"jest": "^22.0.4",
"jsonrpc-websocket-client": "^0.2.0",
"kindof": "^2.0.0",
"later": "^1.2.0",
"lint-staged": "^6.0.0",
"lodash": "^4.6.1",
"loose-envify": "^1.1.0",
"make-error": "^1.3.2",
@ -156,19 +142,12 @@
},
"scripts": {
"benchmarks": "./tools/run-benchmarks.js 'src/**/*.bench.js'",
"build": "npm run build-indexes && NODE_ENV=production gulp build",
"build-indexes": "index-modules --auto src",
"build": "NODE_ENV=production gulp build",
"clean": "gulp clean",
"dev": "npm run build-indexes && NODE_ENV=development gulp build",
"dev-test": "jest --watch",
"lint-staged-stash": "touch .lint-staged && git stash save --include-untracked --keep-index && true",
"lint-staged-unstash": "git stash pop && rm -f .lint-staged && true",
"posttest": "eslint --ignore-path .gitignore src/",
"prebuild": "npm run clean",
"precommit": "lint-staged",
"predev": "npm run clean",
"prepublishOnly": "npm run build",
"test": "jest"
"dev": "NODE_ENV=development gulp build",
"prebuild": "yarn run clean && index-modules --auto src",
"predev": "yarn run prebuild",
"prepublishOnly": "yarn run build"
},
"browserify": {
"transform": [
@ -209,21 +188,5 @@
"react",
"stage-0"
]
},
"jest": {
"setupTestFrameworkScriptFile": "./setup-tests.js",
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
},
"lint-staged": {
"*.js": [
"lint-staged-stash",
"prettier --write",
"eslint --fix",
"jest --findRelatedTests --passWithNoTests",
"git add",
"lint-staged-unstash"
]
}
}

View File

@ -19,8 +19,8 @@ $ct-series-colors: (
#a748ca
) !default;
@import "../node_modules/chartist/dist/scss/settings/_chartist-settings";
@import "../node_modules/chartist/dist/scss/chartist";
@import "../../../node_modules/chartist/dist/scss/settings/_chartist-settings";
@import "../../../node_modules/chartist/dist/scss/chartist";
.ct-chart {
display: flex;

View File

@ -48,7 +48,7 @@ const _computeArraysAvg = arrays => {
}
// Arrays can be null.
// See: https://github.com/vatesfr/xo-web/issues/969
// See: https://github.com/vatesfr/xen-orchestra/issues/969
//
// It's a fix to avoid error like `Uncaught TypeError: Cannot read property 'length' of null`.
// FIXME: Repare this bug in xo-server. (Warning: Can break the stats of xo-web v4.)

View File

@ -11,13 +11,13 @@ $brand-danger: #990822;
$brand-warning: #eca649;
$brand-info: #044b7f;
@import "../node_modules/bootstrap/scss/bootstrap";
@import "../../../node_modules/bootstrap/scss/bootstrap";
// -------------------------------------------------------------------
$fa-font-path: "./";
@import "../node_modules/font-awesome/scss/font-awesome";
@import "../../../node_modules/font-awesome/scss/font-awesome";
// Replace Bootstrap's glyphicons by Font Awesome.
.glyphicon {
@ -26,7 +26,7 @@ $fa-font-path: "./";
// -------------------------------------------------------------------
@import "../node_modules/font-mfizz/dist/font-mfizz";
@import "../../../node_modules/font-mfizz/dist/font-mfizz";
// -------------------------------------------------------------------
@ -60,12 +60,12 @@ $side-menu-color: white;
// REACT-VIRTUALIZED ===========================================================
@import '../node_modules/react-virtualized/styles';
@import '../../../node_modules/react-virtualized/styles';
// REACT-SELECT ================================================================
$select-input-height: 40px; // Bootstrap input height
@import '../node_modules/react-select/scss/default';
@import '../../../node_modules/react-select/scss/default';
// Boostrap hack...
.is-searchable {

View File

@ -81,7 +81,7 @@ export default class About extends Component {
</Row>
<Row>
<Col mediumSize={6}>
<a href='https://github.com/vatesfr/xo-web/issues/new'>
<a href='https://github.com/vatesfr/xen-orchestra/issues/new'>
<Icon icon='bug' size={4} />
<h4>{_('bugTracker')}</h4>
</a>

View File

@ -34,7 +34,7 @@ const reportBug = log => {
window.open(
process.env.XOA_PLAN < 5
? `https://xen-orchestra.com/#!/member/support?title=${title}&message=${message}`
: `https://github.com/vatesfr/xo-web/issues/new?title=${title}&body=${message}`
: `https://github.com/vatesfr/xen-orchestra/issues/new?title=${title}&body=${message}`
)
}

File diff suppressed because it is too large Load Diff

4073
yarn.lock

File diff suppressed because it is too large Load Diff