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