Git Product home page Git Product logo

gulp_drupal_7's Introduction

Gulp Drupal 7

Automatise les tâches pour le développement front-end sur drupal 7. Permet de compiler, nettoyer, préfixer et minifier les feuilles de style et les fichiers javascript. Optimise les images. Recharge le navigateur automatiquement après une modification.

Installation

  • Requis : node.js / NPM
  • Requis : Gulp npm install gulp -g
  • Copier les fichiers defautl.config.json, gulpfile.js et package.json dans le thème de drupal (sites/all/themes/mon_theme)
  • Renommer default.config.json en config.json
  • Lancer l'installation des packages avec npm install

Utilisation

Toutes les tâches

La commande gulp lance toutes les tâches CSS, JS et images. La commande gulp watch surveille les dossiers concernés et lance les tâches à chaque modification.

Lancer une tâche

Pour compiler les fichiers SCSS :

gulp sass

Pour compiler les fichiers JS : gulp js

Pour optimiser les images : gulp img

Passage en production

Pour exécuter les tâches spécifiques à la mise en production : gulp --env prod

Recharger le navigateur automatiquement

Il faut installer le module BrowserSync pour Drupal au préalable et l'activer dans apparence/paramètres. Puis dans le fichier config.json, ajouter l'url du site en face de la ligne "proxy" :. Enfin, relancer un gulp watch.

gulp_drupal_7's People

Contributors

fwagra avatar

Stargazers

Mohammed Hasanul Chowdhury avatar

Watchers

James Cloos avatar

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.