项目作者: fantasyui-com

项目描述 :
Transport select remote CSS declarations into the rule of a local css file (Select and inject remote CSS code into your local CSS file). [CLI, CSS, Web Design, PostCSS]
高级语言: JavaScript
项目地址: git://github.com/fantasyui-com/larceny.git
创建时间: 2017-07-27T18:02:36Z
项目社区:https://github.com/fantasyui-com/larceny

开源协议:GNU General Public License v3.0

下载


larceny

Command line interface to PostCSS theft plugin.

NPX

  1. $ npx larceny -ca -u https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css -s .btn -t .my-button -f my-style.css

NPM -g Installation

  1. $ npm -g install larceny

Prepare a CSS file (optional if -ca is used)

You can skip this step if you use -c to create target file and -a to append then missing .my-button target selector.

  1. $ echo '.my-button {}' > style.css

Perpetrate Larceny <3

  1. $ larceny -u https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css -s .btn -t .my-button -f style.css

The perfect crime.

  1. $ cat style.css
  2. .my-button {
  3. display: inline-block;
  4. font-weight: 400;
  5. line-height: 1.25;
  6. text-align: center;
  7. white-space: nowrap;
  8. vertical-align: middle;
  9. -webkit-user-select: none;
  10. -moz-user-select: none;
  11. -ms-user-select: none;
  12. user-select: none;
  13. border: 1px solid transparent;
  14. padding: .5rem 1rem;
  15. font-size: 1rem;
  16. border-radius: .25rem;
  17. -webkit-transition: all .2s ease-in-out;
  18. -o-transition: all .2s ease-in-out;
  19. transition: all .2s ease-in-out;
  20. }

Usage

  1. -V, --version output the version number
  2. -u, --url [url] Url of remote file.
  3. -s, --source-selector [selector] Source selector
  4. -t, --target-selector [selector] Target selector (in local file)
  5. -f, --file [path] Add the specified type of cheese [styles.css]
  6. -c, --create-file Create css file if it does not exist
  7. -a, --append-target Create target selector if missing
  8. -h, --help output usage information