Update contents same as upstream
1. update file contents 2. update to version 0.1.1 3. correct license info as MIT Change-Id: Ib49a63b7aa73970dfb2dfe82c9892693a4f77181
This commit is contained in:
parent
a3a3141ebe
commit
84f91b0bcf
|
@ -1,12 +1,12 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = XStatic-Json2yaml
|
name = XStatic-Json2yaml
|
||||||
description = Json2yaml 0.1.0 (XStatic packaging standard)
|
description = Json2yaml 0.1.1 (XStatic packaging standard)
|
||||||
description-file = README.rst
|
description-file = README.rst
|
||||||
maintainer = xinni.ge
|
maintainer = xinni.ge
|
||||||
maintainer-email = xinni.ge@ntt.com
|
maintainer-email = xinni.ge@ntt.com
|
||||||
home-page = https://github.com/jeffsu/json2yaml
|
home-page = https://github.com/jeffsu/json2yaml
|
||||||
keywords = json2yaml xstatic
|
keywords = json2yaml xstatic
|
||||||
license = Apache 2.0
|
license = MIT
|
||||||
zip_safe = False
|
zip_safe = False
|
||||||
namespace_packages =
|
namespace_packages =
|
||||||
xstatic
|
xstatic
|
||||||
|
|
|
@ -11,7 +11,7 @@ NAME = __name__.split('.')[-1] # package name (e.g. 'foo' or 'foo_bar')
|
||||||
# please use a all-lowercase valid python
|
# please use a all-lowercase valid python
|
||||||
# package name
|
# package name
|
||||||
|
|
||||||
VERSION = '0.1.0' # version of the packaged files, please use the upstream
|
VERSION = '0.1.1' # version of the packaged files, please use the upstream
|
||||||
# version number
|
# version number
|
||||||
BUILD = '0' # our package build number, so we can release new builds
|
BUILD = '0' # our package build number, so we can release new builds
|
||||||
# with fixes for xstatic stuff.
|
# with fixes for xstatic stuff.
|
||||||
|
@ -31,7 +31,7 @@ MAINTAINER_EMAIL = 'xinni.ge@ntt.com'
|
||||||
HOMEPAGE = 'https://github.com/jeffsu/json2yaml'
|
HOMEPAGE = 'https://github.com/jeffsu/json2yaml'
|
||||||
|
|
||||||
# this refers to all files:
|
# this refers to all files:
|
||||||
LICENSE = 'Apache 2.0'
|
LICENSE = 'MIT'
|
||||||
|
|
||||||
from os.path import join, dirname
|
from os.path import join, dirname
|
||||||
BASE_DIR = join(dirname(__file__), 'data')
|
BASE_DIR = join(dirname(__file__), 'data')
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
(function (self) {
|
(function (self) {
|
||||||
|
/*
|
||||||
|
* TODO, lots of concatenation (slow in js)
|
||||||
|
*/
|
||||||
var spacing = " ";
|
var spacing = " ";
|
||||||
|
|
||||||
function getType(obj) {
|
function getType(obj) {
|
||||||
|
@ -75,13 +78,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizeString(str) {
|
function normalizeString(str) {
|
||||||
return str;
|
if (str.match(/^[\w]+$/)) {
|
||||||
|
return str;
|
||||||
|
} else {
|
||||||
|
return JSON.stringify(str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertString(obj, ret) {
|
function convertString(obj, ret) {
|
||||||
ret.push(normalizeString(obj));
|
ret.push(normalizeString(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
self.json2yaml = function(obj) {
|
self.json2yaml = function(obj) {
|
||||||
if (typeof obj == 'string') {
|
if (typeof obj == 'string') {
|
||||||
obj = JSON.parse(obj);
|
obj = JSON.parse(obj);
|
||||||
|
|
Loading…
Reference in New Issue