cloudformation-js-yaml-schema
Advanced tools
Comparing version
const yaml = require('js-yaml'); | ||
const localTags = require('./tags.json'); | ||
function build(localTags,yaml) { | ||
function build(localTags, yaml) { | ||
function Model(name) { | ||
@@ -13,3 +13,3 @@ return function (data) { | ||
function CustomYamlType(name, kind) { | ||
let model = Model(name); | ||
const model = Model(name); | ||
return new yaml.Type('!'+name, { | ||
@@ -16,0 +16,0 @@ kind: kind, |
{ | ||
"name": "cloudformation-js-yaml-schema", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"description": "Schema to ignore CloudFormation YAML local tags while parsing or dumping", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# cloudformation-js-yaml-schema | ||
Schema to ignore CloudFormation YAML local tags while parsing | ||
Schema to ignore CloudFormation YAML local tags while parsing, ie: `!Ref`, `!Base64` | ||
For utility in templates and build wrappers | ||
See [tags.json]() for currently supported local tags |
@@ -6,3 +6,3 @@ var fs = require('fs'); | ||
var CLOUDFORMATION_SCHEMA = require('./index').CLOUDFORMATION_SCHEMA; | ||
fs.readFile(path.join(__dirname, 'custom2.yml'), 'utf8', function (error, data) { | ||
fs.readFile(path.join(__dirname, 'test.yml'), 'utf8', function (error, data) { | ||
var loaded; | ||
@@ -9,0 +9,0 @@ |
Sorry, the diff of this file is not supported yet
4426
11.94%7
16.67%8
33.33%