* Update Stylelint and related packages * Autofix CSS files * Fix scss/no-global-function-names * Fix scss/operator-no-unspaced * Fix scss/comment-no-empty * Disable scss/at-extend-no-missing-placeholder * Update libraries for loading sass * Fix Rollup not emitting the CSS for the components package to the right place * Add plugin to re-add stylistic Stylelint rules * Actually import Stylelint plugin
52 строки
1.3 KiB
JavaScript
52 строки
1.3 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// eslint-disable-next-line import/no-unresolved
|
|
import resolve from '@rollup/plugin-node-resolve';
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
import scss from 'rollup-plugin-scss';
|
|
import typescript from '@rollup/plugin-typescript';
|
|
|
|
import packagejson from './package.json';
|
|
|
|
const externals = [
|
|
...Object.keys(packagejson.dependencies || {}),
|
|
...Object.keys(packagejson.peerDependencies || {}),
|
|
'@mattermost/compass-icons/components',
|
|
'lodash/throttle',
|
|
'mattermost-redux',
|
|
'reselect',
|
|
];
|
|
|
|
export default [
|
|
{
|
|
input: 'src/index.tsx',
|
|
output: [
|
|
{
|
|
sourcemap: true,
|
|
file: packagejson.module,
|
|
format: 'es',
|
|
globals: {'styled-components': 'styled'},
|
|
},
|
|
],
|
|
plugins: [
|
|
scss({
|
|
fileName: 'index.esm.css',
|
|
outputToFilesystem: true,
|
|
}),
|
|
resolve({
|
|
browser: true,
|
|
extensions: ['.ts', '.tsx'],
|
|
}),
|
|
commonjs(),
|
|
typescript({
|
|
outputToFilesystem: true,
|
|
}),
|
|
],
|
|
external: externals,
|
|
watch: {
|
|
clearScreen: false,
|
|
},
|
|
},
|
|
];
|