François Poulain ebbbc342c8 | ||
---|---|---|
assets | ||
initiatives_paysannes | ||
styleguide | ||
.gitattributes | ||
.gitignore | ||
.stylelintrc | ||
LICENSE | ||
README.md | ||
gulpfile.js | ||
package.json |
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:
-
Ensure that you have the following Debian packages installed, from at least
stretch-backports
:- nodejs
- node-rimraf
-
Set the npm's installation prefix as an environment variable:
$ export npm_config_prefix=~/.node_modules
-
Retrieve and execute the last npm's installation script:
$ curl -L https://www.npmjs.com/install.sh | sh
-
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
-
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.ginitiatives_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 onlocalhost: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+.