Skip to content

Commit

Permalink
feat: Added necessary files and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Ris committed Mar 2, 2020
1 parent a23fbea commit 79c3a8d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
36 changes: 22 additions & 14 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ const reload = done => {

// WordPress banner
const comment = '/*\n' +
' * Theme Name: <%= pkg.name %>\n' +
' * Author: <%= pkg.author %>\n' +
' * Author URI: <%= pkg.website %>\n' +
' * Description: <%= pkg.description %>\n' +
' * Version: <%= pkg.version %>\n' +
' * License: <%= pkg.license %>\n' +
' * License URI: <%= pkg.license_uri %>\n' +
' * Text Domain: <%= pkg.name %>\n' +
' * Tags: <%= pkg.keywords %>\n' +
'*/\n\n';
` * Theme Name: ${pkg.name}\n` +
` * Author: ${pkg.author}\n` +
` * Author URI: ${pkg.website}\n` +
` * Description: ${pkg.description}\n` +
` * Version: ${pkg.version}\n` +
` * License: ${pkg.license}\n` +
` * License URI: ${pkg.license_uri}\n` +
` * Text Domain: ${pkg.name}\n` +
` * Tags: ${pkg.keywords}\n` +
` * Copyright: ${pkg.year} ${pkg.author}\n` +
' * This stylesheet is not used by this WordPress site it only exists as reference for WordPress. The stylesheet in use can be found in this folder as style.min.{hash}.css\n' +
'*/\n';

// Clean
export const clean = () => del(['dist', 'build']);
Expand All @@ -64,11 +66,17 @@ export const styles = () => {
compatibility: 'ie8'
})))
.pipe(gulpif(!PRODUCTION, sourcemaps.write()))
.pipe(dest('dist/css'))
.pipe(server.stream());
};

// Add banner
const addBanner = () => {
return src('src/php/style.css')
.pipe(banner(comment, {
pkg
}))
.pipe(dest('dist/php'))
.pipe(server.stream());
.pipe(dest('dist/php'));
};

// Images
Expand Down Expand Up @@ -228,8 +236,8 @@ export const addRelease = () => {
return run(`git add CHANGELOG.md README.md package.json && git commit --amend --no-edit && git tag v${pkg.version} -m "Version ${pkg.version}" && git push && git push --tags`).exec();
};

export const dev = series(clean, parallel(styles, images, copy, scripts), serve, watchForChanges);
export const build = series(clean, parallel(styles, images, copy, scripts), copyHtaccessProduction, compress);
export const dev = series(clean, parallel(styles, images, copy, scripts), addBanner, serve, watchForChanges);
export const build = series(clean, parallel(styles, images, copy, scripts), addBanner, copyHtaccessProduction, compress);
export const bump = series(bumpPrompt);
export const hint = series(showHint);
export const release = series(addRelease);
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "gulp-wordpress",
"version": "0.0.3",
"year": "2020",
"description": "Automated WordPress Theme development environment run by Gulp using Sass, Babel, Webpack, linters and BrowserSync.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -70,6 +71,8 @@
"yargs": "^15.1.0"
},
"dependencies": {
"jquery": "^3.4.1"
"bootstrap": "^4.4.1",
"jquery": "^3.4.1",
"popper.js": "^1.16.1"
}
}
Empty file added src/php/style.css
Empty file.

0 comments on commit 79c3a8d

Please sign in to comment.