How to use the cson.parseCSFile function in cson

To help you get started, we’ve selected a few cson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github file-icons / vscode / scripts / import.js View on Github external
#!/usr/bin/env node
const cson = require('cson');
const fs = require('fs');
const execSync = require('child_process').execSync;
const parameterize = require('parameterize');
const util = require('util');
const genex = require('genex');
const ret = require('ret');

// const repo = 'https://github.com:file-icons/atom';
const defs = cson.parseCSFile('./defs/config.cson');
const stylesIcons = fs.readFileSync('./defs/styles/icons.less').toString();
const darkFontColour = "#cccccc";
const lightFontColour = "#6c6c6c";

// HACK(#42)
defs.fileIcons["Pre-commit"].match = /^\.pre-commit-config\.(ya?ml)$/i;

var icons = {};
var result;

let regex = /\.(.*?)-icon:before\s+{\s+\.(\w+); content: "(.*?)"/g;
let fontMap = {
    "fi": "file-icons",
    "fa": "fontawesome",
    "octicons": "octicons",
    "mf": "mfixx",

cson

CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects.

Artistic-2.0
Latest version published 12 months ago

Package Health Score

66 / 100
Full package analysis