Aller au fichier
François Poulain ebbbc342c8 feat(web) ajout d un bouton d adhesion 2019-08-05 10:39:30 +02:00
assets commit initial 2019-07-03 13:04:45 +02:00
initiatives_paysannes feat(web) ajout d un bouton d adhesion 2019-08-05 10:39:30 +02:00
styleguide commit initial 2019-07-03 13:04:45 +02:00
.gitattributes commit initial 2019-07-03 13:04:45 +02:00
.gitignore commit initial 2019-07-03 13:04:45 +02:00
.stylelintrc commit initial 2019-07-03 13:04:45 +02:00
LICENSE commit initial 2019-07-03 13:04:45 +02:00
README.md readme 2019-07-03 13:09:03 +02:00
gulpfile.js commit initial 2019-07-03 13:04:45 +02:00
package.json commit initial 2019-07-03 13:04:45 +02:00

README.md

Initiatives Paysannes

Placeholder for https://initiatives-paysannes.fr

Assets

The assets - e.g. CSS, JavaScript, images, fonts - are generated using a Gulp-powered build system with these features:

  • SCSS compilation and prefixing
  • JavaScript module bundling with webpack
  • Styleguide and components preview
  • Built-in BrowserSync server
  • Compression for production builds

The source files live in assets/, and the styleguide in styleguide/.

Requirements

You will need to have npm installed on your system. 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 version as a regular user:

  1. Ensure that you have the following Debian packages installed, from at least stretch-backports:

    • nodejs
    • 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://www.npmjs.com/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
    

Usage

Start by installing the application dependencies - which are defined in package.json - by running: npm install.

The following tasks are then available:

  • npm run build: build all the assets for development and production use, and put them in the static folder - e.g initiatives_paysannes/static.
  • npm run styleguide: run a server with the styleguide and watch for file changes.
  • npm run serve: run a proxy server to the app - which must already be served on localhost:8000 - with the styleguide on /stylguide and watch for file changes.
  • npm run lint: lint the JavaScript and the SCSS code.

In production, only the static files will be used. It is recommended to commit the compiled assets just before a new release only. This will prevent to have a growing repository due to the minified files.

License

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