Skip to content

Commit

Permalink
chore(react-slider): properly apply nx migrate-converged-pkg to adher…
Browse files Browse the repository at this point in the history
…e to new dx setup
  • Loading branch information
Hotell committed Aug 27, 2021
1 parent e2ee214 commit dcd3199
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
3 changes: 3 additions & 0 deletions packages/react-slider/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["module:@fluentui/babel-make-styles", "annotate-pure-calls", "@babel/transform-react-pure-annotations"]
}
5 changes: 4 additions & 1 deletion packages/react-slider/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
const rootMain = require('../../../.storybook/main');

module.exports = /** @type {Pick<import('../../../.storybook/main').StorybookConfig,'addons'|'stories'|'webpackFinal'>} */ ({
module.exports = /** @type {Omit<import('../../../.storybook/main'), 'typescript'|'babel'>} */ ({
...rootMain,
stories: [...rootMain.stories, '../src/**/*.stories.mdx', '../src/**/*.stories.@(ts|tsx)'],
addons: [...rootMain.addons],
webpackFinal: (config, options) => {
const localConfig = { ...rootMain.webpackFinal(config, options) };

// add your own webpack tweaks if needed

return localConfig;
},
});
4 changes: 4 additions & 0 deletions packages/react-slider/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import * as rootPreview from '../../../.storybook/preview';

/** @type {typeof rootPreview.decorators} */
export const decorators = [...rootPreview.decorators];

/** @type {typeof rootPreview.parameters} */
export const parameters = { ...rootPreview.parameters };
12 changes: 7 additions & 5 deletions packages/react-slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
"code-style": "just-scripts code-style",
"just": "just-scripts",
"lint": "just-scripts lint",
"start": "just-scripts dev:storybook",
"start-test": "just-scripts jest-watch",
"test": "just-scripts test",
"update-snapshots": "just-scripts jest -u"
"start": "yarn storybook",
"test": "jest",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-slider/src && yarn docs",
"storybook": "start-storybook"
},
"devDependencies": {
"@fluentui/eslint-plugin": "^1.4.1",
Expand All @@ -37,7 +38,8 @@
"enzyme-adapter-react-16": "^1.15.0",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-test-renderer": "^16.3.0"
"react-test-renderer": "^16.3.0",
"@fluentui/babel-make-styles": "^9.0.0-alpha.40"
},
"dependencies": {
"@fluentui/react-make-styles": "^9.0.0-alpha.59",
Expand Down
7 changes: 3 additions & 4 deletions packages/react-slider/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"target": "ES5",
"target": "ES2019",
"module": "CommonJS",
"lib": ["es5", "dom"],
"lib": ["ES2019", "dom"],
"outDir": "dist",
"jsx": "react",
"declaration": true,
"experimentalDecorators": true,
"importHelpers": true,
"noUnusedLocals": true,
"preserveConstEnums": true,
"types": ["jest", "custom-global", "inline-style-expand-shorthand"],
"isolatedModules": true
"types": ["jest", "custom-global", "inline-style-expand-shorthand", "storybook__addons"]
}
}

0 comments on commit dcd3199

Please sign in to comment.