
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
A bunch of useful configurable Gulp tasks global to many projects, to manage development and production tasks with ease.

gulp
Using gulpfile ~/path/to/gulpfile.js
Starting 'default'...
Main Tasks
------------------------------
default
dev
ls
prod
serve
vendor
Sub Tasks
------------------------------
bower:manager
clean:bower.cache
clean:npm.cache
create:app.fonts
create:app.images
create:app.scripts
create:app.styles
create:bower.fonts
create:bower.images
create:bower.scripts
create:bower.styles
delete:app.fonts
delete:app.images
delete:app.scripts
delete:app.styles
delete:bower.fonts
delete:bower.images
delete:bower.install
delete:bower.scripts
delete:bower.styles
delete:dist
update:bower
update:dependecies
update:npm
[15:35:46] Finished 'ls' after 1.16 ms
[15:35:46] Starting 'default'...
Wraiths
------------------------------
-all
-wraith-name
Before get started with doom, verify that you have installed node with npm
which node
which npm
if are not installed, install it with brew or similar
brew install node
And verify that gulp and bower are installed globally
$ sudo npm install -g gulp bower
Then you can install doom through npm
$ sudo npm install -g doom
Or through github (you must add the doom and doom/task path to your NODE_PATH)
$ git clone git@github.com:codezilla-it/doom.git
You must add to your .bashrc or .zshenv the global node_modules path
export NODE_PATH=/path/to/node_modules/
To use:
Create a bower.json into your project root
{
"name": "project-name",
"version": "1.0.0",
"authors": [
"Name-1",
"Name-2"
],
"description": "",
"main": "",
"moduleType": [
"amd"
],
"keywords": [
"word-1",
"word-2"
],
"license": "MIT",
"homepage": "http://project-name.com",
"private": true,
"ignore": [
"**/.*",
"*.map",
"*.json",
"*.md",
"*.editorconfig",
"*.yml",
"bower_components",
"node_modules",
"media",
"test",
"tests"
],
"dependencies": {
"plugin-1": "~number-version",
"plugin-2": "~number-version"
},
"devDependencies": {},
"resolutions": {
"shim-plugin-1": "~number-version",
"shim-plugin-2": "~number-version"
},
"install": {
"base": "path/to/static",
"path": "name_vendor_folder",
"sources": {
"plugin-1": [
"bower_components/path/to/plugin-1.js",
"bower_components/path/to/plugin-1.css",
"bower_components/path/to/fonts/*.**",
"bower_components/path/to/*.{gif,png,jpg,jpeg,svg}"
],
"plugin-2": [
"bower_components/path/to/plugin-2.js",
"bower_components/path/to/plugin-2.css",
"bower_components/path/to/fonts/*.**",
"bower_components/path/to/*.{gif,png,jpg,jpeg,svg}"
]
},
"ignore": [
"plugin-or-dependencies-to-ignore-1",
"plugin-or-dependencies-to-ignore-2"
]
}
}
Then run the gulp install that create the node_modules and bower_components dependencies
$ gulp install
Then create a gulpfile.js at the same level
// ---------------------------------------------
// gulpfile.js settings
// ---------------------------------------------
// Rather than manage one giant configuration file
// responsible for creating multiple tasks, each task
// has been broken out into its own file.
// To add a new task, simply add a new task
// in this configuration.
// ---------------------------------------------
var gulp = require('gulp');
// process objects
// ---------------------------------------------
var base = process.cwd();
process.wraith = {
root: process.env.WRAITHS_PATH,
paths: {
halo: '/layouts/halo'
},
'context': {
'common': '/common',
'desktop': '/desktop',
'tablet': '/tablet',
'phone': '/phone'
}
};
process.doom = {
gulp: gulp,
base: base,
static: base + '/static',
templates: base + '/templates/',
core: '/layouts/_core',
dist: '/_dist',
proxy: 'site-name.ext',
app: {
name: 'app',
styles: '/styles',
scripts: '/scripts',
images: '/images',
fonts: '/fonts'
},
mail: {
root: base + '/mail_system',
dist: '/static/_dist',
styles: '/static/styles',
templates: {
origin: '/templates/origin',
inlined: '/templates/inlined'
}
},
bower: {
name: 'vendor',
root: '/bower_components',
static: '/vendor',
order: [
'plugin-name-1/*.js',
'plugin-name-2/*.js',
'**/*.js'
],
include_paths: [
process.wraith.root,
base + '/bower_components/plugin-name-1',
base + '/bower_components/plugin-name-2',
base + '/bower_components/*'
],
fonts: [
'/font-awesome'
],
images: []
},
serve: {
styles: '/styles/**/*.{sass,scss}',
scripts: '/scripts/**/*.js',
markup: '/**/*.{html, phtml}',
mail: {
templates: '/templates/src/**/*.{html}',
styles: '/styles/sass/**/*.{sass,scss}'
},
bower: '/**/*.*'
}
};
require('doom');
For verify if node_modules need an update install npm-check
$ npm install npm-check-updates -g
and then you can update all modules version running
$ ncu
$ npm update -a
Now you must simpy include css and js dist into your base template
<link rel="stylesheet" href="path/to/static/{{ core }}/_dist/app.css">
<link rel="stylesheet" href="path/to/static/{{ wraith_name }}/_dist/app-{{ context }}.css">
<link rel="stylesheet" href="path/to/static/_dist/vendor.css">
...
<script src="path/to/static/_dist/vendor.js"></script>
<script src="path/to/static/{{ core }}/_dist/app.js"></script>
<script src="path/to/static/{{ wraith_name }}/_dist/app-{{ context }}"></script>
Run this task to:
gulp
This task create a vendor folder into your static with your plugins (images, fonts, and various assets of your choice), then create two files vendor.js and vendor.css and exports those (including assets) to dist folder.
gulp vendor
Run this task to:
and, parallelly:
gulp dev
Run this task to:
and, parallelly:
gulp prod
When you run this task, it will watch your project for changes. To use this you have to install livereload.
gulp serve
Run this task to:
and, parallelly:
gulp mail
Create wraith application dist into specific wraith :
gulp dev -wraith_name
Create wraith application dist into all wraiths and core dir:
gulp dev -all
This project is released under the MIT license.
FAQs
A bunch of modular gulp tasks
The npm package doomjs receives a total of 33 weekly downloads. As such, doomjs popularity was classified as not popular.
We found that doomjs 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.