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

bendystraw

v1.4.10

Published

A set of Gulp tasks for building Angular apps

Downloads

91

Readme

bendystraw NPM version

Some features include Babel & CoffeeScript support, Angular specific features, Browersync development, multiple app environments, GitHub changelog and release creation, AWS deployment, Slack integration, and more.

Usage

npm install --save-dev bendystraw

In order to use the gulp tasks, create a gulpfile.js with:

require('bendystraw')()

Config

bendystraw assumes you have a defined source folder to use the tasks. By default, it looks like this:

Imgur

You can generate this structure by using gulp scaffold, or you can override it to fit your needs. Here's an example configuration:

// gulpfile.js
require('bendystraw')({
  paths: {
    build: 'public', // Override the build folder name
    styles: 'css', // Override the stylesheet source folder
  },
  html: {
    preprocessor: require('gulp-jade'), // Use a custom html preprocessor
  },
  styles: {
    sassOptions: {
      indentedSyntax: true // Use .sass indented syntax
    },
    uncss: true, // Enable uncss
    autoprefixer: true
  },
  scripts: {
    babel: true, // Use babel es2015 preset
    coffeescript: false,
    sourcemaps: false
  }
})

Check out all the config values here

NOTE: gulp scaffold will generate an index.html file. This shows how bendystraw uses gulp-inject and gulp-useref to inject your app's javascript and create bundles. Make sure to change the paths in the file if you've overridden the defaults. Read more about it on the wiki.

Tasks

command | description ------- | ------------ gulp | defaults to server task gulp server | builds the app to the dev folder and runs the Browsersync server gulp build | builds, minifys the app to the build folder (for production) gulp release | bumps version, tags, and creates a GitHub release based on your package.json gulp deploy | deploys the build folder to a S3 bucket, posts to Slack if configured gulp lint | lints using sass-lint, eslint, and coffeelint gulp test | runs tests using Karma gulp e2e | runs end to end tests with Protractor

bendystraw uses dotenv to load environment variables into the app. All of these tasks can be run with --env, ie: gulp build --env staging. This will make .env.staging available to the app.

To read more about the tasks and environment, check out the wiki.

Features

  • JS:
    • Angular features (off by default)
      • Dependency injection annotations
      • File sorting to avoid injection issues
      • Compiles html files to the Angular templateCache
    • Babel es2015 support
    • CoffeeScript support
    • CoffeeLint/ESLint
    • Sourcemaps
    • Bower components automatically injected through wiredep
    • Multiple script bundles created with useref
  • CSS:
    • Sass support, indented or scss using node-sass
    • Sourcemaps
    • Autoprefixer
    • SassLint
    • Uncss
  • HTML:
    • Any gulp-based html preprocessor support (gulp-haml, gulp-jade, etc)
  • Images:
    • Image compression
    • Grabs images from specified Bower components
  • Development:
    • Live reload with Browsersync
    • Support for multiple environments through dotenv
    • dotenv configuration output to window global or Angular constant for injection
    • Environment specific logic in the views
  • Releasing:
    • GitHub semantic tagging and release creation (based on your package.json)
    • Changelog generation by comparing previous tag
  • Deployment:
    • Amazon S3 bucket deploys
    • Asset revisioning
    • Cloudfront CDN url replacement support
    • Slack deployment messages
  • Testing:
    • Karma tests
    • End to end testing with Protractor

Thanks

bendystraw is inspired and based off of several Gulp projects. Big thanks to gulp-starter by vigetlabs and generator-gulp-angular by Matthieu Lux