mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
back to sass
This commit is contained in:
parent
18f659de7b
commit
53aaf7caa8
11 changed files with 646 additions and 409 deletions
28
gulpfile.js
28
gulpfile.js
|
@ -1,29 +1,33 @@
|
|||
const gulp = require('gulp');
|
||||
const gulpLess = require('gulp-less');
|
||||
const gulpSass = require('gulp-sass');
|
||||
const del = require('del');
|
||||
const fs = require('fs');
|
||||
|
||||
gulpSass.compiler = require('node-sass');
|
||||
|
||||
const paths = {
|
||||
css: './src/App/Css',
|
||||
};
|
||||
|
||||
const lessFiles = [
|
||||
'./src/App/Less/android.less',
|
||||
'./src/App/Less/ios.less',
|
||||
'./src/App/Less/dark.less',
|
||||
'./src/App/Less/styles.less',
|
||||
const sassFiles = [
|
||||
'./src/App/Sass/android.scss',
|
||||
'./src/App/Sass/ios.scss',
|
||||
'./src/App/Sass/dark.scss',
|
||||
'./src/App/Sass/styles.scss',
|
||||
];
|
||||
|
||||
function less() {
|
||||
return gulp.src(lessFiles).pipe(gulpLess()).pipe(gulp.dest(paths.css));
|
||||
function sass() {
|
||||
return gulp.src(sassFiles)
|
||||
.pipe(gulpSass().on('error', gulpSass.logError))
|
||||
.pipe(gulp.dest(paths.css));
|
||||
}
|
||||
|
||||
function fixLess(cb) {
|
||||
function fixSass(cb) {
|
||||
fs.readdir(paths.css, (err, cssFiles) => {
|
||||
cssFiles.forEach((cssFile) => {
|
||||
const file = paths.css + '/' + cssFile;
|
||||
let fileContents = fs.readFileSync(file, 'utf8');
|
||||
fileContents = fileContents.replace(/ \^ /g, '^');
|
||||
fileContents = fileContents.replace(/__/g, '^');
|
||||
fs.writeFileSync(file, fileContents, 'utf8');
|
||||
});
|
||||
cb();
|
||||
|
@ -34,6 +38,4 @@ function cleanCss() {
|
|||
return del(paths.css);
|
||||
}
|
||||
|
||||
exports.cleanCss = cleanCss;
|
||||
exports.fixLess = fixLess;
|
||||
exports.less = gulp.series(cleanCss, less, fixLess);
|
||||
exports.sass = gulp.series(cleanCss, sass, fixSass);
|
||||
|
|
1000
package-lock.json
generated
1000
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -2,11 +2,12 @@
|
|||
"name": "bitwarden-mobile",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"less": "gulp less"
|
||||
"sass": "gulp sass"
|
||||
},
|
||||
"devDependencies": {
|
||||
"del": "4.1.0",
|
||||
"gulp": "4.0.0",
|
||||
"gulp-less": "4.0.1"
|
||||
"gulp-sass": "4.0.2",
|
||||
"node-sass": "4.11.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
^Label, ^Entry, ^Editor {
|
||||
font-size: 16;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
^Label, ^Entry, ^Editor {
|
||||
font-size: 14;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@white: #FFFFFF;
|
3
src/App/Sass/android.scss
Normal file
3
src/App/Sass/android.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
__Label, __Entry, __Editor {
|
||||
font-size: 16;
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
^contentpage {
|
||||
__contentpage {
|
||||
background-color: gray;
|
||||
}
|
3
src/App/Sass/ios.scss
Normal file
3
src/App/Sass/ios.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
__Label, __Entry, __Editor {
|
||||
font-size: 14;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
@import "variables.less";
|
||||
@import "variables.scss";
|
||||
|
||||
^ContentPage {
|
||||
background-color: @white;
|
||||
__ContentPage {
|
||||
background-color: $white;
|
||||
}
|
||||
|
||||
StackLayout.list-cell {
|
1
src/App/Sass/variables.scss
Normal file
1
src/App/Sass/variables.scss
Normal file
|
@ -0,0 +1 @@
|
|||
$white: #FFFFFF;
|
Loading…
Reference in a new issue