Comparing version 1.0.0-ruby-0 to 1.0.0-ruby-1
{ | ||
"name": "alga-css", | ||
"version": "1.0.0-ruby-0", | ||
"version": "1.0.0-ruby-1", | ||
"description": "Alga CSS is a scope or component-first CSS toolkit for quickly mix or compose CSS components and properties", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -14,2 +14,3 @@ const chokidar = require('chokidar') | ||
const extraction = require('./cores/extraction.js') | ||
const render = require('./cores/render.js') | ||
const packages = require('./cores/package.js') | ||
@@ -35,3 +36,11 @@ | ||
const watcher = chokidar.watch(options?.extract, { | ||
let watchFiles = [] | ||
if(options?.extract) { | ||
watchFiles = [...watchFiles, ...Array.from(options.extract)] | ||
} | ||
if(options?.src) { | ||
watchFiles = [...watchFiles, ...Array.from(options.src)] | ||
} | ||
const watcher = chokidar.watch(watchFiles, { | ||
ignored: /(^|[\/\\])\../, // ignore dotfiles | ||
@@ -139,2 +148,12 @@ persistent: true | ||
root.walkAtRules('ref', rule => { | ||
let params = rule.params.trim().split(',') | ||
if(params.length >= 1) { | ||
let newRender = render(params, rule.source, {...opts}) | ||
rule.replaceWith(newRender) | ||
} else { | ||
rule.remove() | ||
} | ||
}) | ||
let newPackNodes = [] | ||
@@ -141,0 +160,0 @@ const filterPackNodes = [] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
153020
53
1960