Skip to content

Commit 03174d7

Browse files
committed
feat: support dart sass
1 parent 1695691 commit 03174d7

File tree

4 files changed

+3350
-8
lines changed

4 files changed

+3350
-8
lines changed

.circleci/config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
defaults: &defaults
3+
docker:
4+
- image: 'cimg/node:18.12.1'
5+
jobs:
6+
release:
7+
<<: *defaults
8+
steps:
9+
- checkout
10+
- run:
11+
name: install
12+
command: yarn install
13+
- run:
14+
name: release
15+
command: yarn semantic-release || true
16+
workflows:
17+
version: 2
18+
master:
19+
jobs:
20+
- release:
21+
context: devops-dev
22+
filters:
23+
branches:
24+
only:
25+
- master

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@
1717
let output;
1818
switch (value.constructor.name) {
1919
case 'SassList':
20+
case 'sass.types.List':
2021
output = [];
2122
for (let i = 0; i < value.getLength(); i++) {
2223
output.push(get_value(value.getValue(i), options));
2324
}
2425
break;
2526
case 'SassMap':
27+
case 'sass.types.Map':
2628
output = {};
2729
for (let i = 0; i < value.getLength(); i++) {
2830
output[value.getKey(i).getValue()] = get_value(value.getValue(i), options);
2931
}
3032
break;
3133
case 'SassColor':
34+
case 'sass.types.Color':
3235
if (1 === value.getA()) {
3336
if (options.hex_color) {
3437
output = '#' + toHex(value.getR()) + toHex(value.getG()) + toHex(value.getB());
@@ -42,6 +45,7 @@
4245
}
4346
break;
4447
case 'SassNumber':
48+
case 'sass.types.Number':
4549
output = value.getValue();
4650
if (value.getUnit()) {
4751
output += value.getUnit();

package.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "node-sass-export",
2+
"name": "@moda/node-sass-export",
33
"version": "0.0.7",
44
"description": "lightweight extension that allows you to export an encoded Sass variables (map, list, etc) into an external JSON file",
55
"main": "index.js",
@@ -11,19 +11,24 @@
1111
"json",
1212
"export"
1313
],
14-
"author": "punkundead",
15-
"license": "BSD-2-Clause",
14+
"author": "ModaOperandi",
15+
"license": "MIT",
1616
"dependencies": {},
17-
"devDependencies": {},
17+
"devDependencies": {
18+
"semantic-release": "^19.0.5"
19+
},
1820
"engines": {
19-
"node": ">= 12.0.0"
21+
"node": ">= 18.0.0"
2022
},
2123
"repository": {
2224
"type": "git",
23-
"url": "git+https://github.com/Punk-UnDeaD/node-sass-export.git"
25+
"url": "git+https://github.com/ModaOperandi/node-sass-export.git"
2426
},
2527
"bugs": {
26-
"url": "https://github.com/Punk-UnDeaD/node-sass-export/issues"
28+
"url": "https://github.com/ModaOperandi/node-sass-export/issues"
2729
},
28-
"homepage": "https://github.com/Punk-UnDeaD/node-sass-export#readme"
30+
"homepage": "https://github.com/ModaOperandi/node-sass-export#readme",
31+
"publishConfig": {
32+
"access": "public"
33+
}
2934
}

0 commit comments

Comments
 (0)