![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
buildbranch
Advanced tools
Publish a folder to a given branch (like gh-pages).
You can use this from the command-line or within your build system.
First, install buildbranch
globally:
npm install buildbranch -g
Then, from your master branch, run buildbranch
with the branch and directory you want to publish. It will default to gh-pages
and www
.
buildbranch gh-pages www
First, install buildbranch
as a development dependency:
npm install buildbranch --save-dev
Then, use it in your build system:
buildBranch({
branch: 'gh-pages',
ignore: ['.git', 'www', 'node_modules'],
folder: 'www',
domain: 'example.com'
}, function(err) {
if(err) {
throw err;
}
console.log('Published!');
});
For example in gulp you can do it like this:
var gulp = require('gulp');
var buildBranch = require('buildbranch');
gulp.task('gh', ['build'], function(done) {
buildBranch({ folder: 'dist' }, done);
});
Type: Object
Required. An object containing the following options.
Type: String
Default: 'gh-pages'
The branch on wich to publish.
Type: String
Default: 'www'
The folder in wich the build is.
Type: String
The domain name that will fill the cname file.
Type: String
Default: 'CNAME'
The name of the file enabling custom domain name on you build platform.
Type: String
Default: 'Build %curtimestamp%'
The commit label.
Type: String
Default: process.cwd()
The working directory (root of the git repo).
Type: Array
A list of files to ignore. 'node_modules' and '.git' will be automatically added to the ignore list.
Type: Function
Required. Called when the publication is done.
You may want to contribute to this project, pull requests are welcome if you accept to publish under the MIT licence.
FAQs
Publish a folder to the given build branch (like gh-pages).
We found that buildbranch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.