Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assetPaths: [
path.resolve(__dirname, '../../../', cwd, 'images'),
path.resolve(__dirname, '../../../', 'packages/core/images')
],
strict: true
})
);
}
return gulp
.src(`${cwd}src/**/*.scss`)
.pipe(
changed(dest, {
extension: '.css',
// compare contents so files that import the updated file also get piped through
hasChanged: changed.compareSha1Digest
})
)
.pipe(gulpIf(createSourcemaps, sourcemaps.init()))
.pipe(sassCompiler)
.pipe(gulpIf(createSourcemaps, sourcemaps.write()))
.pipe(postcss(postcssPlugins))
.pipe(gulp.dest(dest))
.pipe(count(`## Sass files processed in ${cwd}`))
.pipe(shared.browserSync.stream({ match: '**/public/styles/*.css' })); // Auto-inject into docs
}
function compileJs(src, dest, filename) {
return gulp.src(src)
.pipe(concat(filename))
.pipe(wrap("(function (window, document, JSON) { <%= contents %> })(window, document, JSON);"))
.pipe(gulpUglify({}, uglifyJs).on('error', (err) => console.log(err)))
.pipe(changed(jsDest, {
hasChanged: changed.compareSha1Digest
}))
.pipe(gulp.dest(dest));
}
gulp.task('wiredep', function() {
var wiredep = require('wiredep').stream;
return gulp.src(project.css)
.pipe(wiredep())
.pipe(changed(path.source + 'styles', {
hasChanged: changed.compareSha1Digest
}))
.pipe(gulp.dest(path.source + 'styles'));
});
gulp.task( "format", [ "jshint" ], function() {
return gulp.src( [ "**/*.js", "!node_modules/**" ] )
.pipe( jscs( {
configPath: ".jscsrc",
fix: true
} ) )
.pipe( gulpChanged( ".", { hasChanged: gulpChanged.compareSha1Digest } ) )
.pipe( gulp.dest( "." ) );
} );
gulp.task('wiredep', function() {
var wiredep = require('wiredep').stream;
return gulp.src(project.css)
.pipe(wiredep())
.pipe(changed(path.source + 'css', {
hasChanged: changed.compareSha1Digest
}))
.pipe(gulp.dest(path.source + 'css'));
});
gulp.task( "format-src", [ "jshint" ], function() {
return gulp.src( [ "./src/**/*.js", "!node_modules/**" ] )
.pipe( jscs( {
configPath: ".jscsrc",
fix: true
} ) )
.pipe( gulpChanged( "./src", { hasChanged: gulpChanged.compareSha1Digest } ) )
.pipe( gulp.dest( "./src" ) );
} );
gulp.task('wiredep', function() {
var wiredep = require('wiredep').stream;
return gulp.src(project.css)
.pipe(wiredep())
.pipe(changed(path.source + 'styles', {
hasChanged: changed.compareSha1Digest
}))
.pipe(gulp.dest(path.source + 'styles'));
});
gulp.task('wiredep', function() {
var wiredep = require('wiredep').stream;
return gulp.src(project.css)
.pipe(wiredep())
.pipe(changed(path.source + 'styles', {
hasChanged: changed.compareSha1Digest
}))
.pipe(gulp.dest(path.source + 'styles'));
});
return () => gulp.src(misc)
.pipe(changed(path.join(dist, platform, env, 'lib'), { hasChanged: changed.compareSha1Digest }))
.pipe(gulp.dest(path.join(dist, platform, env, 'lib')));
}
gulp.task('wiredep', function() {
var wiredep = require('wiredep').stream;
return gulp.src(project.css)
.pipe(wiredep())
.pipe(changed(path.source + 'styles', {
hasChanged: changed.compareSha1Digest
}))
.pipe(gulp.dest(path.source + 'styles'));
});