
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
front-buddy
Advanced tools
A frontend build automator tool
No matter the structure of your project, front-buddy will help you!
Show to front-buddy what is your initial js file, and it will build, inject css, inject less, inject html, precompile ec6 into ec5 and create a bundle file with all into it.
Show the front-buddy your index.html file, and it will compile all your modules, inject bower and all modules compiled to prepare it for production!
Forget about complicated gulp files! Front-buddy is browserify, babel, uglify, wiredep and gulp-inject in only one module!
$ npm i -s front-buddy
is a js file with all your code on it, you give us your options object, and we can build or watch it for changes
you can user in your file, cummonjs requires of html files, css and less files, js files, you can also use in your js files module.exports to import it in your module file.
// myJsFileLocation.js
const angular = require('angular');
require('./style.less');
const myTemplate = require('./template.html');
var app = angular.module("myApp");
app.directive('myDirective', function() {
return {
template: myTemplate,
controller: function(){
}
}
});
in your gulp file you import Buddy and use it to build your module file
// gulpfile.js
const gulp = require('gulp');
const Buddy = require('front-buddy');
const myModule = new Buddy.Module({
location: "./folder/to/myModule.js",
destination: "./folder/to/www/bundles/",
});
gulp.task('build', () => {
return myModule.build().then(value => {
console.log(value.message);
});
});
is a collection o modules, and a index.html.
in your html file the import tags should exists to run inject method
<!DOCTYPE html>
<html lang="en">
<head>
<!-- bower:css -->
<!-- endbower -->
</head>
<body ng-app="MyApp">
<my-directive></my-directive>
<!-- bower:js -->
<!-- endbower -->
<!-- bundles:js -->
<!-- endinject -->
</body>
</html>
the bower:css, bower:js and bundles:js are the tags that front-buddy will fill with bower injections and modules bundles imports
// gulpfile.js
const gulp = require('gulp');
const Buddy = require('front-buddy');
const myModule = new Buddy.Module({
location: "./folder/to/myModule.js",
destination: "./folder/to/www/bundles/",
});
const myProject = new Buddy.Project({
index: "./folder/to/Index.html",
modules: [myModule],
});
// build modules
gulp.task('build', () => {
return myProject.build().then(value => {
console.log(value.message);
});
});
// inject bower and modules files into index
gulp.task('inject', () => {
return myProject.inject().then(value => {
console.log(value.message);
});
});
Made with love, from moblets dev team.
FAQs
a front end bundler all in one build tool
We found that front-buddy 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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.