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

csstime-gulp-tasks

v6.1.0

Published

Prepared Gulp tasks to build and optimize assets of your project (SASS, LESS, CSS, SVG, images, sprites and more)

Downloads

34

Readme

csstime-gulp-tasks

Join the chat at https://gitter.im/csstime/csstime-gulp-tasks

Prepared Gulp tasks to build and optimize assets for your project (SASS, LESS, CSS, SVG, images, sprites and more). Themes are supported via separated additional css-bundles.

npm install csstime-gulp-tasks

List of used packages:

  • autoprefixer-core,
  • gulp-concat,
  • gulp-csscomb,
  • gulp-csso,
  • gulp-header,
  • gulp-imagemin,
  • gulp-less,
  • gulp-sass,
  • gulp-postcss,
  • gulp-svgstore,
  • gulp-uglify,
  • gulp.spritesmith,
  • node-notifier,
  • normalize.css,
  • pleeease-filters,
  • postcss-opacity.

If your project has following structure you can use these tasks or some of them. component.json should have "name" of component.

gulpfile.js
static/ #always stored in a repository
├──favicon.ico
├──robots.txt
└──...
src/ #source directory
└──components/
	└──document/
		├──component.json
		└──assets
			├──other/
			├──fonts/
			├──images/
			├──sprites/
			└──sass/
				└──themes/
					└──mobile.scss
				└──styles.scss
			├──svg/
			└──symbols/
				├──icon1.svg
				└──icon2.svg
	└──componentA/
		├──component.json
		└──assets
			├──sprites/
			└──sass/
				└──themes/
					└──mobile.scss
				└──styles.scss
			├──svg/
			└──symbols/
				├──icon3.svg
				└──icon4.svg
	└──componentB/
		├──component.json
		└──assets
			└──css/
				└──styles.css

Example App with such structure you can find here csstime-example.

Just write this in your gulpfile.js:

'use strict';

var gulp = require('gulp'),
    config = {}, // custom config
    csstime = require('csstime-gulp-tasks');

config.useSvgSymbols = true; // custom configuration
config.themedStylesFileNames = ['mobile']; // separated themes
csstime.loadGulpTasks(gulp, config);

You can pass custom config in csstime.loadGulpTasks(gulp, config); to override default params. Learn more about default params in configs documentation.

Here is available high level tasks which you can see for gulp --tasks:

| Name | Action | |---------------------------|-------------------------------------------------------------------------------| | csstime-mode-release | Build, optimize and minify all assets. Remove temporary files. | | csstime-mode-debug | Collect and build assets. You can analyze temporary files. | | csstime-mode-watch | Watch changing files and run in debug mode | | csstime-exec-csscomb | Execute csscomb | | csstime-clean | Clear destination directory |

Learn more about all tasks in tasks documentation.

After csstime-mode-release you will get following structure:

gulpfile.js
static/ #without changes
src/ #without changes
build/ #all generated files here
	├──favicon.ico
    ├──robots.txt
    ├──...
	├──styles.css
	└──themes/
		└──mobile.css
	└──components/
		├──sprites.png
		├──symbols.svg
		└──document/ #without sass, css, sprites
			├──other/
			├──fonts/
			├──images/
			└──svg/
		└──componentA/
			└──svg/

Migration

Learn how to migrate from previous versions here.