build css from less

This commit is contained in:
Kyle Spearrin 2019-04-02 22:15:11 -04:00
parent b837c600a8
commit 61c1c6ebf8
10 changed files with 4389 additions and 1 deletions

3
.gitignore vendored
View File

@ -197,4 +197,5 @@ FakesAssemblies/
# Other
project.lock.json
.DS_Store
.DS_Store
src/App/Css

View File

@ -43,4 +43,8 @@
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="npm run less" />
</Target>
</Project>

View File

@ -0,0 +1,3 @@
^Label, ^Entry, ^Editor {
font-size: 16;
}

3
src/App/Less/dark.less Normal file
View File

@ -0,0 +1,3 @@
^contentpage {
background-color: gray;
}

3
src/App/Less/ios.less Normal file
View File

@ -0,0 +1,3 @@
^Label, ^Entry, ^Editor {
font-size: 14;
}

14
src/App/Less/styles.less Normal file
View File

@ -0,0 +1,14 @@
@import "variables.less";
^ContentPage {
background-color: @white;
}
StackLayout.list-cell {
padding: 10;
-xf-orientation: horizontal;
}
StackLayout.list-cell > FaLabel {
font-size: 22;
}

View File

@ -0,0 +1 @@
@white: #FFFFFF;

16
src/App/gulpfile.js Normal file
View File

@ -0,0 +1,16 @@
const gulp = require('gulp');
const gulpLess = require('gulp-less');
const del = require('del');
function less() {
return gulp.src(['./Less/android.less', './Less/ios.less', './Less/dark.less', './Less/styles.less'])
.pipe(gulpLess())
.pipe(gulp.dest('./Css'));
}
function cleanCss() {
return del('./Css');
}
exports.cleanCss = cleanCss;
exports.less = gulp.series(cleanCss, less);

4331
src/App/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

12
src/App/package.json Normal file
View File

@ -0,0 +1,12 @@
{
"name": "bitwarden-mobile",
"version": "1.0.0",
"scripts": {
"less": "gulp less"
},
"devDependencies": {
"del": "4.1.0",
"gulp": "4.0.0",
"gulp-less": "4.0.1"
}
}