mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
@@ -18,6 +18,10 @@ export interface Configuration {
|
|||||||
* Whether or not the project has a CLI
|
* Whether or not the project has a CLI
|
||||||
*/
|
*/
|
||||||
hasCli: boolean;
|
hasCli: boolean;
|
||||||
|
/**
|
||||||
|
* A list of CI entries to ignore while checking
|
||||||
|
*/
|
||||||
|
ignoreCiEntries: string[];
|
||||||
/**
|
/**
|
||||||
* A list of script names to ignore while checking
|
* A list of script names to ignore while checking
|
||||||
*/
|
*/
|
||||||
@@ -411,6 +415,7 @@ export function getConfiguration(packageJson: any): Configuration {
|
|||||||
const defaultConfiguration: Configuration = {
|
const defaultConfiguration: Configuration = {
|
||||||
forPackaging: true,
|
forPackaging: true,
|
||||||
hasCli: true,
|
hasCli: true,
|
||||||
|
ignoreCiEntries: [],
|
||||||
ignoreScripts: [],
|
ignoreScripts: [],
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
standardBuild: true,
|
standardBuild: true,
|
||||||
@@ -490,7 +495,7 @@ export function getRules(configuration: Configuration): Rules {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// expected values in CI config
|
// expected values in CI config
|
||||||
const ciConfig = {
|
const ciConfig: { [k: string]: any; } = {
|
||||||
/* tslint:disable:object-literal-sort-keys */
|
/* tslint:disable:object-literal-sort-keys */
|
||||||
image: 'registry.gitlab.com/openstapps/projectmanagement/node',
|
image: 'registry.gitlab.com/openstapps/projectmanagement/node',
|
||||||
cache: {
|
cache: {
|
||||||
@@ -536,6 +541,10 @@ export function getRules(configuration: Configuration): Rules {
|
|||||||
/* tslint:enable */
|
/* tslint:enable */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
for (const ignoreCiEntry of configuration.ignoreCiEntries) {
|
||||||
|
delete ciConfig[ignoreCiEntry];
|
||||||
|
}
|
||||||
|
|
||||||
if (configuration.forPackaging) {
|
if (configuration.forPackaging) {
|
||||||
scripts.prepublishOnly = 'npm ci && npm run build';
|
scripts.prepublishOnly = 'npm ci && npm run build';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user