Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(sass): switch from gulp-sass to sass-embedded #13517

Merged
merged 8 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ ng update igniteui-cli
ng build igniteui-angular

// build the css
npm run build:style
npm run build:styles

// build them both
npm run build:lib
Expand Down
42 changes: 0 additions & 42 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,66 +1,24 @@
'use strict';

const autoprefixer = require('autoprefixer');
const browserSync = require('browser-sync').create();
const del = require('del');
const gulp = require('gulp');
const sass = require('gulp-sass')(require('sass'));
const sourcemaps = require('gulp-sourcemaps');
const postcss = require('gulp-postcss');
const process = require('process');
const fs = require('fs');
const argv = require('yargs').argv;
const sassdoc = require('sassdoc');
const path = require('path');
const EventEmitter = require('events').EventEmitter;
const { series } = require('gulp');
const { spawnSync } = require('child_process');
const slash = require('slash');

const STYLES = {
SRC: './projects/igniteui-angular/src/lib/core/styles/themes/presets/**/*',
DIST: './dist/igniteui-angular/styles',
MAPS: './maps',
THEMING: {
SRC: './projects/igniteui-angular/src/lib/core/styles/**/*',
DIST: './dist/igniteui-angular/lib/core/styles'
},
CONFIG: {
outputStyle: 'compressed',
includePaths: ['node_modules']
}
};

const DOCS_OUTPUT_PATH = slash(path.join(__dirname, 'dist', 'igniteui-angular', 'docs'));

const TYPEDOC_THEME = {
SRC: slash(path.join(__dirname, 'node_modules', 'ig-typedoc-theme', 'dist')),
OUTPUT: slash(path.join(DOCS_OUTPUT_PATH, 'typescript'))
};

module.exports.buildStyle = () => {
const prefixer = postcss([autoprefixer({
cascade: false,
grid: true
})]);

gulp.src(STYLES.THEMING.SRC)
.pipe(gulp.dest(STYLES.THEMING.DIST));

const myEventEmitter = new EventEmitter();

return gulp.src(STYLES.SRC)
.pipe(sourcemaps.init())
.pipe(sass.sync(STYLES.CONFIG).on('error', err => {
sass.logError.bind(myEventEmitter)(err);
myEventEmitter.emit('end');
process.exit(1);
}))
.pipe(prefixer)
.pipe(sourcemaps.write(STYLES.MAPS))
.pipe(gulp.dest(STYLES.DIST))
};

module.exports.copyGitHooks = async (cb) => {

if (process.env.AZURE_PIPELINES || process.env.TRAVIS || process.env.CI || !fs.existsSync('.git')) {
Expand Down
Loading
Loading