-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
182 lines (161 loc) · 5.19 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
//var gulp = require('gulp')
// ,symlink = require('gulp-symlink')
// ,runSequence = require('run-sequence')
// ,git = require('gulp-git')
// ,browserSync = require('browser-sync')
// ,reload = browserSync.reload
// ,sass = require('gulp-sass')
// ,exec = require('gulp-exec');
gulp.task('default', function() {
});
// Check for and cloen the Drupal VM repo
//gulp.task('drupalVM:repo', function() {
//
// var config = ['config/config.yml', 'config/drupal.make.yml'];
// var dest = 'drupal-vm';
//
// git.clone('[email protected]:geerlingguy/drupal-vm.git', function (err) {
// if (err == null) {
//
// console.log('Clone successful, copying config');
//
// return gulp.src(config)
// .pipe(gulp.dest(dest));
//
// } else {
//
// console.log('Folder exists, updating repo, copying config');
//
// git.pull('origin', 'master', {cwd: 'drupal-vm'}, function(err) {
//
// //if (err) throw err;
//
// return gulp.src(config)
// .pipe(gulp.dest(dest));
//
// });
// }
// });
//
//});
// Symlink into the Drupal VM repo our custom config files
//gulp.task('drupalVM:copy:VMConfig', function() {
// console.log('Writing config to vm');
// return gulp.src(['config/config.yml', 'config/drupal.make.yml'])
// .pipe(gulp.dest('drupal-vm'));
//});
// Restart vagrant: this changes the server AND rebuilds drupal if we've deleted it
//var vagrantoptions = {
// cwd: __dirname + '/drupal-vm',
// continueOnError: false,
// pipeStdout: false
//};
//gulp.task('drupalVM:vagrantUp', function() {
// return gulp.src('')
// .pipe(exec('vagrant halt && vagrant up --provision', vagrantoptions)
// );
//});
// Symlink our local custom drupal module dev work
//gulp.task('d8:symlink:D8Modules', function() {
// return gulp.src('project/build/dev/d8/modules/custom')
// .pipe(symlink('project/web/d8/modules/custom', {force: true}));
//});
// Run each task consecutively
//gulp.task('d8:rebuild', function(callback) {
// runSequence(
// 'drupalVM:repo',
// 'drupalVM:copy:VMConfig',
// 'drupalVM:vagrantUp',
// 'd8:symlink:D8Modules',
// callback
// );
//});
// PL stuff
//gulp.task('pl:gulp:package', function() {
// return gulp.src('./node_modules/patternlab-node/package.gulp.json')
// .pipe(gulp.dest('./node_modules/patternlab-node/package.json'));
//});
//gulp.task('pl:npm:install', ['pl:gulp:package'], function() {
// return gulp.src('')
// .pipe(shell(['npm install'], {cwd: 'node_modules/patternlab-node'}));
//});
//gulp.task('pl:symlink', ['pl:npm:install'], function() {
// return gulp.src('redesign/pl/source')
// .pipe(shell(['rm -rf node_modules/patternlab-node/source']))
// .pipe(symlink('node_modules/patternlab-node/source', {force: true}));
//});
// ====================== OLD BELOW ================================
// Blow away D8
//gulp.task('d8:ownD8', function() {
// return gulp.src(['project/web/d8', 'project/web/d8/**/*'])
// .pipe(chmod(755))
//});
//gulp.task('d8:nukeD8', function() {
// return gulp.src(['project/web/d8'])
// //.pipe(chmod(777))
// .pipe(vinylPaths(del));
//
// //return gulp.src('')
// // .pipe(shell([
// // 'chmod -R 777 project/web/d8 && rm -rf project/web/d8'
// // ]));
//});
// Need to nuke d7 directory before Drush making
//gulp.task('d7:chmod', function() {
// return gulp.src('web/drupal/d7/**/*')
// .pipe(chmod(777));
//});
//gulp.task('d7:clean', function(cb) {
// del(['web/drupal/d7'], cb);
//});
// Drush make drupal and contrib modules
//gulp.task('d7:make', ['d7:clean'], function() {
// return gulp.src('')
// .pipe(
// shell(['drush make build/d7-generate.make web/drupal/d7'])
// );
//});
// Copy local settings.php to new local d7 site
//gulp.task('d7:customFiles', ['d7:make'], function() {
// return gulp.src([
// 'build/dev/d7/**/*'
// ]).pipe(
// gulp.dest('web/drupal/d7/sites/')
// );
//});
//// Full drupal install
//gulp.task('d7:install', ['d7:customFiles'], function() {
// return gulp.src('')
// .pipe(
// shell([
// 'echo "Installing drupal, make sure you catch the password printed out"',
// 'drush site-install standard --site-name=DOWNFALLD7 --yes',
// 'echo "Enabling downfall_migrate_feature"',
// 'drush en downfall_migrate_feature --yes',
// 'echo "Rebuilding node access permissons"',
// 'drush php-eval "node_access_rebuild();"',
// 'echo "Reverting features"',
// 'drush fr downfall_migrate_feature --yes',
// 'echo RUN SQL FROM FILE FOR forum_access',
// "`drush sql-connect` < forum_access.sql"
// ], {
// 'cwd':'web/drupal/d7/sites/d7.local.downfallguild.org'
// })
// );
//});
// Kick off d7 build
//gulp.task('d7:init', ['d7:install']);
//
//gulp.task('d7:cc', function() {
// return gulp.src('')
// .pipe(
// shell(['drush cc all'], {'cwd': 'web/drupal/d7/sites/d7.local.downfallguild.org'})
// );
//});
//gulp.task('d7:watch', function() {
// watch(['build/dev/d7/**/*']).pipe(
// shell(['rsync -vzr /var/www/df/build/dev/d7/* /var/www/df/web/drupal/d7/sites'])
// );
// //.pipe(gulp.dest('web/drupal/d7/sites/'));
// //.pipe(shell(['rsync -vzr /var/www/df/build/dev/d7/* /var/www/df/web/drupal/d7/sites']));
//});