Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "cartocc", | ||
"desciption": "Carto Config Customizer is a very simple tool for customizing layers values of a `.mml` config file ", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"url": "https://github.com/yohanboniface/cartocc", | ||
@@ -21,4 +21,5 @@ "engines": { | ||
"bin": { | ||
"cartocc": "./lib/cartocc.js" | ||
} | ||
"cartocc": "./bin/cartocc" | ||
}, | ||
"main": "./lib/cartocc/index" | ||
} |
@@ -7,2 +7,8 @@ # CartoCC — Carto Config Customizer | ||
### Install | ||
``` | ||
npm intall cartocc | ||
``` | ||
### Usage | ||
@@ -77,3 +83,3 @@ | ||
"if": { | ||
"class": "shp" | ||
"Datasource.type": "shape" | ||
}, | ||
@@ -96,3 +102,3 @@ "then": { | ||
``` | ||
node cartocc.js <path-to-project.mml> <path-to-custom-rules.json> > local_project.mml | ||
cartocc <path-to-project.mml> <path-to-custom-rules.json> > local_project.mml | ||
``` |
@@ -1,2 +0,2 @@ | ||
require('../lib/cartocc.js'); | ||
var cartocc = require('../lib/cartocc'); | ||
var assert = require('assert'); | ||
@@ -10,3 +10,3 @@ | ||
function _testOutput (mml, rules, output) { | ||
var c = new C(JSON.stringify(mml), JSON.stringify(rules)); | ||
var c = new cartocc.CartoCC(JSON.stringify(mml), JSON.stringify(rules)); | ||
c.process(); | ||
@@ -16,2 +16,18 @@ assert.deepEqual(c.mml, output, "match"); | ||
function test_init_args_can_be_JSON () { | ||
var mml = {"Layer": {}}; | ||
var rules = {}; | ||
var c = new cartocc.CartoCC(mml, rules); | ||
assert(typeof c.mml === "object"); | ||
assert(typeof c.rules === "object"); | ||
} | ||
function test_init_args_can_be_string () { | ||
var mml = '{"Layer": {}}'; | ||
var rules = '{}'; | ||
var c = new cartocc.CartoCC(mml, rules); | ||
assert(typeof c.mml === "object"); | ||
assert(typeof c.rules === "object"); | ||
} | ||
function test_simple_output() { | ||
@@ -266,2 +282,4 @@ var mml = {"Layer":[ | ||
var to_run = [ | ||
test_init_args_can_be_JSON, | ||
test_init_args_can_be_string, | ||
test_simple_output, | ||
@@ -268,0 +286,0 @@ test_fieldpath_in_if_block_should_work, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
13161
7
102
1
381