Skip to content

Commit

Permalink
Merge pull request #1350 from Adslot/type-defs--on-esm-branch
Browse files Browse the repository at this point in the history
[ADS-6363][ASC-22] feat: add type definitions
  • Loading branch information
xiaofan2406 authored Apr 5, 2022
2 parents e8a4fa0 + be74499 commit ec1389a
Show file tree
Hide file tree
Showing 136 changed files with 5,048 additions and 550 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"root": true,
"plugins": ["jest-dom"],
"extends": ["adslot", "plugin:jest-dom/recommended"],
"extends": ["adslot", "plugin:jest-dom/recommended", "plugin:import/typescript"],
"settings": {
"lodash": {
"version": 4
}
},
"rules": {
"no-console": ["error", { "allow": ["warn", "error"] }]
"no-console": ["error", { "allow": ["warn", "error"] }],
"@typescript-eslint/no-explicit-any": "off"
}
}
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,32 @@ npm run test:watch [-- <path>] [--coverage]

# Optimize SVG before you commit
npm run svgo

# Generating types

# Generate types for all components
npm run generate-types

# Generate types for a single component
npm run generate-types -- --only=Button

# Generate types for a single component (this will run for all jsx files in the folder matching Button)
npm run generate-types -- --only=Button

# Generate types for a specific file
npm run generate-types -- --only=Button/index.jsx

# globs are accepted:
npm run generate-types -- --only="RichTe*"

# Copy generated types to es/*
npm run generate-types -- --copy

#Generate types with debugging output
npm run generate-types -- --debug

#Check validity of generated types
npm run type-check
```

## Build Profiling
Expand Down
3 changes: 3 additions & 0 deletions config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
module.exports = {
appBuild: resolveApp('docs'),
appDist: resolveApp('dist'),
appDistEs: resolveApp('es'),
appDistCjs: resolveApp('lib'),
appPublic: resolveApp('www'),
appHtml: resolveApp('www/index.html'),
appIndexJs: resolveApp('www/index.jsx'),
appDistJs: resolveApp('src/index.js'),
appPackageJson: resolveApp('package.json'),
appDemo: resolveApp('www'),
appSrc: resolveApp('src'),
appDir: resolveApp(''),
appNodeModules: resolveApp('node_modules'),
assetsPath: resolveApp('www/assets'),
redirectPath: resolveApp('www/_redirects'),
Expand Down
Loading

0 comments on commit ec1389a

Please sign in to comment.