How to use rcs-core - 3 common examples

To help you get started, we’ve selected a few rcs-core 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 JPeer264 / node-rcs-core / examples / replace / index.js View on Github external
const fs = require('fs');
const rcs = require('rcs-core');

// fill the libraries
rcs.fillLibraries(fs.readFileSync('./before/bootstrap.css', 'utf8'));

// replace the data
const cssData = rcs.replace.css(fs.readFileSync('./before/bootstrap.css', 'utf8'));
const jsData = rcs.replace.js(fs.readFileSync('./before/bootstrap.js', 'utf8'));
const htmlData = rcs.replace.html(fs.readFileSync('./before/index.html', 'utf8'));

// write new files
fs.writeFileSync('./after/bootstrap.replaced.css', cssData);
fs.writeFileSync('./after/bootstrap.replaced.js', jsData);
fs.writeFileSync('./after/index.replaced.html', htmlData);
github JPeer264 / node-rcs-core / examples / replace / index.js View on Github external
const fs = require('fs');
const rcs = require('rcs-core');

// fill the libraries
rcs.fillLibraries(fs.readFileSync('./before/bootstrap.css', 'utf8'));

// replace the data
const cssData = rcs.replace.css(fs.readFileSync('./before/bootstrap.css', 'utf8'));
const jsData = rcs.replace.js(fs.readFileSync('./before/bootstrap.js', 'utf8'));
const htmlData = rcs.replace.html(fs.readFileSync('./before/index.html', 'utf8'));

// write new files
fs.writeFileSync('./after/bootstrap.replaced.css', cssData);
fs.writeFileSync('./after/bootstrap.replaced.js', jsData);
fs.writeFileSync('./after/index.replaced.html', htmlData);
github JPeer264 / node-rcs-core / examples / replace / index.js View on Github external
const fs = require('fs');
const rcs = require('rcs-core');

// fill the libraries
rcs.fillLibraries(fs.readFileSync('./before/bootstrap.css', 'utf8'));

// replace the data
const cssData = rcs.replace.css(fs.readFileSync('./before/bootstrap.css', 'utf8'));
const jsData = rcs.replace.js(fs.readFileSync('./before/bootstrap.js', 'utf8'));
const htmlData = rcs.replace.html(fs.readFileSync('./before/index.html', 'utf8'));

// write new files
fs.writeFileSync('./after/bootstrap.replaced.css', cssData);
fs.writeFileSync('./after/bootstrap.replaced.js', jsData);
fs.writeFileSync('./after/index.replaced.html', htmlData);

rcs-core

Rename css selectors across all files

MIT
Latest version published 3 years ago

Package Health Score

36 / 100
Full package analysis

Popular rcs-core functions