@omni-door/tpl-common
v0.0.5
Published
The omni-door commom templates
Downloads
35
Maintainers
Readme
🐸 @omni-door/tpl-common
The common templates for @omni-door
Install
Clone the repo:
git clone [email protected]:omni-door/tpl-common.git
Install with npm:
npm install @omni-door/tpl-common
Install with Yarn:
yarn add @omni-door/tpl-common
Methods
getDependency
import { getDependency } from '@omni-door/tpl-common'; const dependency = getDependency('latest', { 'core-js': '3.6.4', 'react': '16.12.0', 'react-dom': '16.12.0', 'regenerator-runtime': '0.13.3' }); const dependency_stable = getDependency('stable', { 'core-js': '3.6.4', 'react': '16.12.0', 'react-dom': '16.12.0', 'regenerator-runtime': '0.13.3' }); dependency('react'); // 'react@latest' dependency_stable('react'); // '[email protected]'
arr2str
import { arr2str } from '@omni-door/tpl-common'; arr2str([1, 2, 3]); // "1 2 3"
intersection
import { intersection } from '@omni-door/tpl-common'; depArr = [ ...intersection(depArr, depArr.filter(v => v !== 1)) ]
Templates
babel => babel.config.js
commitlint => commitlint.config.js
eslint => .eslintrc.js
eslintignore => .eslintignore
gitignore => .gitignore
jest => jest.config.js
karma => karma.config.js
mocha => mocha.opts
npmignore => .npmignore
omni => omni.config.js
pkj => package.json
readme => README.md
stylelint => stylelint.config.js
tsconfig => tsconfig.json
component_class => component/index.(jsx|tsx)
component_functional => component/index.(jsx|tsx)
component_index => component/index.(js|ts)
component_readme => component/README.md
component_stylesheet => component/style/index.(css|less|scss)
component_test => component/test/index.(jsx|tsx)
component_mdx => component/README.mdx
component_stories => component/stories/index.(jsx|tsx)
tool_index => tool/index.(js|ts)
tool_readme => tool/README.md
tool_test => tool/test/index.(js|ts)