diff --git a/bin/build-sass.js b/bin/build-sass.js index a4fcb160..731555fc 100755 --- a/bin/build-sass.js +++ b/bin/build-sass.js @@ -21,7 +21,7 @@ const scssDir = path.join(__dirname, '../scss') const themesScssDir = path.join(__dirname, '../scss/themes') const assetsDir = path.join(__dirname, '../assets') -function doWatch() { +function doWatch () { var start = now() chokidar.watch(scssDir).on('change', debounce(() => { console.log('Recompiling SCSS...') @@ -35,7 +35,7 @@ function doWatch() { chokidar.watch() } -async function compileGlobalSass() { +async function compileGlobalSass () { let results = await Promise.all([ render({file: defaultThemeScss, outputStyle: 'compressed'}), render({file: globalScss, outputStyle: 'compressed'}), @@ -51,7 +51,7 @@ async function compileGlobalSass() { await writeFile(html2xxFile, html, 'utf8') } -async function compileThemesSass() { +async function compileThemesSass () { let files = (await readdir(themesScssDir)).filter(file => !path.basename(file).startsWith('_')) await Promise.all(files.map(async file => { let res = await render({file: path.join(themesScssDir, file)}) @@ -60,7 +60,7 @@ async function compileThemesSass() { })) } -async function main() { +async function main () { await Promise.all([compileGlobalSass(), compileThemesSass()]) if (argv.watch) { doWatch() @@ -70,4 +70,4 @@ async function main() { Promise.resolve().then(main).catch(err => { console.error(err) process.exit(1) -}) \ No newline at end of file +}) diff --git a/bin/build-svg.js b/bin/build-svg.js index 11cb5f27..38179787 100755 --- a/bin/build-svg.js +++ b/bin/build-svg.js @@ -11,7 +11,7 @@ const $ = require('cheerio') const readFile = pify(fs.readFile.bind(fs)) const writeFile = pify(fs.writeFile.bind(fs)) -async function main() { +async function main () { let result = (await Promise.all(svgs.map(async svg => { let filepath = path.join(__dirname, '../', svg.src) let content = await readFile(filepath, 'utf8') @@ -40,4 +40,4 @@ async function main() { main().catch(err => { console.error(err) process.exit(1) -}) \ No newline at end of file +}) diff --git a/bin/globalize-css.js b/bin/globalize-css.js index e7218488..081639b0 100755 --- a/bin/globalize-css.js +++ b/bin/globalize-css.js @@ -11,10 +11,10 @@ const readFile = pify(fs.readFile.bind(fs)) const glob = pify(require('glob')) const rimraf = pify(require('rimraf')) -const selectorRegex = /\n[ \t]*([0-9\w\- \t\.:#,]+?)[ \t]*\{/g +const selectorRegex = /\n[ \t]*([0-9\w\- \t.:#,]+?)[ \t]*{/g const styleRegex = /