Giter VIP home page Giter VIP logo

sweet-pea's People

Contributors

dependabot[bot] avatar kingdutch avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sweet-pea's Issues

Figure out how to handle copy support

The socialbase theme currently has a gulp task specifically for mime-icons that's implemented as follows:

// #################
//
// Image mime icons
//
// #################
//
// Copy the mime icons from the components folder to the assets folder (manual task)
// ===================================================

gulp.task('mime-image-icons', function () {
  return gulp.src(options.icons.src + 'mime-icons/*.png')
    .pipe(gulp.dest(options.basetheme.build + 'images/mime-icons/'))
});

This task seems to have been unneeded for a long time but being able to configure copying of certain folders is a useful feature.

Add sprite icon support

The current gulp task is described as follows.

// #################
//
// Sprite icons
//
// #################
//
// svgmin minifies our SVG files and strips out unnecessary
// code that you might inherit from your graphics editor.
// svgstore binds them together in one giant SVG container called
// icons.svg. Then cheerio gives us the ability to interact with
// the DOM components in this file in a jQuery-like way. cheerio
// in this case is removing any fill attributes from the SVG
// elements (you’ll want to use CSS to manipulate them)
// and adds a class of .hide to our parent SVG. It gets
// deposited into our inc directory with the rest of the HTML partials.
// ===================================================

var svgmin        = require('gulp-svgmin'),
    svgstore      = require('gulp-svgstore'),
    cheerio       = require('gulp-cheerio');

gulp.task('sprite-icons', function () {
  return gulp.src(options.icons.src + '*.svg')
    .pipe(svgmin())
    .pipe(svgstore({inlineSvg: true}))
    .pipe($.rename('icons.svg') )
    .pipe(cheerio({
      run: function ($, file) {
        $('svg').addClass('hide');
      },
      parserOptions: { xmlMode: true }
    }))
    .pipe(gulp.dest(options.icons.dest))
});

Add support for modules

Currently only themes are supported. However, modules in the Open Social distribution also have SCSS/JS files and should adhere to the same coding standards and compilation style as themes.

Add folder option to command line program

We should add a -d/--directory option that allows you to specify a different folder than the current working directory (or even multiple directories at the same time).

Separate lib from CLI

Currently this build tool is very CLI focused. The CLI file should be separated from the actual processing done on the files.

In theory it should be possible to call the various processing functions from your own program without using the CLI.

Add Javascript linting

The current gulp setup uses ESLint for linting javascript files but this has not yet been implemented.

Publish packages on NPM

In order to facilitate easier usage by developers the packages should be published to NPM.

Add `watch` support

A -w/--watch option should be added to automatically re-run the selected task on a watched file. This is currently supported in the gulp set-up but is not yet supported in Sweet Pea.

We should use https://github.com/paulmillr/chokidar to do this because it has better performance when used with Docker than the built-in Node fs.watch.

Be aware of theme inheritance

#7 requires some files from the base theme to be compiled alongside files in the current theme. This means that the DrupalTheme class should be aware of parent themes and potentially load parent themes from the theme.info.yml file.

Add color module support

The current gulp workflow creates some separate stylesheets for the color module preview (with a class prefix). This is not yet supported in Sweet Pea but should be added.

Add SASS Linting

The current gulp workflow uses sasslint to lint sass files but this has not yet been ported to Sweet Pea

Add a README

A README should be added to this project that explains how it can be used.

Add image icon support

Related to #10

Currently implemented in Gulp as follows:

// #################
//
// Image icons
//
// #################
//
// Besides the sprite we sometimes still need the individual svg files
// to load as a css background image. This task optimises and copies
// the icons to the assets folder.
// ===================================================

gulp.task('image-icons', function () {
  return gulp.src(options.icons.src + '*.svg')
    .pipe(svgmin())
    .pipe(gulp.dest(options.basetheme.build + 'images/icons/'))
});

Add a styleguide builder

The current gulp set-up uses KSS to build a styleguide for socialbase/socialblue but a lot of work is required to make KSS work with Drupal.

We should instead investigate whether we can create a Drupal focused styleguide builder that requires less custom work and configuration.

This should possibly be a tool separate from Sweet Pea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.