Commit ea2f2d36 authored by Pouya Kary's avatar Pouya Kary

fixed #25

parent 79931248
......@@ -17,7 +17,6 @@
const exec = require('child_process').exec
const fs = require('fs-extra')
const gulp = require('gulp')
const less = require('less')
const mv = require('mv')
const packageJsonFirstLoad = require('./package.json')
const path = require('path')
......@@ -225,41 +224,14 @@
/** Compiles the Less style sheets */
gulp.task( 'sheets', async callback => {
try {
let lessSourceCode = fs.readFileSync(
path.join( __dirname, 'sheets', 'ui.less' ), 'utf8' )
const renderedLess =
await asyncify( less.render, lessSourceCode )
asyncify( fs.writeFile,
path.join( __dirname, '_compiled/style.css' ),
output.css
)
// less.render( lessSourceCode, ( err, output ) => {
// if ( err )
// console.log(`Less failure: ${ err }`); return
// asyncify( fs.writeFile,
// path.join( __dirname, '_compiled/style.css' ),
// output.css
// )
// // fs.writeFile(
// // path.join( __dirname, '_compiled/style.css' ),
// // output.css,
// // error => {
// // if ( error )
// // console.log('could not store the less file')
// // else
// // callback( )
// // }
// // )
// })
} catch ( err ) {
console.log('Compiling less failed ' + err )
}
const thisDir = (...x) => path.join( __dirname, ...x )
shell('less',
thisDir( 'sheets', 'ui.less' ),
thisDir( '_compiled', 'style.css' )
).catch(() => {
callback( err )
})
})
//
......
......@@ -15,7 +15,7 @@
"debug": "gulp --debug",
"dist-mac": "gulp --pack --installers --mac",
"electron": "electron ./_compiled/main.js --enable-logging",
"configure": "npm install -g gulp gulp-cli electron-installer-dmg electron-installer-debian"
"configure": "npm install -g gulp gulp-cli electron-installer-dmg electron-installer-debian less"
},
"repository": {
"type": "git",
......@@ -39,7 +39,6 @@
"gulp": "3.9.1",
"gulp-uglify": "1.5.3",
"fs-extra": "0.30.0",
"less": "2.7.1",
"mv": "^2.1.1",
"plist": "^2.1.0",
"sloc": "0.1.10",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment