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

showcar-gulp

v3.2.10

Published

Shared build steps for projects using the ShowCar UI Library

Downloads

164

Readme

showcar-gulp

Unified frontend build pipeline for projects using the ShowCar UI Library

Install

npm install showcar-gulp -D

Before starting

Install gulp

npm install gulp -D

Publishing showcar-gulp to NPM

Once a new build is ready to be published to NPM as a new package version, you'll first need to login to NPM with the AS24 account. You can get the information from LastPass.

Then update the semver for the showcar-gulp package:

# 0.0.1
npm version patch
# 0.1.0
npm version minor
# 1.0.0
npm version major

Lastly, publish the updated package to NPM:

npm publish

Usage

Install showcar-gulp in your project.

npm install -d showcar-gulp

Create your own gulpfile.js with the following structure

// gulpfile.js

const gulp = require('gulp');
const scgulp = require('showcar-gulp')(gulp);

// gulp tasks alliases
gulp.task('set-dev', () => {
  scgulp.config.devmode = true;
});

gulp.task('build', ['scss', 'js']);

gulp.task('dev', ['set-dev', 'scss:watch', 'js:watch', 'serve']);
gulp.task('default', ['build']);

Build tasks

JS Build and minify your js files

gulp.task(
  'js',
  scgulp.js({
    entry: 'src/main.js',
    out: 'dist/main.min.js'
  })
);

SCSS Build and minify css from sass files

gulp.task('scss', scgulp.scss({
    entry: 'src/main.scss',
    out: 'dist/showcar.min.css'
});

TypeScript Build and minify your ts files

gulp.task(
  'ts',
  scgulp.ts({
    entry: 'src/main.ts',
    out: 'dist/tsmain.min.js'
  })
);

Linter tasks

Tasks for linting JS and CSS code style

JS

gulp.task('eslint', scgulp.eslint({
    files: 'src/**/*.js'
});

TypeScript

gulp.task(
  'tslint',
  scgulp.tslint({
    files: 'src/**/*.ts'
  })
);

CSS

gulp.task('stylelint', scgulp.stylelint({
    files: 'src/**/*.scss'
});

For running linter tasks you will also need to create configuration files in your project.

.eslintrc.js for eslint task

.stylelintrc.js for stylelint task

Serve task

Runs a local server on localhost:3000 by default

gulp.task('serve', scgulp.serve({
    dir: 'dist'
});

Clean task

Removes files according to the files pattern

gulp.task('clean', scgulp.clean({
    files: ['dist/**/*']
});

Karma task

Runs karma tests

gulp.task('jstest' scgulp.js({
    entry: 'src/main.spec.js',
    out: 'dist/main.min.spec.js',
    watch: ['test-src/**/*.js', 'js-src/**/*.js'],
});

gulp.task('karma', ['jstest'], scgulp.karma({
    files: ['dist/index.spec.js']
});

gulp.task('jstest:watch', () => {
    gulp.watch(['test-src/**/*.js', 'js-src/**/*.js'], ['karma']);
});

Usage example

Please see our gulpfile