Skip to content

Repository files navigation

@stackr23/styleobjects

transform stylesheets to JS objects

Build Statusnpm versionGreenkeeper badgeMaintenancePRs Welcome

style.css

.test { font-size:20px; }
.test23 { padding-top:5px; }
.test23 .testInner { font-decoration: none; }

output.js

{test: {'fontSize': '20px'},test23: {'fontSize': '23px',testInner: {'fontDecoration': 'none'}}}

CLI usage

npm install -g @stackr23/styleobjects npx @stackr/styleobjects --input ./style.css --output ./output.js

--input - {String:path | String | URL | Buffer} - required
--outout - {String:path}

webpack usage

@stackr/styleobjects-loader

v2 roadmap

  • ? add eslint
  • refactor core
    • handle subclasses recursively
    • issue #3
    • ES7
      • @babel/register
      • build into /dist
      • refactor build process (rollup? backpack?)
  • mocha tests
    • unit tests
    • test /bin
  • proper option handling
    • add yargs
    • --output-type as (json | module | echo)

inspiration

About

load stylesheets as js-objects

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages