New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stylup

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylup - npm Package Compare versions

Comparing version 0.0.0-alpha.1 to 0.0.0-alpha.2

21

index.js

@@ -1,9 +0,12 @@

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var phtml = require('phtml');
var phtml__default = _interopDefault(phtml);
var _ = _interopDefault(require('lodash'));
var _ = require('lodash');
var commonTags = require('common-tags');
var fs = _interopDefault(require('fs-extra'));
var fs = require('fs-extra');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var phtml__default = /*#__PURE__*/_interopDefaultLegacy(phtml);
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
function genRegex(opts) {

@@ -44,3 +47,3 @@ let tokens = {};

tokens = _.reduce(tokens, function (result, value, key) {
tokens = ___default['default'].reduce(tokens, function (result, value, key) {
return Object.assign({}, result, {

@@ -51,3 +54,3 @@ [key]: replaceTokenIdent(value, tokens)

return _.reduce(tokens, function (result, value, key) {
return ___default['default'].reduce(tokens, function (result, value, key) {
return Object.assign({}, result, {

@@ -110,3 +113,3 @@ [key]: new RegExp(value.replace(/\//g, ''), 'gmi')

if (fs.existsSync(process.cwd() + '/' + 'stylup.config.js')) {
if (fs__default['default'].existsSync(process.cwd() + '/' + 'stylup.config.js')) {
rules = require(process.cwd() + '/' + 'stylup.config.js').classes; // console.log(rules)

@@ -190,3 +193,3 @@ } else {

var index = new phtml__default.Plugin('phtml-utility-class', opts => {
var index = new phtml__default['default'].Plugin('phtml-utility-class', opts => {
opts = opts || {};

@@ -193,0 +196,0 @@ return {

{
"name": "stylup",
"version": "0.0.0-alpha.1",
"version": "0.0.0-alpha.2",
"description": "Write utility classes conveniently while optimising your CSS",

@@ -30,9 +30,9 @@ "author": "Gavin McFarland <5551+limitlessloop@users.noreply.github.com>",

"dependencies": {
"lodash": "^4.17.14",
"lodash": "^4.17.20",
"phtml": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"autoprefixer": "^9.8.4",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"autoprefixer": "^10.2.1",
"babel-eslint": "^10.0.1",

@@ -43,8 +43,8 @@ "common-tags": "^1.8.0",

"phtml-tape": "^4.1.0",
"postcss": "^7.0.32",
"postcss-load-config": "^2.1.0",
"postcss": "^8.2.4",
"postcss-load-config": "^3.0.0",
"pre-commit": "^1.2.2",
"rollup": "^1.12.1",
"rollup": "^2.36.2",
"rollup-plugin-babel": "^4.3.2",
"shortid": "^2.2.15",
"shortid": "^2.2.16",
"uniqid": "^5.2.0"

@@ -51,0 +51,0 @@ },

@@ -9,5 +9,10 @@ # Stylup [<img src="https://phtml.io/logo.svg" alt="pHTML" width="90" height="90" align="right">][phtml]

- Automatically processes style tags `<style>` and inline styles `style=""`.
- Fully featured CSS can be used inside inline styles.
- Support for functional class names with dynamic arguments.
## Example
Use to write inteligent functional classes based on their arguments.
Write inteligent functional classes based on their arguments.

@@ -45,18 +50,6 @@ ```html

- ### Functional Class Names
- ### Supports PostCSS
Use inteligent functional class names. Seperate arguments with commas. Use a wildcard to skip arguments. See below for [configuring](#configure) your own class names.
Add support for PostCSS by including a `postcss.config.js` file in your project.
```html
<div class="p-4 m-*,auto fl-wrap"></div>
```
<!-- ---
- ### Pseudo Classes and Media Queries <mark>(planned)</mark>
Configure support for pseduo classes and media queries.
```html
<div class="h?c-red p-[1,2],4 h?w-1/2"></div>
``` -->
---

@@ -74,6 +67,18 @@

- ### Supports PostCSS
- ### Functional Class Names
Add support for PostCSS by including a `postcss.config.js` file in your project.
Use inteligent functional class names. Seperate arguments with commas. Use a wildcard to skip arguments. See below for [configuring](#configure) class names.
```html
<div class="p-4 m-*,auto fl-wrap"></div>
```
<!-- ---
- ### Pseudo Classes and Media Queries <mark>(planned)</mark>
Configure support for pseduo classes and media queries.
```html
<div class="h?c-red p-[1,2],4 h?w-1/2"></div>
``` -->
---

@@ -80,0 +85,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc