Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

front-buddy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

front-buddy

a front end bundler all in one build tool

  • 1.0.11
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

alt Front-Buddy

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!

Install

$ npm i -s front-buddy

Structure

Module

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);
  });
});

Project

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

Package last updated on 08 Nov 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc