agu-z / sass3js Goto Github PK
View Code? Open in Web Editor NEWConvert SASS variables to JS or TS
License: MIT License
Convert SASS variables to JS or TS
License: MIT License
At the moment, we only support SCSS syntax. It should be relatively straightforward to update the regex so that it supports both.
Hurry! Hurry! Hurry! Support @ import import and! Default keyword @ @agu-z
Hi,
I'm trying to use sass3js
from the command line in Arch Linux, so far all I've been able to get it to return is an empty module.exports
object
I have tried the stdin
piping, default everything, or json
and ts
filetypes, and also the tabs example, none of it has any different effect. To be explicit, here's 3 examples:
sass3js _jumbotron.scss
cat _jumbotron.scss | sass3js -f json > jumbotron.json
sass3js -f ts -t $'\t' _jumbotron.scss jumbotron.ts
$ for i in $(ls jumbotron.* | cut -d '.' -f2); do printf jumbotron."$i":" "; cat jumbotron."$i"; printf '\n'; done
Result:
jumbotron.js: module.exports = {};
jumbotron.json: {}
jumbotron.ts: export default {};
I am currently setting up nodemon
to explore sass3js
as a require
, maybe I can get it to run inside a project - any idea why it might not run from CLI?
Env:
$ uname -a && cat /etc/os-release && echo 'npm version: v'`npm -v` && echo 'node version: '`node -v` && echo 'dart-sass ver
sion v'`sass --version`
Linux wharfrat 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux
npm version: v7.24.2
node version: v14.17.4
dart-sass version v1.41.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.