Enable the storybook for process-services-clod (#7286)

This commit is contained in:
Maurizio Vitale 2021-10-08 11:48:28 +01:00 committed by GitHub
parent 8e9bf9cc9b
commit 3bcc106a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 22355 additions and 53 deletions

11
.storybook/main.js Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
stories: [],
addons: ['@storybook/addon-essentials'],
// uncomment the property below if you want to apply some webpack config globally
// webpackFinal: async (config, { configType }) => {
// // Make whatever fine-grained changes you need that should apply to all storybook configs
// // Return the altered config
// return config;
// },
};

10
.storybook/tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"extends": "../tsconfig.base.json",
"exclude": [
"../**/*.spec.js",
"../**/*.spec.ts",
"../**/*.spec.tsx",
"../**/*.spec.jsx"
],
"include": ["../**/*"]
}

View File

@ -0,0 +1,12 @@
/**
* Export a function. Accept the base config as the only param.
* @param {Object} options
* @param {Required<import('webpack').Configuration>} options.config
* @param {'DEVELOPMENT' | 'PRODUCTION'} options.mode - change the build configuration. 'PRODUCTION' is used when building the static version of storybook.
*/
module.exports = async ({ config, mode }) => {
// Make whatever fine-grained changes you need
// Return the altered config
return config;
};

View File

@ -551,6 +551,39 @@
"**/node_modules/**"
]
}
},
"storybook": {
"builder": "@nrwl/storybook:storybook",
"options": {
"uiFramework": "@storybook/angular",
"port": 4400,
"config": {
"configFolder": "lib/process-services-cloud/.storybook"
}
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"build-storybook": {
"builder": "@nrwl/storybook:build",
"outputs": [
"{options.outputPath}"
],
"options": {
"uiFramework": "@storybook/angular",
"outputPath": "dist/storybook/process-services-cloud",
"config": {
"configFolder": "lib/process-services-cloud/.storybook"
}
},
"configurations": {
"ci": {
"quiet": true
}
}
}
}
},

1
lib/.gitignore vendored
View File

@ -27,6 +27,7 @@ insights/**/*.js.map
insights/**/*.d.ts
process-services-cloud/**/*.js
!process-services-cloud/.storybook/*.js
!process-services-cloud/karma.conf.js
process-services-cloud/**/*.js.map
process-services-cloud/**/*.d.ts

View File

@ -0,0 +1,27 @@
const rootMain = require('../../../.storybook/main');
module.exports = {
...rootMain,
core: { ...rootMain.core, builder: 'webpack4' },
stories: [
...rootMain.stories,
'../src/lib/**/*.stories.mdx',
'../src/lib/**/task-header-cloud.component.stories.@(js|jsx|ts|tsx)'
],
addons: [...rootMain.addons ],
webpackFinal: async (config, { configType }) => {
// apply any global webpack configs that might have been specified in .storybook/main.js
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}
// add your own webpack tweaks if needed
return config;
},
};

View File

@ -0,0 +1,3 @@
export const parameters = {
docs: { inlineStories: true }
}

View File

@ -0,0 +1,10 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"emitDecoratorMetadata": true
},
"exclude": ["../**/*.spec.ts" ],
"include": ["../src/**/*", "*.js"]
}

22187
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -116,8 +116,13 @@
"@angular/cli": "^10.2.2",
"@angular/compiler-cli": "^10.0.12",
"@nrwl/schematics": "8.12.11",
"@nrwl/storybook": "^12.9.0",
"@nrwl/workspace": "^11.2.11",
"@paperist/types-remark": "0.1.3",
"@storybook/addon-essentials": "~6.3.0",
"@storybook/angular": "~6.3.0",
"@storybook/builder-webpack5": "~6.3.0",
"@storybook/manager-webpack5": "~6.3.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/minimatch": "^3.0.3",

55
tsconfig.base.json Normal file
View File

@ -0,0 +1,55 @@
{
"compileOnSave": false,
"compilerOptions": {
"downlevelIteration": true,
"module": "esnext",
"rootDir": ".",
"outDir": "./dist/out-tsc",
"baseUrl": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"target": "es2015",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"typeRoots": [
"node_modules/@types"
],
"types": ["jasmine", "node", "jasminewd2"],
"lib": [
"es2018",
"esnext.array",
"esnext.asynciterable",
"dom"
],
"paths": {
"@alfresco/js-api": ["node_modules/@alfresco/js-api"],
"@alfresco/adf-extensions": ["lib/extensions"],
"@alfresco/adf-core": ["lib/core"],
"@alfresco/adf-content-services": ["lib/content-services"],
"@alfresco/adf-process-services": ["lib/process-services"],
"@alfresco/adf-insights": ["lib/insights"],
"@alfresco/adf-process-services-cloud": ["lib/process-services-cloud"],
"@alfresco/adf-testing": ["lib/testing"]
}
},
"exclude": [
"lib/config",
"integration",
"scripts",
"assets",
"tools",
"node_modules"
],
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"strictTemplates": true
}
}

View File

@ -1,55 +1,3 @@
{
"compileOnSave": false,
"compilerOptions": {
"downlevelIteration": true,
"module": "esnext",
"rootDir": ".",
"outDir": "./dist/out-tsc",
"baseUrl": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"target": "es2015",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"typeRoots": [
"node_modules/@types"
],
"types": ["jasmine", "node", "jasminewd2"],
"lib": [
"es2018",
"esnext.array",
"esnext.asynciterable",
"dom"
],
"paths": {
"@alfresco/js-api": ["node_modules/@alfresco/js-api"],
"@alfresco/adf-extensions": ["lib/extensions"],
"@alfresco/adf-core": ["lib/core"],
"@alfresco/adf-content-services": ["lib/content-services"],
"@alfresco/adf-process-services": ["lib/process-services"],
"@alfresco/adf-insights": ["lib/insights"],
"@alfresco/adf-process-services-cloud": ["lib/process-services-cloud"],
"@alfresco/adf-testing": ["lib/testing"]
}
},
"exclude": [
"lib/config",
"integration",
"scripts",
"assets",
"tools",
"node_modules"
],
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"strictTemplates": true
}
"extends": "./tsconfig.base.json"
}