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

jimdo-templateflow

v1.1.0

Published

jimdo template grunt workflow

Downloads

5

Readme

jimdo templateflow Build Status

grunt flow for jimdo templates

About

The idea is to create an ability to use the same grunt flow over all jimdo templates, to save up time and make it easier to develop the flow.

Getting Started

This plugin requires Grunt ~1.0.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install jimdo-templateflow --save-dev

Once the package has been installed, add the following line to your Gruntfile:

module.exports = require('jimdo-templateflow')

That's it, now you can use the provided tasks :)

Grunt Tasks

Available grunt tasks provided by the templateflow. Note: The templateflow will not provide any default task, so you have to call the tasks directly.

serve

grunt serve

Compiles sass and starts a local server for developing. Watch und livereload is also included.

compile

grunt compile

Compiles and lints the sass files into css.

build

grunt build

Creates deploy-ready css files, so it will be autoprefixed and minified.

release

grunt release

Releases a version (patch as default) to the Design API. The publish process is at the moment not public and usable for everyone. Usage examples for bumping: https://github.com/vojtajina/grunt-bump#usage-examples

prerelease

grunt prerelease

Releases a prereleased version to the Design API. The publish process is at the moment not public and usable for everyone. Usage examples for bumping: https://github.com/vojtajina/grunt-bump#usage-examples

Configuration

The package provides many defaults, but you can overwrite them in the template. Create in your root directory a template.yml file and use the following options.

# example for a template.yml

# directories
imgDir: 'img'

# css
cssExt: '.min.css'

baseDir

optional Type: String | Default: ./

Set base directory for local server.

sassDir

optional Type: String | Default: sass

Set the directory for sass.

cssDir

optional Type: String | Default: css

Set the directory for compiled css.

imgDir

optional Type: String | Default: ``

Set the directory for images.

bowerDir

optional Type: String | Default: bower_components

Set the directory to the bower components for sass compiling.

cssExt

optional Type: String | Default: .css

Set the extension for compiled css files, for example: .min.css

port

optional Type: Integer | Default: 8080

Set the port for local server.

hostname

optional Type: String | Default: localhost

Set hostname for local server.

livereload

optional Type: Number|Boolean | Default: true

Set port for livereload or disable functionality.

designId

optional Type: Integer | no default

Set the Design ID for API. Further informations here: https://github.com/Jimdo/grunt-template-publisher

publisherEndpoint

optional Type: String | Default: undefined

Set the endpoint for publishing. Further informations here: https://github.com/Jimdo/grunt-template-publisher

sassCompiling

optional Type: Boolean | Default: true

Ability to switch off sass compiling (eg. for css-only templates)

Environment

For some options it could be very helpful to use this direct in the environment, therefore the templateflow provides some options.

process.env.PORT

Set the port for local server.

process.env.LIVERELOAD

Set port for livereload or disable functionality.

process.env.PUBLISHER_ENDPOINT

Set the endpoint for publishing (for example for local tests).

CSS linter

The templateflow provides defaults for the css linter. Take a look to the file config/csslintDefault.js for more details about it. You could also override every option in your template. Create a .csslintrc in your root directory and add your properties, for example:

{
  "important": true
}

The default properties and the template based properties will be merged, so you don't have to override every option.

Custom grunt config

It's also possible to create template-based configs and tasks. It could look in a way like this:

module.exports = function (grunt) {

  grunt.initConfig({
    blubb: {
      option: {
        cool: true
      }
    }
  })

  require('jimdo-templateflow')(grunt)
  grunt.registerTask('default', ['serve'])
}

Note:: Write first your init config and then the requirement to the templateflow, otherwise the config for the templateflow is missing.

Contributing

Contributions are always welcome! Take care to maintain the existing coding style. Add unit tests for any new or changed functionality. We're using jasmine for unit testing. Install jasmine global on your machine (npm install -g jasmine) and run npm test.