From ee34b216799ba0e16ad4832bb4ff0583de23a83d Mon Sep 17 00:00:00 2001 From: Willian Justen Date: Sat, 30 Jul 2016 01:30:33 -0300 Subject: [PATCH 1/5] Add husky and precommit hook --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ca054f..ba6c850 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ }, "devDependencies": { "autoprefixer": "^6.3.6", + "husky": "^0.11.6", "node-sass": "^3.7.0", "npm-run-all": "^2.1.1", "onchange": "^2.4.0", @@ -62,6 +63,7 @@ "sass:compressed": "node-sass --output-style compressed src/milligram.sass dist/milligram.min.css", "autoprefixer": "postcss -u autoprefixer --no-map.inline --autoprefixer.browsers 'last 1 versions' -r dist/*.css", "watch": "onchange src -- npm run build", - "build": "npm-run-all sass:expanded sass:compressed autoprefixer banner:expanded banner:compressed" + "build": "npm-run-all sass:expanded sass:compressed autoprefixer banner:expanded banner:compressed", + "precommit": "npm run build && git add dist/**" } } From 4c42475c8ce7748612121af83ef45d6195add00e Mon Sep 17 00:00:00 2001 From: CJ Patoilo Date: Thu, 8 Dec 2016 19:56:38 -0300 Subject: [PATCH 2/5] Organizing the tasks --- package.json | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ca7e59c..a10a446 100644 --- a/package.json +++ b/package.json @@ -61,27 +61,28 @@ "nyc": "^10.0.0", "onchange": "^2.5.0", "postcss-cli": "^2.6.0", + "rimraf": "^2.5.4", "sass-lint": "^1.10.2" }, "engines": { "node": "^7.0.0" }, "scripts": { - "prestart": "npm install", - "pretest": "npm install", - "banner": "banner-cli dist/*.css", - "clean": "rm -rf dist", - "autoprefixer": "postcss -u autoprefixer --no-map.inline --autoprefixer.browsers \"last 1 versions\" -r dist/*.css", - "sass": "node-sass --output-style expanded src/milligram.sass dist/milligram.css && node-sass --output-style compressed src/milligram.sass dist/milligram.min.css", + "start": "run-p build watch serve", + "build": "run-s clean sass autoprefixer banner", + "clean": "rimraf dist", "lint": "sass-lint -c .sasslintrc \"src/*.sass\" --verbose --no-exit", - "build": "run-s clean lint sass autoprefixer banner", + "sass": "node-sass --output-style expanded src/milligram.sass dist/milligram.css && node-sass --output-style compressed src/milligram.sass dist/milligram.min.css", + "autoprefixer": "postcss -u autoprefixer --no-map.inline --autoprefixer.browsers \"last 1 versions\" -r dist/*.css", + "banner": "banner-cli dist/*.css", "watch": "onchange src -- npm run build", "serve": "browser-sync start --no-notify -s test --ss dist -f dist", - "start": "run-p build watch serve", - "test": "nyc ava", + "test": "lint && nyc ava", "coveralls": "nyc report --reporter=text-lcov | coveralls", "reference": "backstop reference --configPath=backstop.conf.js", "compare": "backstop test --configPath=backstop.conf.js", - "backstop": "run-s build && run-p serve compare" + "backstop": "run-s build && run-p serve compare", + "prestart": "npm install", + "pretest": "npm install" } } From 6b22a7b794ea5f4b6da97a30690c3215bca58e8b Mon Sep 17 00:00:00 2001 From: CJ Patoilo Date: Thu, 8 Dec 2016 20:40:07 -0300 Subject: [PATCH 3/5] Remove coveralls from ignore --- .npmignore | 1 - bower.json | 1 - composer.json | 1 - package.json | 1 - 4 files changed, 4 deletions(-) diff --git a/.npmignore b/.npmignore index 63744b3..2c8002f 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,4 @@ .appveyor.yml -.coveralls.yml .editorconfig .eslintrc .github diff --git a/bower.json b/bower.json index d83388d..db40646 100644 --- a/bower.json +++ b/bower.json @@ -29,7 +29,6 @@ ], "ignore": [ ".appveyor.yml", - ".coveralls.yml", ".editorconfig", ".eslintrc", ".github", diff --git a/composer.json b/composer.json index 926cf1c..d06a1d3 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,6 @@ ], "ignore": [ ".appveyor.yml", - ".coveralls.yml", ".editorconfig", ".eslintrc", ".github", diff --git a/package.json b/package.json index a10a446..eaa6851 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ ], "ignore": [ ".appveyor.yml", - ".coveralls.yml", ".editorconfig", ".eslintrc", ".github", From ef65638b24b33431a4df64333c64a6696c99b99c Mon Sep 17 00:00:00 2001 From: CJ Patoilo Date: Thu, 8 Dec 2016 20:44:24 -0300 Subject: [PATCH 4/5] Improvement test --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index eaa6851..c5b0ec2 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "backstopjs": "^2.3.3", "banner-cli": "^0.6.0", "browser-sync": "^2.18.2", - "coveralls": "^2.11.15", "node-sass": "^3.13.0", "npm-run-all": "^2.3.0", "nyc": "^10.0.0", @@ -70,14 +69,14 @@ "start": "run-p build watch serve", "build": "run-s clean sass autoprefixer banner", "clean": "rimraf dist", - "lint": "sass-lint -c .sasslintrc \"src/*.sass\" --verbose --no-exit", "sass": "node-sass --output-style expanded src/milligram.sass dist/milligram.css && node-sass --output-style compressed src/milligram.sass dist/milligram.min.css", "autoprefixer": "postcss -u autoprefixer --no-map.inline --autoprefixer.browsers \"last 1 versions\" -r dist/*.css", "banner": "banner-cli dist/*.css", "watch": "onchange src -- npm run build", "serve": "browser-sync start --no-notify -s test --ss dist -f dist", - "test": "lint && nyc ava", - "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "run-s lint ava", + "lint": "sass-lint -c .sasslintrc \"src/*.sass\" --verbose --no-exit", + "ava": "nyc ava", "reference": "backstop reference --configPath=backstop.conf.js", "compare": "backstop test --configPath=backstop.conf.js", "backstop": "run-s build && run-p serve compare", From 7d66bb9c3bda1f094b8b1bf09ef7b95e7a9cf924 Mon Sep 17 00:00:00 2001 From: CJ Patoilo Date: Thu, 8 Dec 2016 20:47:18 -0300 Subject: [PATCH 5/5] Improvement editorconfig --- .editorconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index 2bd49bd..85a84c3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,12 +1,13 @@ -# editorconfig.org +# http://editorconfig.org/ root = true [*] indent_style = tab -indent_size = 2 +end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.md] -trim_trailing_whitespace = false +[{*.yml}] +indent_style = space +indent_size = 2