@omni-door/tpl-common
The omni-door commom templates
Last updated 3 months ago by bobby.li .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @omni-door/tpl-common 
SYNC missed versions from official npm registry.

???? @omni-door/tpl-common

The common templates for @omni-door

Install

  • Clone the repo: git clone git@github.com: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'); // 'react@16.12.0'
    
  • 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)

Current Tags

  • 0.0.5                                ...           latest (3 months ago)

5 Versions

  • 0.0.5                                ...           3 months ago
  • 0.0.4                                ...           3 months ago
  • 0.0.3                                ...           3 months ago
  • 0.0.2                                ...           3 months ago
  • 0.0.1                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (11)

Copyright 2014 - 2016 © taobao.org |