Skip to content

Commit b7dc053

Browse files
committed
move metadata from package.json to metadata.json
1 parent df9aff0 commit b7dc053

3 files changed

Lines changed: 130 additions & 127 deletions

File tree

main.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,6 @@ class CSS
172172

173173
endSelector()
174174

175-
metadata = require './package.json'
175+
metadata = require './settings.json'
176176

177177
module.exports = {defineVariable, renderVariable, setAutoprefixer, setNumberValue, renderClass: CSS, metadata}

metadata.json

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"name": "csshat-language-css",
3+
"title": "CSS",
4+
"scope": "source.css",
5+
"codeLanguage": true,
6+
"settings": {
7+
"inheritFontStyles": {
8+
"description": "Group common styles for selected layers.",
9+
"type": "boolean",
10+
"default": true
11+
},
12+
"showComments": {
13+
"description": "Show a brief description of selected layers.",
14+
"type": "boolean",
15+
"default": true
16+
},
17+
"showAbsolutePositions": {
18+
"description": "Show absolute X and Y coordinates for all layers.",
19+
"type": "boolean",
20+
"default": false
21+
},
22+
"useColorName": {
23+
"description": "Show color name values of common colors rather than hex codes.",
24+
"type": "boolean",
25+
"default": true
26+
},
27+
"vendorPrefixes": {
28+
"description": "Generate vendor prefixes like `display: -webkit-flex;`",
29+
"type": "boolean",
30+
"default": true
31+
},
32+
"boxSizing": {
33+
"type": "select",
34+
"options": [
35+
"border-box",
36+
"content-box"
37+
],
38+
"default": "border-box"
39+
},
40+
"unit": {
41+
"type": "select",
42+
"options": [
43+
"px",
44+
"em",
45+
"rem"
46+
],
47+
"default": "px"
48+
},
49+
"lineHeightUnit": {
50+
"type": "select",
51+
"options": [
52+
"Use selected unit",
53+
"Unitless (number multiplied by the element's font size)",
54+
"px",
55+
"em",
56+
"rem"
57+
],
58+
"default": "Use selected unit"
59+
},
60+
"emValue": {
61+
"description": "1 em = x px — Ammount of pixels that correspond to one em. Em value is **not** relative to parent element.",
62+
"type": "text",
63+
"default": 16,
64+
"validate": "setNumberValue",
65+
"showFor": [
66+
"unit",
67+
"lineHeightUnit"
68+
],
69+
"showWhen": "em"
70+
},
71+
"remValue": {
72+
"description": "1 rem = x px — Ammount of pixels that correspond to one rem",
73+
"type": "text",
74+
"default": 16,
75+
"validate": "setNumberValue",
76+
"showFor": [
77+
"unit",
78+
"lineHeightUnit"
79+
],
80+
"showWhen": "rem"
81+
},
82+
"autoprefixer": {
83+
"description": "Defines which vendor prefixes will be generated. Read more on [Github](https://github.com/postcss/autoprefixer).",
84+
"type": "text",
85+
"validate": "setAutoprefixer",
86+
"default": "> 1%, last 2 versions, Firefox ESR, Opera 12.1"
87+
},
88+
"selector": {
89+
"description": "Wrap code in a css selector.",
90+
"type": "boolean",
91+
"default": false
92+
},
93+
"selectorType": {
94+
"type": "select",
95+
"options": [
96+
"id",
97+
"class",
98+
"element"
99+
],
100+
"default": "class"
101+
},
102+
"selectorTextStyle": {
103+
"type": "select",
104+
"options": [
105+
"dash-case",
106+
"snake_case",
107+
"camelCase"
108+
],
109+
"default": "dash-case"
110+
},
111+
"colorType": {
112+
"type": "select",
113+
"options": [
114+
"hex",
115+
"rgb",
116+
"hsl"
117+
],
118+
"default": "hex"
119+
},
120+
"quoteType": {
121+
"type": "select",
122+
"options": [
123+
"'",
124+
"\""
125+
],
126+
"default": "\""
127+
}
128+
}
129+
}

