Coder Social home page Coder Social logo

sync's Introduction

primer-sync

Sync Primer CSS SCSS files installed with npm out of node_modules.

If you use Primer CSS with Jekyll on GitHub Pages, this is for you:

npx -p @primer/sync primer-sync

And that's it! All of the Primer CSS source files will be copied to your _sass directory so that you can use them without adding node_modules to your Sass include paths. Then, you can add these files to git instead of node_modules, and your site will build on Pages! ✨

Installation

If you plan on updating Primer CSS regularly, you should add it as a dev dependency with:

npm i -D @primer/sync

Then, whenever you update your @primer/css dependency, you can run it with:

npx primer-sync

Usage

The primer-sync command line script works like this:

primer-sync [options] [<output directory>]

Options:
  --help, -h      Show help                                            [boolean]
  --version       Show version number                                  [boolean]
  --from                                      [string] [default: "node_modules"]
  --packages, -p                               [string] [default: "@primer/css"]
  --files, -f                                             [default: "**/*.scss"]
  --dry-run, -n                                                        [boolean]

For instance:

  • primer-sync foo will copy all of the Primer CSS source files from node_modules to a directory named foo in your current working directory.
  • primer-sync --from ../node_modules src/_sass will tell it to look for your npm modules in ../node_modules and copy them to src/_sass.
  • primer-sync --packages "primer{,-*}" will copy primer and primer-* SCSS files. (Use this with primer dependencies prior to v12.0.0.)
  • primer-sync --files '**/*.md' will copy only Markdown (documentation) files rather than the SCSS sources.
  • primer-sync --dry-run (or primer-sync -n) will print the copy operations so you can confirm what will be copied before actually doing it.

License

MIT © GitHub

sync's People

Contributors

binarymuse avatar seshrs avatar shawnbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sync's Issues

Remove peer dependencies

Dearest.

This project is a nice idea to sync sass files.

It should be called sass-sync instead primer-sync.

And you should remove the peer dependencies.

Regards.

Update to work with @primer/css

This currently only works with the primer and primer-* npm packages; it should be able to find files in @primer/css and sync them, too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.