Skip to content

Commit

Permalink
Merge pull request #16 from RoSk0/drupal-cleanup
Browse files Browse the repository at this point in the history
Drupal cleanup
  • Loading branch information
alexey0511 committed Mar 1, 2019
2 parents c23ce83 + e5ddbcd commit 76a95eb
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions generators/gulp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,18 +313,20 @@ module.exports = class extends Generator {
);
}

this.fs.copyTpl(
this.templatePath('scss/index.scss'),
this.destinationPath(`${scssPath}/index.scss`),
{ options: this.props }
);
if (!this.props.drupalbootstrap) {
this.fs.copyTpl(
this.templatePath('scss/index.scss'),
this.destinationPath(`${scssPath}/index.scss`),
{ options: this.props }
);

this.fs.copyTpl(
this.templatePath('scss/_variables-project.scss'),
this.destinationPath(`${scssPath}/_variables-project.scss`)
);
this.fs.copyTpl(
this.templatePath('scss/_variables-project.scss'),
this.destinationPath(`${scssPath}/_variables-project.scss`)
);
}

if (this.props.bootstrap) {
if (this.props.bootstrap && !this.props.drupalbootstrap) {
this.fs.copyTpl(
this.templatePath('scss/_variables-bootstrap.scss'),
this.destinationPath(`${scssPath}/_variables-bootstrap.scss`),
Expand All @@ -342,7 +344,7 @@ module.exports = class extends Generator {
mkdirp(`${this.props.src}/img`);
if (this.props.js) { mkdirp(`${this.props.src}/js`); }
} else if (this.props.bootstrap && !this.props.bootstrap4) {
// make a fonts folder
// Make a fonts folder.
mkdirp('fonts');
}

Expand All @@ -352,20 +354,20 @@ module.exports = class extends Generator {

end() {
if (this.props.bootstrap && !this.props.bootstrap4) {
// copy over the Bootstrap 3 font
// Copy over the Bootstrap 3 fonts.
if (!this.props.flatStructure) {
this.spawnCommandSync(
'cp', ['-r', 'node_modules/bootstrap-sass/assets/fonts/bootstrap', `${this.props.src}/fonts`]
);
} else {
} else if (!this.props.drupalbootstrap) {
this.spawnCommandSync(
'cp', ['-r', 'node_modules/bootstrap-sass/assets/fonts/bootstrap', 'fonts']
);
}
}

if (this.props.drupalbootstrap) {
// copy Bootstrap 3 assets to local folder for Drupal
// Copy Bootstrap 3 assets to local folder for Drupal.
// https://drupal-bootstrap.org/api/bootstrap/starterkits!sass!README.md/group/sub_theming_sass/8
this.spawnCommandSync(
'cp', ['-r', 'node_modules/bootstrap-sass/.', 'bootstrap']
Expand Down

0 comments on commit 76a95eb

Please sign in to comment.