From 58e27e9c421f1d737818868ed7a96d706a66a28d Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Sun, 23 Oct 2016 01:01:06 -0700 Subject: [PATCH] Add cssnext anc postcss-import --- README.md | 5 +++-- app/styles/main.css | 4 +--- brunch-config.js | 9 ++------- makenew.sh | 2 +- package.json | 5 +++-- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 1ac2170..8bff22c 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ an instant-feedback development cycle and deployment pipeline. [Handlebars], and [Yaml Front Matter]. - Extensive intelligent meta tag support. - Write modern JavaScript with [Babel] and the [ES2015 preset]. -- Write styles with [PostCSS] and [Autoprefixer]. +- Write styles with [PostCSS], [postcss-import], and [PostCSS-cssnext]. - Production assets optimized with [UglifyJS] and [clean-css]. - Frontend and development dependency management with [npm]. - Automatic browser reloading with [auto-reload-brunch]. @@ -51,7 +51,6 @@ an instant-feedback development cycle and deployment pipeline. - Badges from [Shields.io]. [auto-reload-brunch]: https://github.com/brunch/auto-reload-brunch -[Autoprefixer]: https://github.com/postcss/autoprefixer [Babel]: https://babeljs.io/ [Brunch]: http://brunch.io/ [clean-css]: https://github.com/jakubpawlowicz/clean-css @@ -72,6 +71,8 @@ an instant-feedback development cycle and deployment pipeline. [Keep a CHANGELOG]: http://keepachangelog.com/ [npm]: https://www.npmjs.com/ [PostCSS]: http://postcss.org/ +[PostCSS-cssnext]: http://cssnext.io/ +[postcss-import]: https://github.com/postcss/postcss-import [sanitize.css]: https://jonathantneal.github.io/sanitize.css/ [Shields.io]: http://shields.io/ [stylelint]: http://stylelint.io/ diff --git a/app/styles/main.css b/app/styles/main.css index 74d7658..1a57896 100644 --- a/app/styles/main.css +++ b/app/styles/main.css @@ -1,3 +1 @@ -body { - font-size: 16px; -} +@import 'sanitize.css'; diff --git a/brunch-config.js b/brunch-config.js index c58ce38..e3569ff 100644 --- a/brunch-config.js +++ b/brunch-config.js @@ -1,10 +1,4 @@ exports.config = { - npm: { - styles: { - 'sanitize.css': ['sanitize.css'] - } - }, - files: { javascripts: { joinTo: { @@ -22,7 +16,8 @@ exports.config = { plugins: { postcss: { processors: [ - require('autoprefixer') + require('postcss-import')(), + require('postcss-cssnext')() ] }, diff --git a/makenew.sh b/makenew.sh index b595bfe..4e94cd1 100755 --- a/makenew.sh +++ b/makenew.sh @@ -54,7 +54,7 @@ makenew () { read -p '> GitHub user or organization name: ' mk_user read -p '> GitHub repository name: ' mk_repo - sed_delete README.md '3d;14,173d;324,327d' + sed_delete README.md '3d;14,174d;325,328d' sed_insert README.md '13i' "${mk_description}" find_replace "s/version\": \".*\"/version\": \"${mk_version}\"/g" diff --git a/package.json b/package.json index 6eef78f..387d494 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ }, "devDependencies": { "auto-reload-brunch": "^2.1.0", - "autoprefixer": "^6.3.1", "babel-brunch": "^6.0.6", "brunch": "^2.5.2", "brunch-static": "^1.1.1", @@ -73,7 +72,9 @@ "gulplog": "^1.0.0", "html-brunch-static": "^1.2.1", "javascript-brunch": "^2.0.0", - "postcss-brunch": "^2.0.1", + "postcss-brunch": "^2.0.5", + "postcss-cssnext": "^2.8.0", + "postcss-import": "^8.1.2", "run-sequence": "^1.2.2", "stylefmt": "^4.3.1", "stylelint-config-standard": "^14.0.0",