Skip to content

Commit

Permalink
Enable the storybook for process-services-clod (#7286)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriziovitale committed Oct 8, 2021
1 parent 8e9bf9c commit 3bcc106
Show file tree
Hide file tree
Showing 12 changed files with 35,056 additions and 12,754 deletions.
11 changes: 11 additions & 0 deletions .storybook/main.js
@@ -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 changes: 10 additions & 0 deletions .storybook/tsconfig.json
@@ -0,0 +1,10 @@
{
"extends": "../tsconfig.base.json",
"exclude": [
"../**/*.spec.js",
"../**/*.spec.ts",
"../**/*.spec.tsx",
"../**/*.spec.jsx"
],
"include": ["../**/*"]
}
12 changes: 12 additions & 0 deletions .storybook/webpack.config.js
@@ -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;
};
33 changes: 33 additions & 0 deletions angular.json
Expand Up @@ -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
}
}
}
}
},
Expand Down
1 change: 1 addition & 0 deletions lib/.gitignore
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions lib/process-services-cloud/.storybook/main.js
@@ -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;
},
};
3 changes: 3 additions & 0 deletions lib/process-services-cloud/.storybook/preview.js
@@ -0,0 +1,3 @@
export const parameters = {
docs: { inlineStories: true }
}
10 changes: 10 additions & 0 deletions lib/process-services-cloud/.storybook/tsconfig.json
@@ -0,0 +1,10 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"emitDecoratorMetadata": true

},

"exclude": ["../**/*.spec.ts" ],
"include": ["../src/**/*", "*.js"]
}

0 comments on commit 3bcc106

Please sign in to comment.