
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
gulp-drupal-theme-core
Advanced tools
This theme core is to be included in your main project and sets up many Gulp tasks that can work in many flexible ways by passing in different config
objects, which can be based off of gulpfile.default.yml
(and is merged with).
All is easily configurable by changing values in your gulpfile.yml
file in your project. These values are merged into the gulpfile.default.yml
file - look there for the available options and defaults.
npm install gulp-drupal-theme-core --save-dev
gulpfile.yml
in your theme, and overrides options from the gulpfile.default.yml
gulpfile.js
in your project, with: "use strict";
const gulp = require("gulp");
const yaml = require("js-yaml");
const fs = require("fs");
// `rc` allows all config options to be overridden with CLI flags like `--js.enabled="` or in `~/.p2-theme-corerc` files, among many others: https://www.npmjs.com/package/rc
const config = require("rc")("gulp-drupal-theme-core", yaml.safeLoad(fs.readFileSync(`${__dirname}/gulpfile.yml`, "utf8"), { json: true }));
const themeCore = require("gulp-drupal-theme-core");
const tasks = {
compile: [],
watch: [],
validate: [],
clean: [],
"default": []
};
themeCore(gulp, config, tasks);
gulp.task("clean", gulp.parallel(tasks.clean));
gulp.task("compile", gulp.series(
"clean",
gulp.series(tasks.compile)
));
gulp.task("validate", gulp.parallel(tasks.validate));
gulp.task("watch", gulp.parallel(tasks.watch));
tasks.default.push("watch");
gulp.task("default", gulp.series(
"compile",
gulp.parallel(tasks.default)
));
In order to use Babel, you need to create a .babelrc
into your project, with the presets that you want installed.
You need to create a .eslintrc.js
file, and specify whitch rules that you want (eslint-config-ovh
is recommanded).
gulp
- Run all compile tasks, and watch for changesgulp compile
- Run all compile tasksgulp validate
- Run all validate tasks (eslint, ...)gulp watch
- Watch for changesgulp clean
- Run all clean tasksYou can launch specifics tasks, for example "lint CSS files". In this example, you can use gulp validate:css
.
All the documentation can be found inside the [docs] folder.
Have a look at the Contributing section. If you have any question feel free to discuss about it on our Gitter.
Original project from p2-theme-core
.
MIT (original license)
FAQs
OVH Gulp tasks Drupal Theme Core
We found that gulp-drupal-theme-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.