package.json

Lines changed: 0 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"name": "csshat-language-css",
3-
"title": "CSS",
43
"version": "2.1.6",
54
"description": "CSS language",
65
"main": "main",
7-
"scope": "source.css",
8-
"codeLanguage": true,
96
"engines": {
107
"csshat": "~2.0.0",
118
"avocode": "*"
@@ -29,129 +26,6 @@
2926
"autoprefixer-core": "^4.0.2",
3027
"octopus-helpers": "^1.5.0"
3128
},
32-
"settings": {
33-
"inheritFontStyles": {
34-
"description": "Group common styles for selected layers.",
35-
"type": "boolean",
36-
"default": true
37-
},
38-
"showComments": {
39-
"description": "Show a brief description of selected layers.",
40-
"type": "boolean",
41-
"default": true
42-
},
43-
"showAbsolutePositions": {
44-
"description": "Show absolute X and Y coordinates for all layers.",
45-
"type": "boolean",
46-
"default": false
47-
},
48-
"useColorName": {
49-
"description": "Show color name values of common colors rather than hex codes.",
50-
"type": "boolean",
51-
"default": true
52-
},
53-
"vendorPrefixes": {
54-
"description": "Generate vendor prefixes like `display: -webkit-flex;`",
55-
"type": "boolean",
56-
"default": true
57-
},
58-
"boxSizing": {
59-
"type": "select",
60-
"options": [
61-
"border-box",
62-
"content-box"
63-
],
64-
"default": "border-box"
65-
},
66-
"unit": {
67-
"type": "select",
68-
"options": [
69-
"px",
70-
"em",
71-
"rem"
72-
],
73-
"default": "px"
74-
},
75-
"lineHeightUnit": {
76-
"type": "select",
77-
"options": [
78-
"Use selected unit",
79-
"Unitless (number multiplied by the element's font size)",
80-
"px",
81-
"em",
82-
"rem"
83-
],
84-
"default": "Use selected unit"
85-
},
86-
"emValue": {
87-
"description": "1 em = x px — Ammount of pixels that correspond to one em. Em value is **not** relative to parent element.",
88-
"type": "text",
89-
"default": 16,
90-
"validate": "setNumberValue",
91-
"showFor": [
92-
"unit",
93-
"lineHeightUnit"
94-
],
95-
"showWhen": "em"
96-
},
97-
"remValue": {
98-
"description": "1 rem = x px — Ammount of pixels that correspond to one rem",
99-
"type": "text",
100-
"default": 16,
101-
"validate": "setNumberValue",
102-
"showFor": [
103-
"unit",
104-
"lineHeightUnit"
105-
],
106-
"showWhen": "rem"
107-
},
108-
"autoprefixer": {
109-
"description": "Defines which vendor prefixes will be generated. Read more on [Github](https://github.com/postcss/autoprefixer).",
110-
"type": "text",
111-
"validate": "setAutoprefixer",
112-
"default": "> 1%, last 2 versions, Firefox ESR, Opera 12.1"
113-
},
114-
"selector": {
115-
"description": "Wrap code in a css selector.",
116-
"type": "boolean",
117-
"default": false
118-
},
119-
"selectorType": {
120-
"type": "select",
121-
"options": [
122-
"id",
123-
"class",
124-
"element"
125-
],
126-
"default": "class"
127-
},
128-
"selectorTextStyle": {
129-
"type": "select",
130-
"options": [
131-
"dash-case",
132-
"snake_case",
133-
"camelCase"
134-
],
135-
"default": "dash-case"
136-
},
137-
"colorType": {
138-
"type": "select",
139-
"options": [
140-
"hex",
141-
"rgb",
142-
"hsl"
143-
],
144-
"default": "hex"
145-
},
146-
"quoteType": {
147-
"type": "select",
148-
"options": [
149-
"'",
150-
"\""
151-
],
152-
"default": "\""
153-
}
154-
},
15529
"devDependencies": {
15630
"coffee-script": "^1.10.0"
15731
},

0 commit comments

Comments
 (0)