Skip to content

Commit

Permalink
Adding gulp task to build one index.css for apps which just want to h…
Browse files Browse the repository at this point in the history
…ave everything in a compact way (might be necessary for new portal) (#98)
  • Loading branch information
fokusferit authored and fragsalat committed May 16, 2018
1 parent 68139b0 commit b3756fd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ node_modules

# ignore package-lock , lock files
package-lock.json
*.lock
*.lock

# dist folder
dist/
13 changes: 13 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const gulp = require('gulp');
const sass = require('gulp-sass');
const gulpStylelint = require('gulp-stylelint');
const runSequence = require('run-sequence');
const del = require('del');
const conventionalChangelog = require('gulp-conventional-changelog');
const conventionalGitHubReleaser = require('conventional-github-releaser');
const bump = require('gulp-bump');
Expand Down Expand Up @@ -102,3 +103,15 @@ gulp.task('sass', () =>
);

gulp.task('default', () => gulp.parallel('sass', 'lint-sass'));

gulp.task('build:sass', () =>
gulp.src('./index.scss')
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(gulp.dest('./dist'))
);

gulp.task('clean:dist', () =>
del(['dist/**'])
);

gulp.task('build:dist', gulp.series('clean:dist', 'build:sass'));
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"devDependencies": {
"conventional-github-releaser": "^1.1.12",
"del": "^3.0.0",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-bump": "^2.7.0",
"gulp-conventional-changelog": "^1.1.4",
Expand All @@ -51,10 +52,16 @@
],
"rules": {
"max-nesting-depth": 2,
"order/properties-alphabetical-order": null,
"selector-no-qualifying-type":[true, {
"ignore": ["attribute", "class"]
}]
"order/properties-alphabetical-order": null,
"selector-no-qualifying-type": [
true,
{
"ignore": [
"attribute",
"class"
]
}
]
}
}
}

0 comments on commit b3756fd

Please sign in to comment.