diff options
author | Israel Lavi <il0695@att.com> | 2018-08-07 10:54:17 +0300 |
---|---|---|
committer | Israel Lavi <il0695@att.com> | 2018-08-07 11:06:44 +0300 |
commit | b2a3acea0d0f66028c9ce5fad02d4ecc64abf70c (patch) | |
tree | 8d70110f34cb845965c42a5915e950bca967d2c3 /utils/build-demo.js | |
parent | 05b37297177e8a342668c15e5d6f738b51f7aedd (diff) |
Initial commit.
Adding files needed for Linux Foundation.
Change-Id: I9f2b4851a5ae01f83800c7f8bab8608a2221c730
Issue-ID: SDC-1608
Signed-off-by: Israel Lavi <il0695@att.com>
Diffstat (limited to 'utils/build-demo.js')
-rw-r--r-- | utils/build-demo.js | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/utils/build-demo.js b/utils/build-demo.js deleted file mode 100644 index 8f5edda..0000000 --- a/utils/build-demo.js +++ /dev/null @@ -1,73 +0,0 @@ -const ncp = require('ncp').ncp; -const fs = require('fs'); -const path = require('path') -const svgFolder = './assets/icons'; -const svgOutputFile = './src/style/scss/common/_icons.scss'; - -var copyFiles = function() { - // Copy generated style.css to demo/gen folder - ncp('lib/css/style.css', 'demo/gen', function (err) { - if (err) { - return console.error(err); - } - }); - - // Copy assets folder to demo/gen folder - ncp('assets', 'demo/gen/assets', function (err) { - if (err) { - return console.error(err); - } - }); -}; - -// var parseSvgContent = function(content) { -// var withoutLines = (content+'').replace(/\n|\t|\r/g, ''); -// return withoutLines.replace(/"/g,'\''); -// }; - -// var readFile = function(filePath) { -// return fs.readFileSync(filePath, 'utf8'); -// }; - -// var clearFile = function(filePath) { -// return fs.truncateSync(filePath, 0); -// }; - -// var writeFile = function(filePath){ -// const text = `.sdc-icon { -// display: inline-block; -// text-rendering: auto; -// -webkit-font-smoothing: antialiased; -// -moz-osx-font-smoothing: grayscale; -// width: 16px; -// height: 16px; -// }\n`; -// fs.writeFileSync(filePath, text); -// console.log("The file was saved!"); -// }; - -// var appendSvgIcons = function(content) { -// fs.appendFileSync(svgOutputFile, content); -// }; - -// var readFolder = function(folderPath) { -// var files = fs.readdirSync(svgFolder); -// files.forEach(file => { -// var extension = path.extname(file); -// if (extension ==='.svg'){ -// console.log(folderPath + "/" + file); -// var fileContent = readFile(folderPath + "/" + file); -// var svgContent = parseSvgContent(fileContent); -// var fileName = path.basename(file, '.svg') -// var scssContent = '.sdc-icon-' + fileName + ' {background-image: url("data:image/svg+xml;utf8,' + svgContent + '"); background-repeat: no-repeat;}'; -// appendSvgIcons(scssContent+'\n'); -// } -// }); - -// }; - -// Generate icons.scss file from multiple SVG files -// clearFile(svgOutputFile); -// writeFile(svgOutputFile); -// readFolder(svgFolder); -copyFiles(); |