flux:web-basic00
This is an old revision of the document!
Table of Contents
Description
- Flux de travail SCSS + JS + HTML
- Automatisation via Grunt
- linting/hinting/validation
- HTML validation : grunt-html-angular-validate
- CSS
- JS
- process/compression
- SASS (SCSS) → CSS (style.uncompressed.css)→ CSS compressé (style.css)
- JS → JS compilé (Google Closure) et compressé
- HTML → HTML Compressé ()
- Éditeur ATOM avec JSCS (le profil est a déterminer, le profil airbnb est ES6 même s'il existe une version du styleguide pour ES5.
structure
/site // version de production compressée .jscsrc (JSCS config file) .gitignore (GIT ignore config file) package.json *.html /a (assets) j.js // fichier js concaténé + compressé c.css // css compressé /i (img) /src /scss /js /html /build // fichiers CSS générés depuis SCSS et les js concatenés + HTML *.html /a (assets) j.js c.css
installations
Ruby
OSX
Déja installé.
Linux (debian-based)
apt-get install ruby
SASS
sudo gem install sass
ATOM
OS X
→ .dmg
Linux (debian-based)
→ .deb ?
JSCS
Dans le terminal :
apm install linter-jscs
Nodejs
OSX
.pkg ?
Linux (Debian-base)
?
initialisation NPM
npm init
Grunt
installation globale de Grunt (Commande-Line Interface)
npm install -g grunt-cli
dev : installation des plugins
npm install grunt-contrib-concat --save-dev
fichiers de configuration
.jscrc
{ "preset": "airbnb", "requireCamelCaseOrUpperCaseIdentifiers": null }
.gitignore
/node_modules/* /site/*
+ https://github.com/gruntjs/grunt/blob/master/.gitignore ?
+ https://github.com/github/gitignore/blob/master/Sass.gitignore
+ https://github.com/github/gitignore/blob/master/Node.gitignore
package.json
gruntfile.js
flux/web-basic00.1459614464.txt.gz · Last modified: 2016/04/02 18:27 by leo