Socket
Socket
Sign inDemoInstall

theo

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

theo - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

templates/plist.hbs

4

lib/theo.js

@@ -57,2 +57,6 @@ /*

return '.theme';
case 'plist':
return '.plist';
case 'XML':
return '.xml';
default:

@@ -59,0 +63,0 @@ throw new Error('Unsupported convertion type: ' + type);

4

package.json
{
"name": "theo",
"version": "0.0.4",
"description": "Theme tokenizer working with JSON input generating variables for Sass, Stylus, Less and Aura",
"version": "0.0.5",
"description": "Theme tokenizer working with JSON input generating variables for Sass, Stylus, Less, Aura, iOS (plist) and Android (XML)",
"keywords": [

@@ -6,0 +6,0 @@ "css",

@@ -9,2 +9,4 @@ theo

- [Aura](http://documentation.auraframework.org/auradocs)
- [plist](http://en.wikipedia.org/wiki/Property_list)
- [XML](http://en.wikipedia.org/wiki/XML)

@@ -15,3 +17,3 @@ ## Usage

theo Sass ./variables ./output
theo "Sass, Stylus, Less, Aura" ./variables ./output
theo "Sass, Stylus, Less, Aura, plist, XML" ./variables ./output

@@ -18,0 +20,0 @@ The input folder `./variables` in this examples should contain at least one JSON file with the following format:

@@ -25,3 +25,3 @@ /*

fs.readdirSync('./dist').forEach(function(fileName) {
fs.unlinkSync('./dist/' + fileName);
//fs.unlinkSync('./dist/' + fileName);
});

@@ -36,3 +36,3 @@ }

after(function(){
theo.batch(['Aura', 'Sass' , 'Stylus', 'Less', 'HTML'], './test/mock', 'dist');
theo.batch(['Aura', 'Sass' , 'Stylus', 'Less', 'plist', 'XML', 'HTML'], './test/mock', 'dist');

@@ -47,2 +47,4 @@ assert(fs.existsSync('./dist/s1base.theme'), 'one.theme was not created.');

assert(fs.existsSync('./dist/s1sub.less'), 's1sub.less was not created.');
assert(fs.existsSync('./dist/s1base.plist'), 's1base.plist was not created.');
assert(fs.existsSync('./dist/s1base.xml'), 's1base.xml was not created.');
});

@@ -56,2 +58,4 @@

theo.batch('Less', './test/mock', 'dist');
theo.batch('plist', './test/mock', 'dist');
theo.batch('XML', './test/mock', 'dist');

@@ -66,2 +70,4 @@ assert(fs.existsSync('./dist/s1base.theme'), 'one.theme was not created.');

assert(fs.existsSync('./dist/s1sub.less'), 's1sub.less was not created.');
assert(fs.existsSync('./dist/s1base.plist'), 's1base.plist was not created.');
assert(fs.existsSync('./dist/s1base.xml'), 's1base.xml was not created.');
});

@@ -123,2 +129,25 @@ });

describe('convert plist', function(){
it('should convert a variables object to a plist.', function(){
json = JSON.parse(fs.readFileSync('./test/mock/s1base.json').toString());
var result = theo.convert('plist', json);
assert(result, 'result does not exist');
assert(result.indexOf('<key>COLOR_PRIMARY</key>') != -1, 'Could not find primary color.');
assert(result.indexOf('<string>#2a94d6</string>') != -1, 'Could not find primary color value.');
});
});
describe('convert XML', function(){
it('should convert a variables object to XML.', function(){
json = JSON.parse(fs.readFileSync('./test/mock/s1base.json').toString());
var result = theo.convert('XML', json);
assert(result, 'result does not exist');
assert(result.indexOf('<variable name="COLOR_PRIMARY" value="#2a94d6" />') != -1, 'Could not find primary color.');
});
});
describe('convert HTML', function(){

@@ -125,0 +154,0 @@

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