outputs.file('eslint-report.json')
outputs.dir('coverage')
outputs.cacheIf { true }
+
+ dependsOn(yarn)
}
task zip(type: Zip) {
].each {
inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE)
}
- ['babel.config.js', 'package.json', 'tsconfig.json', 'yarn.lock'].each {
+ ['babel.config.js', 'package.json', 'tsconfig.json', 'yarn.lock',
+ '../sonar-web/package.json',
+ '../sonar-web/yarn.lock'
+ ].each {
inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
}
outputs.dir('build/webapp')
outputs.cacheIf { true }
+
+ // sonar-web dependencies needs to be installed before we build sonar-vsts otherwise the sonar-web components
+ // that sonar-vsts depends uppon won't find their node_modules
+ dependsOn(':server:sonar-web:yarn')
args = ['build']
}
build.dependsOn(yarn_run)
].each {
inputs.dir(it)
}
- ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc', '.eslintignore'].each {
+ ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc', '.eslintignore',
+ '../sonar-web/package.json',
+ '../sonar-web/yarn.lock'
+ ].each {
inputs.file(it)
}
outputs.file('eslint-report.json')
outputs.dir('coverage')
outputs.cacheIf { true }
+
+ // sonar-web dependencies needs to be installed before we build sonar-vsts otherwise the sonar-web components
+ // that sonar-vsts depends uppon won't find their node_modules
+ dependsOn(yarn, ':server:sonar-web:yarn')
}
def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")
devtool: production ? 'source-map' : 'cheap-module-source-map',
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
- extensions: ['.ts', '.tsx', '.js', '.json']
+ extensions: ['.ts', '.tsx', '.js', '.json'],
+ alias: {
+ '@sqapi': path.resolve(__dirname, '../../sonar-web/src/main/js/api'),
+ '@sqcomponents': path.resolve(__dirname, '../../sonar-web/src/main/js/components'),
+ '@sqhelpers': path.resolve(__dirname, '../../sonar-web/src/main/js/helpers')
+ }
},
entry: [
!production && require.resolve('react-dev-utils/webpackHotDevClient'),
],
"moduleNameMapper": {
"^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/config/jest/FileStub.js",
- "^.+\\.css$": "<rootDir>/config/jest/CSSStub.js"
+ "^.+\\.css$": "<rootDir>/config/jest/CSSStub.js",
+ "^@sqapi(.*)$": "<rootDir>/../sonar-web/src/main/js/api$1",
+ "^@sqcomponents(.*)$": "<rootDir>/../sonar-web/src/main/js/components$1",
+ "^@sqhelpers(.*)$": "<rootDir>/../sonar-web/src/main/js/helpers$1"
},
"setupFiles": [
"<rootDir>/config/polyfills.js",
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { Component, searchProjects } from '@sqapi/components';
+import { getCurrentUser } from '@sqapi/users';
import LoginForm from './LoginForm';
import ProjectSelector from './ProjectSelector';
-import { Component, searchProjects } from '../../../../../sonar-web/src/main/js/api/components';
import {
Settings,
VSTSWidgetSettings,
serializeWidgetSettings,
parseWidgetSettings
} from '../utils';
-import { getCurrentUser } from '../../../../../sonar-web/src/main/js/api/users';
interface Props {
contribution: string;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { getTextColor } from '@sqhelpers/colors';
+import { getBaseUrl } from '@sqhelpers/urls';
+import { getIdentityProviders } from '@sqapi/users';
import LoginLink from './LoginLink';
import SonarCloudIcon from './SonarCloudIcon';
import * as theme from '../../../../../sonar-web/src/main/js/app/theme';
-import { getIdentityProviders } from '../../../../../sonar-web/src/main/js/api/users';
-import { getTextColor } from '../../../../../sonar-web/src/main/js/helpers/colors';
-import { getBaseUrl } from '../../../../../sonar-web/src/main/js/helpers/urls';
interface Props {
onReload: () => void;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { getBaseUrl } from '../../../../../sonar-web/src/main/js/helpers/urls';
+import { getBaseUrl } from '@sqhelpers/urls';
interface Props {
className?: string;
import * as React from 'react';
import * as classNames from 'classnames';
import { debounce } from 'lodash';
+import { Component } from '@sqapi/components';
import ProjectSelectorItem from './ProjectSelectorItem';
-import { Component } from '../../../../../sonar-web/src/main/js/api/components';
interface Props {
isLoggedIn: boolean;
*/
import * as React from 'react';
import * as classNames from 'classnames';
-import { Component } from '../../../../../sonar-web/src/main/js/api/components';
+import { Component } from '@sqapi/components';
interface Props {
isActive: boolean;
*/
import * as React from 'react';
import * as classNames from 'classnames';
+import { getPathUrlAsString, getProjectUrl } from '@sqhelpers/urls';
+import Tooltip from '@sqcomponents/controls/Tooltip';
import SonarCloudIcon from './SonarCloudIcon';
-import Tooltip from '../../../../../sonar-web/src/main/js/components/controls/Tooltip';
-import {
- getPathUrlAsString,
- getProjectUrl
-} from '../../../../../sonar-web/src/main/js/helpers/urls';
interface Props {
component: T.ComponentMeasure;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { IconProps } from '../../../../../sonar-web/src/main/js/components/icons-components/Icon';
+import { IconProps } from '@sqcomponents/icons-components/Icon';
export default function SonarCloudIcon({ className, fill = '#f3702a', size = 18 }: IconProps) {
return (
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { getMeasuresAndMeta } from '@sqapi/measures';
import QGWidget from './QGWidget';
import LoginForm from './LoginForm';
-import { getMeasuresAndMeta } from '../../../../../sonar-web/src/main/js/api/measures';
import { Settings } from '../utils';
interface Props {
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
- "*": ["../sonar-web/node_modules/@types/*", "./node_modules/@types/*", "*"]
+ "@sqapi/*": ["../sonar-web/src/main/js/api/*"],
+ "@sqcomponents/*": ["../sonar-web/src/main/js/components/*"],
+ "@sqhelpers/*": ["../sonar-web/src/main/js/helpers/*"],
+ "*": ["./node_modules/@types/*", "../sonar-web/node_modules/@types/*", "*"]
},
"sourceMap": true
},
outputs.file('eslint-report.json')
outputs.dir('coverage')
outputs.cacheIf { true }
+
+ dependsOn(yarn)
}
def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")