Bien Être au Travail à Grenay (assets)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vincent Adolphe 0843cf0f72 [enh] ajout classe div-bline 2 years ago
artwork [enh] Prototype la page de ses agents 2 years ago
mockup [ref] Rends plus lisible les boutons Accepter / Refuser 2 years ago
src [enh] ajout classe div-bline 2 years ago
styleguide [doc] Documente l'utilisation des autres widgets : datepicker et password 2 years ago
.babelrc [init] Initialise la base avec cookiecutter-foundation 2 years ago
.gitignore [init] Initialise la base avec cookiecutter-foundation 2 years ago
README.md [init] Initialise la base avec cookiecutter-foundation 2 years ago
config.js [fix] Compresse les fichiers css et js finaux du dossier parent 2 years ago
gulpfile.babel.js [fix] Permets une utilisation hors-ligne de browsersync 2 years ago
package-lock.json [enh] Ajoute et personnalise Datepicker pour sélectionner une date 2 years ago
package.json [enh] Ajoute et personnalise Datepicker pour sélectionner une date 2 years ago

README.md

BETG - assets

Bien Être au Travail à Grenay

This are the BETG assets powered by ZURB Foundation for Sites. It includes CSS style, JavaScript, fonts and images for the application and has a Gulp-powered build system to compile compressed assets for production use.

Installation

Requirements

On a Debian-based host - running at least Debian Jessie with backports, you will need the following packages:

  • nodejs (>= 4)

If you are running Debian, do not rely on the npm package which is either outdated or removed - starting from Debian Stretch. Instead, here is a way to install the last npm version as a regular user:

  1. Install the other required packages: nodejs-legacy and node-rimraf.

  2. Set the npm's installation prefix as an environment variable:

      $ export npm_config_prefix=~/.node_modules
    
  3. Retrieve and execute the last npm's installation script:

      $ curl -L https://github.com/npm/npm/raw/latest/scripts/install.sh | sh
    
  4. Add the npm's binary folder to your environment variables:

    $ export PATH="${HOME}/.node_modules/bin:${PATH}"
    

    In order to keep those environment variables the next time you will log in, you can append the following lines to the end of your ~/.profile file:

    if [ -d "${HOME}/.node_modules/bin" ] ; then
        PATH="${HOME}/.node_modules/bin:${PATH}"
        export npm_config_prefix=~/.node_modules
    fi
    
  5. That's it! You can check that npm is now installed by running the following:

    $ npm --version
    

Step by step

Application and build system dependencies are all defined in package.json, which will be used by npm. Install them by running:

$ npm install

Usage

The build system defines two environments:

  • development: define and work on the assets using the mockup to preview the results, imagine and draw the pages.
  • production: generate the assets to be used by the real application, compressing them by the way.

If Gulp is installed on your system, you can run each task independently. There are 4 main tasks which can be run in any case just with npm.

Development

In development, the following commands can be used:

  • $ npm run build: build the assets, the mockup and the styleguide under the build folder.
  • $ npm run server: run the build task, launch a local server to serve the mockup and watch for assets changes.

Production

In production, the following commands can be used:

  • $ npm run dist: build the optimised and compressed assets for production usage and put them into the distribution folder (see config.js).
  • $ npm run proxy: run the build:dist task, launch a proxy server to the application and watch for assets changes.
  • $ npm run watch: run the build:dist task and watch for assets changes.

Structure

Overview

Here are some details about the package's files structure:

├── config.js
├── gulpfile.babel.js
├── README.md
├── package.json
├── mockup
│   ├── data
│   ├── helpers
│   ├── layouts
│   │   └── default.html
│   ├── pages
│   │   └── index.html
│   └── partials
├── src
│   ├── fonts
│   ├── img
│   ├── js
│   │   ├── app.js
│   │   └── lib
│   │       └── foundation.js
│   └── scss
│       ├── _settings.scss
│       ├── _zf_settings.scss
│       ├── app.scss
│       ├── base
│       │   ├── _base.scss
│       │   ├── _fonts.scss
│       │   ├── _icons.scss
│       │   └── _mixins.scss
│       ├── components
│       │   ├── _components.scss
│       │   └── _forms.scss
│       └── pages
│           ├── _base.scss
│           └── _pages.scss
└── styleguide
    ├── index.md
    └── template.html

TODO: explain the main concepts and folders - e.g. src, mockup, styleguide

License

BETG is developed by Cliss XXI and licensed under the AGPLv3+.