Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function icons(done) {
const stream = gulp.src(config.icons.src)
.pipe(iconfont({
fontName: iconName,
appendUniconde: true,
formats: config.icons.formats,
timestamp: config.icons.useTimestamp ? runTimestamp : 0,
autohint: config.icons.autohint,
normalize: config.icons.normalize
}));
stream.pipe(gulp.dest(config.icons.dest));
if (config.browserSync.enabled) {
browserSync.get('server').reload();
}
if (config.icons.templates.enabled) {
stream.on('glyphs', (glyphs) => {
const iconData = {
glyphs: glyphs.map(glyph => ({ // returns the object
name: glyph.name,
content: glyph.unicode[0].toString(16).toUpperCase()
})),
fontName: iconName,
fontPath: config.icons.fontPathPrefix,
classNamePrefix: config.icons.classNamePrefix
};
/**
* Process Icon Templates
* @param srcFile {string} - Path to lodash template file.
var gulp = require("gulp");
var config = require("./config");
var fs = require("fs");
var path = require("path");
var sass = require("gulp-sass");
var plz = require("gulp-pleeease");
var gutil = require('gulp-util');
var size = require('gulp-size');
var bs = require('browser-sync').get('main');
var sourcemaps = require('gulp-sourcemaps');
/*
---------------------------------------------------------------------------
Stylesheets
---------------------------------------------------------------------------
*/
gulp.task('css', function() {
return gulp.src(path.join(config.paths.sass, "**", "*.scss"))
.pipe(config.prod ? gutil.noop() : sourcemaps.init())
.pipe(sass())
.on('error', function handleError(err) {
gutil.log(err.message);
bs.notify(err.message, 10000);
this.emit('end');
return function transpileTS() {
return gulp.src(files)
.pipe(changed(destPath, { extension: '.js' }))
.pipe(plumber({errorHandler: notify.onError("TS compilation failed !")}))
.pipe(sourcemaps.init())
.pipe(ts(config.compilerOptions))
.pipe(sourcemaps.write())
.pipe(gulp.dest(destPath))
.pipe(bs.get('server').stream());
}
}
* OTHER DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/
"use strict";
var gulp = require("gulp"),
sass = require("gulp-sass"),
autoprefixer = require("gulp-autoprefixer"),
notify = require("gulp-notify"),
sourcemaps = require("gulp-sourcemaps"),
gutil = require("gulp-util"),
config = require("../config"),
settings = require("../settings"),
paths = require("../utils/paths"),
browserSync = require("browser-sync").get("www");
function copySCSS() {
if (settings.NO_COPY) {
return;
}
var isRelease = (settings.BUILD_MODE === "release");
var includePaths = [];
var includeModules = config.sass && config.sass.includeModules;
if (includeModules instanceof Array) {
includePaths = includePaths.concat(includeModules.map(function (moduleName) {
var module = require(moduleName);
return module.includePath;
}));
}
var moreIncludePaths = config.sass && config.sass.includePaths;
if (moreIncludePaths instanceof Array) {
callback: function() {
browserSyncInstance = BrowserSync.get('bs-webpack-plugin');
},
})
* permit persons to whom the Software is furnished to do so, subject to the following
* conditions:
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/
"use strict";
var browserSync = require("browser-sync").get("www");
module.exports = {
deps: ["copy"],
task: function () {browserSync.reload();}
}
* permit persons to whom the Software is furnished to do so, subject to the following
* conditions:
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/
"use strict";
var browserSync = require("browser-sync").get("www");
module.exports = {
deps: ["copy"],
task: function () {browserSync.reload();}
}
* permit persons to whom the Software is furnished to do so, subject to the following
* conditions:
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/
"use strict";
var browserSync = require("browser-sync").get("www");
module.exports = {
deps: ["copy"],
task: function () {browserSync.reload();}
}
* permit persons to whom the Software is furnished to do so, subject to the following
* conditions:
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/
"use strict";
var browserSync = require("browser-sync").get("www");
module.exports = {
deps: ["copy"],
task: function () {browserSync.reload();}
}
core.sh(`php ${consolePath} --generate`, errorShouldExit, (err) => {
if (config.browserSync.enabled) {
browserSync.get('server').reload();
}
done(err);
});
}