npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-phoenixdown

v0.0.17

Published

A simple-but-fantasy-ish API for defining basic Gulp tasks for your (especially Laravel) web application

Downloads

9

Readme

Phoenixdown

Phoenixdown provides a simple-but-fantasy-ish API for defining basic Gulp tasks for your (especially Laravel) web application.

However, instead of providing all new API style like Elixir, we just provide a simple functions to use will Gulp.

If you're eliminated, Elixir can't help you, but Phoenix Down can.

Installation

Add gulp-phoenixdown as an dependency in devDependencies of your package.json file, then run npm install.

Usage

Require gulp-phoenixdown in your gulpfile.js, then just "cast" some skills:

var gulp = require('gulp');
var cast = require('gulp-phoenixdown');

gulp.task('browserify', cast.browserify('./resources/assets/js/app.js').to('./public/js'));
gulp.task('less', cast.less('./resources/assets/less/app.less').to('./public/css'));

That's it! We just provide skills: the functions to create common tasks easily. However, if you want more tasks, you can just use Gulp directly.

Built-in skills

  • angularTemplateCache
  • all
  • browserSync
  • browserify
  • clean
  • concat
  • copy
  • jshint
  • less
  • version

angularTemplateCache

Make template cache for AngularJS, from src to dest.

gulp.task('template', cast.angularTemplateCache(src).to(dest));

all

Cast many skills at once.

gulp.task('copy', cast.all(
    cast.copy(src1).to(dest1),
    cast.copy(src2).to(dest2),
    cast.copy(src3).to(dest3),
));

browserSync

To start the server:

cast.browserSync.startProxy(server);

You may omit the server argument, and it will try to use value from APP_URL or APP_DOMAIN of .env file in the project.

To reload the server:

cast.browserSync.reload();

browserify

Bundle JavaScripts with Browserify.

Declaring the task:

gulp.task('browserify', cast.browserify(src).to(dest));

Or call in watch task:

cast.browserify(src).to(dest).watch();

clean

gulp.task('clean', cast.clean(src));

concat

gulp.task('concat', cast.concat(src).to(dest));

copy

gulp.task('copy', cast.copy(src).to(dest));

jshint

Lint JavaScript files with JSHint.

gulp.task('jshint', cast.jshint(src));

less

Compile LESS files from src to css into dest directory.

gulp.task('less', cast.less(src).to(dest));

version

gulp.task('version', cast.version(src).to(dest));

Sample

var gulp = require('gulp');
var cast = require('gulp-phoenixdown');

// Task Set
var build = ['browserify', 'template', 'less', 'copy'];
var postBuild = ['version'];
var develop = ['server', 'watch'];

// Usage
gulp.task('default', build.concat(postBuild));
gulp.task('develop', build.concat(postBuild).concat(develop));

// Build
gulp.task('browserify', cast.browserify('./resources/assets/js/app.js').to('public/js'));
gulp.task('template', cast.angularTemplateCache('./resources/assets/templates/**/*.html').to('public/js'));
gulp.task('less', cast.less('./resources/assets/less/app.less').to('public/css'));
gulp.task('copy', cast.copy('./node_modules/bootstrap/dist/fonts/**/*').to('public/fonts'));
gulp.task('version', build, cast.version([
  './public/js/app.js',
  './public/js/templates.js',
  './public/css/app.css',
]).to('public/build'));

// Develop
gulp.task('server', cast.browserSync.startProxy);
gulp.task('reload', build, cast.browserSync.reload);
gulp.task('watch', function() {
  cast.browserify('./resources/assets/js/app.js').to('public/js').watch();
  gulp.watch('./resources/assets/templates/**/*.html', ['reload']);
  gulp.watch('./resources/assets/less/**/*.less', ['reload']);
  gulp.watch('./public/js/app.js', ['reload']);
});