diff --git a/gulp/config.js b/gulp/config.js index 3aadedd6..42c51216 100644 --- a/gulp/config.js +++ b/gulp/config.js @@ -15,7 +15,7 @@ module.exports = { }, 'styles': { - 'src': './src/styles/**/*.scss', + 'src': './src/**/*.scss', 'dest': './build/css/' }, diff --git a/gulp/tasks/sass.js b/gulp/tasks/sass.js index 274370b9..02564ed2 100644 --- a/gulp/tasks/sass.js +++ b/gulp/tasks/sass.js @@ -5,12 +5,14 @@ var sass = require('gulp-sass'); var gulpif = require('gulp-if'); var browserSync = require('browser-sync'); var autoprefixer = require('gulp-autoprefixer'); +var bulkSass = require('gulp-sass-bulk-import'); var handleErrors = require('../util/handle-errors'); var config = require('../config'); gulp.task('sass', function () { return gulp.src(config.styles.src) + .pipe(bulkSass()) .pipe(sass({ sourceComments: global.isProd ? 'none' : 'map', sourceMap: 'sass', diff --git a/package.json b/package.json index 9e174bf6..22d8889f 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "gulp-notify": "^2.2.0", "gulp-rename": "^1.2.2", "gulp-sass": "^2.0.x", + "gulp-sass-bulk-import": "^0.3.2", "gulp-sourcemaps": "^1.5.2", "gulp-streamify": "0.0.5", "gulp-uglify": "^1.2.0", diff --git a/src/styles/app-components/_main-layout.scss b/src/app/main/main-layout.scss similarity index 100% rename from src/styles/app-components/_main-layout.scss rename to src/app/main/main-layout.scss diff --git a/src/styles/core-components/_button.scss b/src/core-components/button.scss similarity index 90% rename from src/styles/core-components/_button.scss rename to src/core-components/button.scss index 6fede974..85ae2088 100644 --- a/src/styles/core-components/_button.scss +++ b/src/core-components/button.scss @@ -1,3 +1,5 @@ +@import "../scss/vars"; + .button { &:focus { diff --git a/src/styles/core-components/_widget.scss b/src/core-components/widget.scss similarity index 100% rename from src/styles/core-components/_widget.scss rename to src/core-components/widget.scss diff --git a/src/main.scss b/src/main.scss new file mode 100644 index 00000000..392a9ef6 --- /dev/null +++ b/src/main.scss @@ -0,0 +1,7 @@ +@import 'scss/reset'; +@import 'scss/vars'; +@import 'scss/typography'; +@import 'scss/base'; + +@import 'core-components/*'; +@import 'app/*'; \ No newline at end of file diff --git a/src/styles/_base.scss b/src/scss/_base.scss similarity index 100% rename from src/styles/_base.scss rename to src/scss/_base.scss diff --git a/src/styles/_reset.scss b/src/scss/_reset.scss similarity index 100% rename from src/styles/_reset.scss rename to src/scss/_reset.scss diff --git a/src/styles/_typography.scss b/src/scss/_typography.scss similarity index 100% rename from src/styles/_typography.scss rename to src/scss/_typography.scss diff --git a/src/styles/_vars.scss b/src/scss/_vars.scss similarity index 100% rename from src/styles/_vars.scss rename to src/scss/_vars.scss diff --git a/src/styles/app-components/_footer.scss b/src/styles/app-components/_footer.scss deleted file mode 100644 index 772c1f15..00000000 --- a/src/styles/app-components/_footer.scss +++ /dev/null @@ -1,4 +0,0 @@ -footer { - height: 50px; - background: #eeeeee; -} \ No newline at end of file diff --git a/src/styles/app-components/_header.scss b/src/styles/app-components/_header.scss deleted file mode 100644 index f81d4a19..00000000 --- a/src/styles/app-components/_header.scss +++ /dev/null @@ -1,4 +0,0 @@ -header { - height: 50px; - background: #eeeeee; -} \ No newline at end of file diff --git a/src/styles/main.scss b/src/styles/main.scss deleted file mode 100644 index 6b0c742e..00000000 --- a/src/styles/main.scss +++ /dev/null @@ -1,10 +0,0 @@ -@import 'reset'; -@import 'vars'; -@import 'typography'; -@import 'base'; - -@import 'core-components/button'; -@import 'core-components/widget'; - -@import 'app-components/main-layout'; -@import 'app-components/footer'; \ No newline at end of file