css-to-lit-js
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

css-to-lit-js

Build Status MEAN Module npm version Node.js Version

Convert CSS to lit JavaScript file

Installation

npm i css-to-lit-js -g

Usage

Given a CSS file like:

body {
  background-color: #ededed;
}

Run css-to-lit-js:

css-to-lit-js a.css

It generates a a.css.js:

import { css } from 'lit';
export default css`
  body {
    background-color: #ededed;
  }
`;

Options

  • --ext sets the extension for the output file, defaults to js, e.g. css-to-lit-js a.css --ext ts.

API

Install css-to-lit-js locally:

npm add css-to-lit-js
import convert from 'css-to-lit-js';

convert(`
body {
  background-color: #ededed;
}`);
/*
  Returns the following string:

import { css } from 'lit';
export default css`
  body {
    background-color: #ededed;
  }
`;

*/

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.8.00latest

Version History

VersionDownloads (Last 7 Days)Published
0.8.00
0.7.00
0.6.00
0.5.10
0.5.00
0.4.20
0.4.10
0.4.00
0.3.00
0.2.00
0.1.10
0.1.00

Package Sidebar

Install

npm i css-to-lit-js

Weekly Downloads

0

Version

0.8.0

License

MIT

Unpacked Size

7.95 kB

Total Files

9

Last publish

Collaborators

  • mgenware